renumbered neopixel to make more sense in decadic
This commit is contained in:
@@ -93,8 +93,6 @@ enum PinCmd_ {
|
||||
CMD_READ = 11, // write multiple bytes using a ROM address
|
||||
|
||||
CMD_POLL_FOR_1 = 20,
|
||||
|
||||
CMD_TEST = 100,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
enum PinCmd_ {
|
||||
CMD_CLEAR = 0,
|
||||
CMD_LOAD = 1,
|
||||
CMD_LOAD_ZRGB = 0x08, // 0,0 - trail zero, bgr
|
||||
CMD_LOAD_ZBGR = 0x09, // 0,1
|
||||
CMD_LOAD_RGBZ = 0x0A, // 1,0
|
||||
CMD_LOAD_BGRZ = 0x0B, // 1,1
|
||||
CMD_GET_LEN = 0x10,
|
||||
CMD_LOAD_ZRGB = 4, // 0,0 - trail zero, bgr
|
||||
CMD_LOAD_ZBGR = 5, // 0,1
|
||||
CMD_LOAD_RGBZ = 6, // 1,0
|
||||
CMD_LOAD_BGRZ = 7, // 1,1
|
||||
CMD_GET_LEN = 10,
|
||||
};
|
||||
|
||||
/** Handle a request message */
|
||||
|
||||
@@ -102,13 +102,19 @@ static error_t UUSART_handleRequest(Unit *unit, TF_ID frame_id, uint8_t command,
|
||||
uint32_t len;
|
||||
const uint8_t *pld;
|
||||
switch (command) {
|
||||
/** Write bytes to the USART. Payload consists of the data to send. Waits for completion. */
|
||||
/**
|
||||
* Write bytes to the USART, without waiting for completion.
|
||||
* May wait until there is space in the DMA buffer.
|
||||
*/
|
||||
case CMD_WRITE:
|
||||
pld = pp_tail(pp, &len);
|
||||
TRY(UU_USART_Write(unit, pld, len));
|
||||
return E_SUCCESS;
|
||||
|
||||
/** Write bytes to the USART, without waiting for completion. */
|
||||
/**
|
||||
* Write bytes to the USART. Payload consists of the data to send.
|
||||
* Waits for completion.
|
||||
*/
|
||||
case CMD_WRITE_SYNC:
|
||||
pld = pp_tail(pp, &len);
|
||||
TRY(UU_USART_WriteSync(unit, pld, len));
|
||||
|
||||
Reference in New Issue
Block a user