5#define NEO_TRELLIS_ADDR_NEOPIXEL (0x2E)
9#define NEO_RGB ((0 << 6) | (0 << 4) | (1 << 2) | (2))
10#define NEO_RBG ((0 << 6) | (0 << 4) | (2 << 2) | (1))
11#define NEO_GRB ((1 << 6) | (1 << 4) | (0 << 2) | (2))
12#define NEO_GBR ((2 << 6) | (2 << 4) | (0 << 2) | (1))
13#define NEO_BRG ((1 << 6) | (1 << 4) | (2 << 2) | (0))
14#define NEO_BGR ((2 << 6) | (2 << 4) | (1 << 2) | (0))
18#define NEO_WRGB ((0 << 6) | (1 << 4) | (2 << 2) | (3))
19#define NEO_WRBG ((0 << 6) | (1 << 4) | (3 << 2) | (2))
20#define NEO_WGRB ((0 << 6) | (2 << 4) | (1 << 2) | (3))
21#define NEO_WGBR ((0 << 6) | (3 << 4) | (1 << 2) | (2))
22#define NEO_WBRG ((0 << 6) | (2 << 4) | (3 << 2) | (1))
23#define NEO_WBGR ((0 << 6) | (3 << 4) | (2 << 2) | (1))
25#define NEO_RWGB ((1 << 6) | (0 << 4) | (2 << 2) | (3))
26#define NEO_RWBG ((1 << 6) | (0 << 4) | (3 << 2) | (2))
27#define NEO_RGWB ((2 << 6) | (0 << 4) | (1 << 2) | (3))
28#define NEO_RGBW ((3 << 6) | (0 << 4) | (1 << 2) | (2))
29#define NEO_RBWG ((2 << 6) | (0 << 4) | (3 << 2) | (1))
30#define NEO_RBGW ((3 << 6) | (0 << 4) | (2 << 2) | (1))
32#define NEO_GWRB ((1 << 6) | (2 << 4) | (0 << 2) | (3))
33#define NEO_GWBR ((1 << 6) | (3 << 4) | (0 << 2) | (2))
34#define NEO_GRWB ((2 << 6) | (1 << 4) | (0 << 2) | (3))
35#define NEO_GRBW ((3 << 6) | (1 << 4) | (0 << 2) | (2))
36#define NEO_GBWR ((2 << 6) | (3 << 4) | (0 << 2) | (1))
37#define NEO_GBRW ((3 << 6) | (2 << 4) | (0 << 2) | (1))
39#define NEO_BWRG ((1 << 6) | (2 << 4) | (3 << 2) | (0))
40#define NEO_BWGR ((1 << 6) | (3 << 4) | (2 << 2) | (0))
41#define NEO_BRWG ((2 << 6) | (1 << 4) | (3 << 2) | (0))
42#define NEO_BRGW ((3 << 6) | (1 << 4) | (2 << 2) | (0))
43#define NEO_BGWR ((2 << 6) | (3 << 4) | (1 << 2) | (0))
44#define NEO_BGRW ((3 << 6) | (2 << 4) | (1 << 2) | (0))
51#define NEO_KHZ800 0x0000
52#define NEO_KHZ400 0x0100
190template <
typename Transport>
596 void mymemset(uint8_t *addr, uint8_t val, uint8_t len)
598 for(uint8_t i = 0; i < len; i++)
605 Transport transport_;
Result Init(const Config &config)
Result ReceiveBlocking(uint16_t address, uint8_t *data, uint16_t size, uint32_t timeout)
Result TransmitBlocking(uint16_t address, uint8_t *data, uint16_t size, uint32_t timeout)
Definition leddriver.h:33
void Init(I2CHandle i2c, const uint8_t(&addresses)[numDrivers], DmaBuffer dma_buffer_a, DmaBuffer dma_buffer_b, Pin oe_pin=Pin(PORTX, 0))
Definition leddriver.h:65
Device support for Adafruit Neopixel Device.
Definition neopixel.h:192
ModBaseAdd
Definition neopixel.h:224
@ SEESAW_STATUS_BASE
Definition neopixel.h:225
@ SEESAW_KEYPAD_BASE
Definition neopixel.h:237
@ SEESAW_SPECTRUM_BASE
Definition neopixel.h:239
@ SEESAW_TOUCH_BASE
Definition neopixel.h:236
@ SEESAW_SERCOM0_BASE
Definition neopixel.h:227
@ SEESAW_INTERRUPT_BASE
Definition neopixel.h:232
@ SEESAW_NEOPIXEL_BASE
Definition neopixel.h:235
@ SEESAW_DAC_BASE
Definition neopixel.h:231
@ SEESAW_ENCODER_BASE
Definition neopixel.h:238
@ SEESAW_DAP_BASE
Definition neopixel.h:233
@ SEESAW_ADC_BASE
Definition neopixel.h:230
@ SEESAW_TIMER_BASE
Definition neopixel.h:229
@ SEESAW_GPIO_BASE
Definition neopixel.h:226
@ SEESAW_EEPROM_BASE
Definition neopixel.h:234
uint16_t NumPixels(void) const
Definition neopixel.h:567
void Show(void)
Definition neopixel.h:363
~NeoPixel()
Definition neopixel.h:195
uint8_t brightness
Definition neopixel.h:616
void Write(uint8_t reg_high, uint8_t reg_low, uint8_t *buff, uint8_t size)
Definition neopixel.h:289
uint8_t * pixels
Definition neopixel.h:617
bool begun
Definition neopixel.h:609
uint8_t bOffset
Definition neopixel.h:620
void UpdateType(neoPixelType t)
Definition neopixel.h:342
Result Init(Config config)
Definition neopixel.h:266
uint8_t rOffset
Definition neopixel.h:618
int8_t pin
Definition neopixel.h:612
uint32_t endTime
Definition neopixel.h:622
void SetPin(uint8_t p)
Definition neopixel.h:380
void ReadLen(uint8_t reg_high, uint8_t reg_low, uint8_t *buff, uint8_t len)
Definition neopixel.h:312
uint16_t numLEDs
Definition neopixel.h:610
void Clear()
Definition neopixel.h:569
uint32_t Color(uint8_t r, uint8_t g, uint8_t b)
Definition neopixel.h:501
void SetBrightness(uint8_t b)
Definition neopixel.h:585
bool CanShow(void)
Definition neopixel.h:361
uint8_t Read8(uint8_t reg_high, uint8_t reg_low)
Definition neopixel.h:307
void SetPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w)
Definition neopixel.h:423
uint8_t gOffset
Definition neopixel.h:619
void UpdateLength(uint16_t n)
Definition neopixel.h:331
NeoPixel()
Definition neopixel.h:194
ModAddReg
Definition neopixel.h:244
@ SEESAW_NEOPIXEL_SHOW
Definition neopixel.h:250
@ SEESAW_NEOPIXEL_PIN
Definition neopixel.h:246
@ SEESAW_NEOPIXEL_BUF_LENGTH
Definition neopixel.h:248
@ SEESAW_NEOPIXEL_SPEED
Definition neopixel.h:247
@ SEESAW_NEOPIXEL_STATUS
Definition neopixel.h:245
@ SEESAW_NEOPIXEL_BUF
Definition neopixel.h:249
uint8_t wOffset
Definition neopixel.h:621
uint16_t neoPixelType
Definition neopixel.h:218
void SetPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b)
Definition neopixel.h:387
void SWReset()
Definition neopixel.h:326
uint8_t pixelsd[256]
Definition neopixel.h:614
bool is800KHz
Definition neopixel.h:608
uint32_t Color(uint8_t r, uint8_t g, uint8_t b, uint8_t w)
Definition neopixel.h:508
Result GetTransportError()
Definition neopixel.h:320
uint8_t * GetPixels(void) const
Definition neopixel.h:565
uint32_t GetPixelColor(uint16_t n) const
Definition neopixel.h:515
void Write8(uint8_t reg_high, uint8_t reg_low, uint8_t value)
Definition neopixel.h:298
uint16_t numBytes
Definition neopixel.h:611
StatAddReg
Definition neopixel.h:255
@ SEESAW_STATUS_OPTIONS
Definition neopixel.h:258
@ SEESAW_STATUS_TEMP
Definition neopixel.h:259
@ SEESAW_STATUS_VERSION
Definition neopixel.h:257
@ SEESAW_STATUS_SWRST
Definition neopixel.h:260
@ SEESAW_STATUS_HW_ID
Definition neopixel.h:256
uint16_t type
Definition neopixel.h:624
void SetPixelColor(uint16_t n, uint32_t c)
Definition neopixel.h:461
Result
Definition neopixel.h:213
@ OK
Definition neopixel.h:214
@ ERR
Definition neopixel.h:215
void WriteLen(uint8_t reg_high, uint8_t reg_low, uint8_t *buff, uint16_t size)
Definition neopixel.h:124
uint8_t Read8(uint8_t reg_high, uint8_t reg_low)
Definition neopixel.h:164
bool GetError()
Definition neopixel.h:171
void Read(uint8_t *data, uint16_t size)
Definition neopixel.h:109
void Write(uint8_t *data, uint16_t size)
Definition neopixel.h:103
void Init(Config config)
Definition neopixel.h:88
~NeoPixelI2CTransport()
Definition neopixel.h:65
void Write8(uint8_t reg_high, uint8_t reg_low, uint8_t value)
Definition neopixel.h:149
void ReadLen(uint8_t reg_high, uint8_t reg_low, uint8_t *buff, uint16_t size)
Definition neopixel.h:116
NeoPixelI2CTransport()
Definition neopixel.h:64
static void Delay(uint32_t delay_ms)
Hardware defines and helpers for daisy field platform.
Definition index.h:2
@ PORTB
Definition daisy_core.h:178
#define NEO_KHZ800
Definition neopixel.h:51
#define NEO_GRB
Definition neopixel.h:11
#define NEO_TRELLIS_ADDR_NEOPIXEL
Default Neotrellis I2C address.
Definition neopixel.h:5
struct daisy::I2CHandle::Config::@15 pin_config
Mode mode
Definition i2c.h:65
Speed speed
Definition i2c.h:64
Peripheral periph
Definition i2c.h:57
Peripheral
Definition i2c.h:40
Definition neopixel.h:198
Transport::Config transport_config
Definition neopixel.h:199
uint16_t type
Definition neopixel.h:200
Config()
Definition neopixel.h:204
int8_t output_pin
Definition neopixel.h:202
uint16_t numLEDs
Definition neopixel.h:201
I2CHandle::Config::Peripheral periph
Definition neopixel.h:69
Pin sda
Definition neopixel.h:72
Config()
Definition neopixel.h:76
uint8_t address
Definition neopixel.h:74
Pin scl
Definition neopixel.h:71
I2CHandle::Config::Speed speed
Definition neopixel.h:70
representation of hardware port/pin combination
Definition daisy_core.h:193