mirror of https://github.com/ARMmbed/mbed-os.git
Allow LoRaWAN STM32WL driver debug led to be inverted (#14910)
parent
3d362641fb
commit
d13aaf408c
|
@ -115,11 +115,11 @@ const float lora_symbol_time[3][6] = {{ 32.768, 16.384, 8.192, 4.096, 2.048, 1.0
|
||||||
|
|
||||||
|
|
||||||
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_RX
|
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_RX
|
||||||
static DigitalOut _rf_dbg_rx(MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_RX, 0);
|
static DigitalOut _rf_dbg_rx(MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_RX, MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_INVERT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_TX
|
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_TX
|
||||||
static DigitalOut _rf_dbg_tx(MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_TX, 0);
|
static DigitalOut _rf_dbg_tx(MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_TX, MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_INVERT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ void STM32WL_LoRaRadio::HAL_SUBGHZ_TxCpltCallback(void)
|
||||||
|
|
||||||
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_TX
|
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_TX
|
||||||
/* Reset TX DBG pin */
|
/* Reset TX DBG pin */
|
||||||
_rf_dbg_tx = 0;
|
_rf_dbg_tx = MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_INVERT;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ void STM32WL_LoRaRadio::HAL_SUBGHZ_RxCpltCallback(void)
|
||||||
|
|
||||||
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_RX
|
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_RX
|
||||||
/* Reset RX DBG pin */
|
/* Reset RX DBG pin */
|
||||||
_rf_dbg_rx = 0;
|
_rf_dbg_rx = MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_INVERT;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -360,7 +360,7 @@ void STM32WL_LoRaRadio::HAL_SUBGHZ_RxTxTimeoutCallback(void)
|
||||||
|
|
||||||
#if MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_TX
|
#if MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_TX
|
||||||
/* Reset TX DBG pin */
|
/* Reset TX DBG pin */
|
||||||
_rf_dbg_tx = 0;
|
_rf_dbg_tx = MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_INVERT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} else if ((_radio_events && _radio_events->rx_timeout) && (_operating_mode == MODE_RX)) {
|
} else if ((_radio_events && _radio_events->rx_timeout) && (_operating_mode == MODE_RX)) {
|
||||||
|
@ -368,7 +368,7 @@ void STM32WL_LoRaRadio::HAL_SUBGHZ_RxTxTimeoutCallback(void)
|
||||||
|
|
||||||
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_RX
|
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_RX
|
||||||
/* Reset RX DBG pin */
|
/* Reset RX DBG pin */
|
||||||
_rf_dbg_rx = 0;
|
_rf_dbg_rx = MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_INVERT;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1079,7 +1079,7 @@ void STM32WL_LoRaRadio::send(uint8_t *buffer, uint8_t size)
|
||||||
|
|
||||||
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_TX
|
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_TX
|
||||||
/* Set TX DBG pin */
|
/* Set TX DBG pin */
|
||||||
_rf_dbg_tx = 1;
|
_rf_dbg_tx = !MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_INVERT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set RF switch */
|
/* Set RF switch */
|
||||||
|
@ -1137,7 +1137,7 @@ void STM32WL_LoRaRadio::receive(void)
|
||||||
|
|
||||||
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_RX
|
#ifdef MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_RX
|
||||||
/* Set RX DBG pin */
|
/* Set RX DBG pin */
|
||||||
_rf_dbg_rx = 1;
|
_rf_dbg_rx = !MBED_CONF_STM32WL_LORA_DRIVER_DEBUG_INVERT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* RF switch configuration */
|
/* RF switch configuration */
|
||||||
|
|
|
@ -47,6 +47,10 @@
|
||||||
},
|
},
|
||||||
"debug_tx": {
|
"debug_tx": {
|
||||||
"help": "GPIO pin for TX debug"
|
"help": "GPIO pin for TX debug"
|
||||||
|
},
|
||||||
|
"debug_invert": {
|
||||||
|
"help": "invert levels of the debug_rx and debug_tx pins. Default: 0 standard, 1 invert",
|
||||||
|
"value" : 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"target_overrides": {
|
"target_overrides": {
|
||||||
|
|
Loading…
Reference in New Issue