Device support for Adafruit Neopixel Device. More...
Device support for Adafruit Neopixel Device.
#include <neopixel.h>
Classes | |
| struct | Config |
Public Types | |
| enum | Result { OK = 0 , ERR } |
| enum | 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 } |
| enum | 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 } |
| enum | StatAddReg { SEESAW_STATUS_HW_ID = 0x01 , SEESAW_STATUS_VERSION = 0x02 , SEESAW_STATUS_OPTIONS = 0x03 , SEESAW_STATUS_TEMP = 0x04 , SEESAW_STATUS_SWRST = 0x7F } |
| typedef uint16_t | neoPixelType |
Public Member Functions | |
| NeoPixel () | |
| ~NeoPixel () | |
| Result | Init (Config config) |
| 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) |
| 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) |
| Result | GetTransportError () |
| void | SWReset () |
| void | UpdateLength (uint16_t n) |
| void | UpdateType (neoPixelType t) |
| bool | CanShow (void) |
| void | Show (void) |
| 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) |
| 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 |
| uint16_t | NumPixels (void) const |
| void | Clear () |
| void | SetBrightness (uint8_t b) |
Protected Attributes | |
| bool | is800KHz |
| bool | begun |
| uint16_t | numLEDs |
| uint16_t | numBytes |
| int8_t | pin |
| uint8_t | pixelsd [256] |
| uint8_t | brightness |
| uint8_t * | pixels |
| uint8_t | rOffset |
| uint8_t | gOffset |
| uint8_t | bOffset |
| uint8_t | wOffset |
| uint32_t | endTime |
| uint16_t | type |
| uint16_t daisy::NeoPixel< Transport >::neoPixelType |
| enum daisy::NeoPixel::ModAddReg |
| enum daisy::NeoPixel::ModBaseAdd |
Module Base Addreses The module base addresses for different seesaw modules.
| enum daisy::NeoPixel::Result |
| enum daisy::NeoPixel::StatAddReg |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get and reset the transport error flag
|
inline |
Initialize the NeoPixel device
| config | Configuration settings |
|
inline |
|
inline |
Reads an 8 bit value
| reg | the register address to read from |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Perform a software reset. This resets all seesaw registers to their default values. This is called automatically from Init().
|
inline |
|
inline |
|
inline |
|
inline |
Writes an 8 bit value
| reg | the register address to write to |
| value | the value to write to the register |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |