Compare commits

...

3 Commits

3 changed files with 12 additions and 4 deletions

View File

@ -75,6 +75,9 @@ bool ble_modem_off(void)
}
};
// Don't forget to set the rf bt mode to it's default config
tls_rf_bt_mode(false);
status = tls_bt_deinit();
if((status != BLE_HS_ENOERR) && (status != BLE_HS_EALREADY)) {
@ -83,8 +86,8 @@ bool ble_modem_off(void)
if(status != BLE_HS_EALREADY)
{
//Starting a wifi scan really stops the BT modem ?? Why ? I don't know
tls_wifi_scan();
// Starting a wifi scan really stops the BT modem ?? Why ? I don't know
tls_wifi_passive_scan();
}
return ((status == BLE_HS_ENOERR || status == BLE_HS_EALREADY) && serviceStopSuccess) ? true : false;

View File

@ -96,6 +96,7 @@ ble_npl_eventq_deinit(struct ble_npl_eventq *evq)
{
if(evq && evq->q) {
tls_os_queue_delete(evq->q);
evq->q = NULL;
}
}

View File

@ -248,8 +248,12 @@ os_callout_timer_cb(void *ptmr, void *parg)
struct ble_npl_callout *co;
co = (struct ble_npl_callout *)parg;
if(co->evq) {
ble_npl_eventq_put(co->evq, &co->ev);
if(co->evq)
{
/* In some cases, the event queue g_eventq_dflt is already
deleted when this callback is called raising an issue ! */
if(co->evq->q)
ble_npl_eventq_put(co->evq, &co->ev);
} else {
co->ev.fn(&co->ev);
}