fixed some wrongly named enum constants

remotes/github/master
Ondřej Hruška 7 years ago
parent 9b1d084308
commit e667a2dd3a
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 4
      units/1wire/unit_1wire.c
  2. 4
      units/digital_out/unit_dout.c
  3. 4
      units/i2c/unit_i2c.c
  4. 4
      units/sipo/unit_sipo.c
  5. 4
      units/usart/unit_usart.c

@ -89,7 +89,7 @@ enum PinCmd_ {
CMD_SEARCH_CONTINUE = 3, // continue the previously started scan, retrieving more devices CMD_SEARCH_CONTINUE = 3, // continue the previously started scan, retrieving more devices
CMD_READ_ADDR = 4, // read the ROM code from a single device (for single-device bus) CMD_READ_ADDR = 4, // read the ROM code from a single device (for single-device bus)
CMD_QUERY = 10, // write multiple bytes using the SKIP_ROM command CMD_WRITE = 10, // write multiple bytes using the SKIP_ROM command
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,
@ -194,7 +194,7 @@ static error_t OW_handleRequest(Unit *unit, TF_ID frame_id, uint8_t command, Pay
* addr:u64, rest:write_data * addr:u64, rest:write_data
* if addr is 0, use SKIP_ROM * if addr is 0, use SKIP_ROM
*/ */
case CMD_QUERY: case CMD_WRITE:
addr = pp_u64(pp); addr = pp_u64(pp);
tail = pp_tail(pp, &remain); tail = pp_tail(pp, &remain);
TRY(UU_1WIRE_Write(unit, addr, tail, remain)); TRY(UU_1WIRE_Write(unit, addr, tail, remain));

@ -9,7 +9,7 @@
#include "_dout_internal.h" #include "_dout_internal.h"
enum PinCmd_ { enum PinCmd_ {
CMD_QUERY = 0, CMD_WRITE = 0,
CMD_SET = 1, CMD_SET = 1,
CMD_CLEAR = 2, CMD_CLEAR = 2,
CMD_TOGGLE = 3, CMD_TOGGLE = 3,
@ -22,7 +22,7 @@ static error_t DOut_handleRequest(Unit *unit, TF_ID frame_id, uint8_t command, P
uint16_t packed = pp_u16(pp); uint16_t packed = pp_u16(pp);
switch (command) { switch (command) {
case CMD_QUERY: case CMD_WRITE:
return UU_DOut_Write(unit, packed); return UU_DOut_Write(unit, packed);
case CMD_SET: case CMD_SET:

@ -12,7 +12,7 @@
#include "_i2c_internal.h" #include "_i2c_internal.h"
enum PinCmd_ { enum PinCmd_ {
CMD_QUERY = 0, CMD_WRITE = 0,
CMD_READ = 1, CMD_READ = 1,
CMD_WRITE_REG = 2, CMD_WRITE_REG = 2,
CMD_READ_REG = 3, CMD_READ_REG = 3,
@ -30,7 +30,7 @@ static error_t UI2C_handleRequest(Unit *unit, TF_ID frame_id, uint8_t command, P
switch (command) { switch (command) {
/** Write byte(s) - addr:u16, byte(s) */ /** Write byte(s) - addr:u16, byte(s) */
case CMD_QUERY: case CMD_WRITE:
addr = pp_u16(pp); addr = pp_u16(pp);
const uint8_t *bb = pp_tail(pp, &len); const uint8_t *bb = pp_tail(pp, &len);

@ -12,7 +12,7 @@
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
enum SipoCmd_ { enum SipoCmd_ {
CMD_QUERY = 0, CMD_WRITE = 0,
CMD_DIRECT_DATA = 1, CMD_DIRECT_DATA = 1,
CMD_DIRECT_SHIFT = 2, CMD_DIRECT_SHIFT = 2,
CMD_DIRECT_CLEAR = 3, CMD_DIRECT_CLEAR = 3,
@ -23,7 +23,7 @@ enum SipoCmd_ {
static error_t USIPO_handleRequest(Unit *unit, TF_ID frame_id, uint8_t command, PayloadParser *pp) static error_t USIPO_handleRequest(Unit *unit, TF_ID frame_id, uint8_t command, PayloadParser *pp)
{ {
switch (command) { switch (command) {
case CMD_QUERY: case CMD_WRITE:
{ {
uint32_t len; uint32_t len;
uint16_t terminal_packed = pp_u16(pp); uint16_t terminal_packed = pp_u16(pp);

@ -92,7 +92,7 @@ void UUSART_Tick(Unit *unit)
} }
enum PinCmd_ { enum PinCmd_ {
CMD_QUERY = 0, CMD_WRITE = 0,
CMD_WRITE_SYNC = 1, CMD_WRITE_SYNC = 1,
}; };
@ -103,7 +103,7 @@ static error_t UUSART_handleRequest(Unit *unit, TF_ID frame_id, uint8_t command,
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. Payload consists of the data to send. Waits for completion. */
case CMD_QUERY: 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;

Loading…
Cancel
Save