daisy::NeoPixel¶
Module: External
Device support for Adafruit Neopixel Device. More...
#include <neopixel.h>
Public Classes¶
Name | |
---|---|
struct | Config |
Public Types¶
Name | |
---|---|
enum | Result |
enum | ModBaseAdd |
enum | ModAddReg |
enum | StatAddReg |
typedef uint16_t | neoPixelType |
Public Functions¶
Name | |
---|---|
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¶
Name | |
---|---|
bool | is800KHz |
bool | begun |
uint16_t | numLEDs |
uint16_t | numBytes |
int8_t | pin |
uint8_t[256] | pixelsd |
uint8_t | brightness |
uint8_t * | pixels |
uint8_t | rOffset |
uint8_t | gOffset |
uint8_t | bOffset |
uint8_t | wOffset |
uint32_t | endTime |
uint16_t | type |
Detailed Description¶
Device support for Adafruit Neopixel Device.
Author: beserge
Date: December 2021
Public Types Documentation¶
enum Result¶
Enumerator | Value | Description |
---|---|---|
OK | 0 | |
ERR |
enum ModBaseAdd¶
Enumerator | Value | Description |
---|---|---|
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 ModAddReg¶
Enumerator | Value | Description |
---|---|---|
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 StatAddReg¶
Enumerator | Value | Description |
---|---|---|
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 NeoPixel¶
function ~NeoPixel¶
function Init¶
Parameters:
- config Configuration settings
Initialize the NeoPixel device
function Write¶
function Write8¶
Parameters:
- reg the register address to write to
- value the value to write to the register
Writes an 8 bit value
function Read8¶
Parameters:
- reg the register address to read from
Return: the data uint8_t read from the device
Reads an 8 bit value
function ReadLen¶
function GetTransportError¶
Return: Whether the transport has errored since the last check
Get and reset the transport error flag
function SWReset¶
Perform a software reset. This resets all seesaw registers to their default values. This is called automatically from Init().
function UpdateLength¶
function UpdateType¶
function CanShow¶
function Show¶
function SetPin¶
function SetPixelColor¶
function SetPixelColor¶
function SetPixelColor¶
function Color¶
function Color¶
function GetPixelColor¶
function GetPixels¶
function NumPixels¶
function Clear¶
function SetBrightness¶
Protected Attributes Documentation¶
variable is800KHz¶
variable begun¶
variable numLEDs¶
variable numBytes¶
variable pin¶
variable pixelsd¶
variable brightness¶
variable pixels¶
variable rOffset¶
variable gOffset¶
variable bOffset¶
variable wOffset¶
variable endTime¶
variable type¶
Updated on 2024-01-03 at 19:41:01 +0000