diff --git a/esphome/components/ebyte_lora/config.h b/esphome/components/ebyte_lora/config.h index 27d867b236..7b11faf55e 100644 --- a/esphome/components/ebyte_lora/config.h +++ b/esphome/components/ebyte_lora/config.h @@ -53,37 +53,35 @@ enum WorPeriod : uint8_t { // reverse order on the data sheet struct RegisterConfig { + uint8_t command : 8; + uint8_t starting_address : 8; + uint8_t length : 8; + uint8_t addh : 8; + uint8_t addl : 8; struct { - uint8_t command : 8; - uint8_t starting_address : 8; - uint8_t length : 8; - uint8_t addh : 8; - uint8_t addl : 8; - struct { - uint8_t air_data_rate : 3; - uint8_t parity : 2; - uint8_t uart_baud : 3; + uint8_t air_data_rate : 3; + uint8_t parity : 2; + uint8_t uart_baud : 3; - } reg_0; - struct { - uint8_t transmission_power : 2; - uint8_t reserve : 3; - uint8_t rssi_noise : 1; - uint8_t sub_packet : 2; - } reg_1; - // reg2 - uint8_t channel : 8; - struct { - uint8_t wor_period : 3; - uint8_t reserve1 : 1; - uint8_t enable_lbt : 1; - uint8_t reserve2 : 1; - uint8_t transmission_mode : 1; - uint8_t enable_rssi : 1; - } reg_3; - uint8_t crypt_h : 8; - uint8_t crypt_l : 8; - }; + } reg_0; + struct { + uint8_t transmission_power : 2; + uint8_t reserve : 3; + uint8_t rssi_noise : 1; + uint8_t sub_packet : 2; + } reg_1; + // reg2 + uint8_t channel : 8; + struct { + uint8_t wor_period : 3; + uint8_t reserve1 : 1; + uint8_t enable_lbt : 1; + uint8_t reserve2 : 1; + uint8_t transmission_mode : 1; + uint8_t enable_rssi : 1; + } reg_3; + uint8_t crypt_h : 8; + uint8_t crypt_l : 8; } __attribute__((packed)); } // namespace ebyte_lora