renumbered neopixel to make more sense in decadic

remotes/github/master
Ondřej Hruška 7 years ago
parent 6bfa40ce9f
commit b40825a75f
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 2
      units/1wire/unit_1wire.c
  2. 10
      units/neopixel/unit_neopixel.c
  3. 10
      units/usart/unit_usart.c

@ -93,8 +93,6 @@ enum PinCmd_ {
CMD_READ = 11, // write multiple bytes using a ROM address CMD_READ = 11, // write multiple bytes using a ROM address
CMD_POLL_FOR_1 = 20, CMD_POLL_FOR_1 = 20,
CMD_TEST = 100,
}; };

@ -11,11 +11,11 @@
enum PinCmd_ { enum PinCmd_ {
CMD_CLEAR = 0, CMD_CLEAR = 0,
CMD_LOAD = 1, CMD_LOAD = 1,
CMD_LOAD_ZRGB = 0x08, // 0,0 - trail zero, bgr CMD_LOAD_ZRGB = 4, // 0,0 - trail zero, bgr
CMD_LOAD_ZBGR = 0x09, // 0,1 CMD_LOAD_ZBGR = 5, // 0,1
CMD_LOAD_RGBZ = 0x0A, // 1,0 CMD_LOAD_RGBZ = 6, // 1,0
CMD_LOAD_BGRZ = 0x0B, // 1,1 CMD_LOAD_BGRZ = 7, // 1,1
CMD_GET_LEN = 0x10, CMD_GET_LEN = 10,
}; };
/** Handle a request message */ /** 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; uint32_t len;
const uint8_t *pld; const uint8_t *pld;
switch (command) { 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: case CMD_WRITE:
pld = pp_tail(pp, &len); pld = pp_tail(pp, &len);
TRY(UU_USART_Write(unit, pld, len)); TRY(UU_USART_Write(unit, pld, len));
return E_SUCCESS; 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: case CMD_WRITE_SYNC:
pld = pp_tail(pp, &len); pld = pp_tail(pp, &len);
TRY(UU_USART_WriteSync(unit, pld, len)); TRY(UU_USART_WriteSync(unit, pld, len));

Loading…
Cancel
Save