Class daisy::NeoPixel¶
Device support for Adafruit Neopixel Device. More...
#include <neopixel.h>
Classes¶
Type | Name |
---|---|
struct | Config |
Public Types¶
Type | Name |
---|---|
enum | ModAddReg |
enum | ModBaseAdd |
enum | Result |
enum | StatAddReg |
typedef uint16_t | neoPixelType |
Public Functions¶
Type | Name |
---|---|
bool | CanShow (void) |
void | Clear () |
uint32_t | Color (uint8_t r, uint8_t g, uint8_t b) |
uint32_t | Color (uint8_t r, uint8_t g, uint8_t b, uint8_t w) |
uint32_t | GetPixelColor (uint16_t n) const |
uint8_t * | GetPixels (void) const |
Result | GetTransportError () |
Result | Init (Config config) |
NeoPixel () |
|
uint16_t | NumPixels (void) const |
uint8_t | Read8 (uint8_t reg_high, uint8_t reg_low) |
void | ReadLen (uint8_t reg_high, uint8_t reg_low, uint8_t * buff, uint8_t len) |
void | SWReset () |
void | SetBrightness (uint8_t b) |
void | SetPin (uint8_t p) |
void | SetPixelColor (uint16_t n, uint8_t r, uint8_t g, uint8_t b) |
void | SetPixelColor (uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w) |
void | SetPixelColor (uint16_t n, uint32_t c) |
void | Show (void) |
void | UpdateLength (uint16_t n) |
void | UpdateType (neoPixelType t) |
void | Write (uint8_t reg_high, uint8_t reg_low, uint8_t * buff, uint8_t size) |
void | Write8 (uint8_t reg_high, uint8_t reg_low, uint8_t value) |
~NeoPixel () |
Protected Attributes¶
Detailed Description¶
Author:
beserge
Date:
December 2021
Public Types Documentation¶
enum ModAddReg¶
enum daisy::NeoPixel::ModAddReg {
SEESAW_NEOPIXEL_STATUS = 0x00,
SEESAW_NEOPIXEL_PIN = 0x01,
SEESAW_NEOPIXEL_SPEED = 0x02,
SEESAW_NEOPIXEL_BUF_LENGTH = 0x03,
SEESAW_NEOPIXEL_BUF = 0x04,
SEESAW_NEOPIXEL_SHOW = 0x05
};
neopixel module function address registers
enum ModBaseAdd¶
enum daisy::NeoPixel::ModBaseAdd {
SEESAW_STATUS_BASE = 0x00,
SEESAW_GPIO_BASE = 0x01,
SEESAW_SERCOM0_BASE = 0x02,
SEESAW_TIMER_BASE = 0x08,
SEESAW_ADC_BASE = 0x09,
SEESAW_DAC_BASE = 0x0A,
SEESAW_INTERRUPT_BASE = 0x0B,
SEESAW_DAP_BASE = 0x0C,
SEESAW_EEPROM_BASE = 0x0D,
SEESAW_NEOPIXEL_BASE = 0x0E,
SEESAW_TOUCH_BASE = 0x0F,
SEESAW_KEYPAD_BASE = 0x10,
SEESAW_ENCODER_BASE = 0x11,
SEESAW_SPECTRUM_BASE = 0x12
};
Module Base Addreses The module base addresses for different seesaw modules.
enum Result¶
enum StatAddReg¶
enum daisy::NeoPixel::StatAddReg {
SEESAW_STATUS_HW_ID = 0x01,
SEESAW_STATUS_VERSION = 0x02,
SEESAW_STATUS_OPTIONS = 0x03,
SEESAW_STATUS_TEMP = 0x04,
SEESAW_STATUS_SWRST = 0x7F
};
status module function address registers
typedef neoPixelType¶
Public Functions Documentation¶
function CanShow¶
function Clear¶
function Color [½]¶
function Color [2/2]¶
function GetPixelColor¶
function GetPixels¶
function GetTransportError¶
Get and reset the transport error flag
Returns:
Whether the transport has errored since the last check
function Init¶
Initialize the NeoPixel device
Parameters:
config
Configuration settings
function NeoPixel¶
function NumPixels¶
function Read8¶
Reads an 8 bit value
Parameters:
reg
the register address to read from
Returns:
the data uint8_t read from the device
function ReadLen¶
inline void daisy::NeoPixel::ReadLen (
uint8_t reg_high,
uint8_t reg_low,
uint8_t * buff,
uint8_t len
)
function SWReset¶
Perform a software reset. This resets all seesaw registers to their default values. This is called automatically from Init().
function SetBrightness¶
function SetPin¶
function SetPixelColor [⅓]¶
function SetPixelColor [⅔]¶
inline void daisy::NeoPixel::SetPixelColor (
uint16_t n,
uint8_t r,
uint8_t g,
uint8_t b,
uint8_t w
)
function SetPixelColor [3/3]¶
function Show¶
function UpdateLength¶
function UpdateType¶
function Write¶
inline void daisy::NeoPixel::Write (
uint8_t reg_high,
uint8_t reg_low,
uint8_t * buff,
uint8_t size
)
function Write8¶
Writes an 8 bit value
Parameters:
reg
the register address to write tovalue
the value to write to the register
function ~NeoPixel¶
Protected Attributes Documentation¶
variable bOffset¶
variable begun¶
variable brightness¶
variable endTime¶
variable gOffset¶
variable is800KHz¶
variable numBytes¶
variable numLEDs¶
variable pin¶
variable pixels¶
variable pixelsd¶
variable rOffset¶
variable type¶
variable wOffset¶
The documentation for this class was generated from the following file external-docs/libDaisy/src/dev/neopixel.h