mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #15217 from LukaB/fix-STM32WL-radio-driver
Fix STM32 radio driver when bandwidth is 0pull/15223/head
commit
835b2741b4
|
@ -868,6 +868,10 @@ uint8_t STM32WL_LoRaRadio::get_fsk_bw_reg_val(uint32_t bandwidth)
|
|||
{
|
||||
uint8_t i;
|
||||
|
||||
if (bandwidth == 0) {
|
||||
return 0x1F;
|
||||
}
|
||||
|
||||
for (i = 0; i < (sizeof(fsk_bandwidths) / sizeof(fsk_bw_t)) - 1; i++) {
|
||||
if ((bandwidth >= fsk_bandwidths[i].bandwidth)
|
||||
&& (bandwidth < fsk_bandwidths[i + 1].bandwidth)) {
|
||||
|
|
Loading…
Reference in New Issue