-static const uint16_t packet_rate_setup[] = {
- [AO_RADIO_RATE_38400] = ((0xf << 4) |
- (PACKET_DRATE_E_384 << CC115L_MDMCFG4_DRATE_E)),
-
- [AO_RADIO_RATE_9600] = ((0xf << 4) |
- (PACKET_DRATE_E_96 << CC115L_MDMCFG4_DRATE_E)),
-
- [AO_RADIO_RATE_2400] = ((0xf << 4) |
- (PACKET_DRATE_E_24 << CC115L_MDMCFG4_DRATE_E)),
+static const struct {
+ uint8_t mdmcfg4;
+ uint8_t deviatn;
+} packet_rate_setup[] = {
+ [AO_RADIO_RATE_38400] = {
+ .mdmcfg4 = ((0xf << 4) |
+ (PACKET_DRATE_E_384 << CC115L_MDMCFG4_DRATE_E)),
+ .deviatn = ((PACKET_DEV_E_384 << CC115L_DEVIATN_DEVIATION_E) |
+ (PACKET_DEV_M_384 << CC115L_DEVIATN_DEVIATION_M)),
+ },
+
+ [AO_RADIO_RATE_9600] = {
+ .mdmcfg4 = ((0xf << 4) |
+ (PACKET_DRATE_E_96 << CC115L_MDMCFG4_DRATE_E)),
+ .deviatn = ((PACKET_DEV_E_96 << CC115L_DEVIATN_DEVIATION_E) |
+ (PACKET_DEV_M_96 << CC115L_DEVIATN_DEVIATION_M)),
+ },
+
+ [AO_RADIO_RATE_2400] = {
+ .mdmcfg4 = ((0xf << 4) |
+ (PACKET_DRATE_E_24 << CC115L_MDMCFG4_DRATE_E)),
+ .deviatn = ((PACKET_DEV_E_24 << CC115L_DEVIATN_DEVIATION_E) |
+ (PACKET_DEV_M_24 << CC115L_DEVIATN_DEVIATION_M)),
+ },