From e9b7b3edee0b84da856f2f27480b5cd6f5d26271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Koek?= Date: Mon, 8 Apr 2024 19:03:39 +0100 Subject: [PATCH] Update config.h --- esphome/components/ebyte_lora/config.h | 56 +++++++++++++------------- 1 file changed, 27 insertions(+), 29 deletions(-) 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