Compare commits
3 Commits
9a472decf1
...
e9f50ca30b
Author | SHA1 | Date | |
---|---|---|---|
e9f50ca30b | |||
f04b461acb | |||
bd2a19e2a0 |
@ -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();
|
status = tls_bt_deinit();
|
||||||
|
|
||||||
if((status != BLE_HS_ENOERR) && (status != BLE_HS_EALREADY)) {
|
if((status != BLE_HS_ENOERR) && (status != BLE_HS_EALREADY)) {
|
||||||
@ -83,8 +86,8 @@ bool ble_modem_off(void)
|
|||||||
|
|
||||||
if(status != BLE_HS_EALREADY)
|
if(status != BLE_HS_EALREADY)
|
||||||
{
|
{
|
||||||
//Starting a wifi scan really stops the BT modem ?? Why ? I don't know
|
// Starting a wifi scan really stops the BT modem ?? Why ? I don't know
|
||||||
tls_wifi_scan();
|
tls_wifi_passive_scan();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ((status == BLE_HS_ENOERR || status == BLE_HS_EALREADY) && serviceStopSuccess) ? true : false;
|
return ((status == BLE_HS_ENOERR || status == BLE_HS_EALREADY) && serviceStopSuccess) ? true : false;
|
||||||
|
@ -96,6 +96,7 @@ ble_npl_eventq_deinit(struct ble_npl_eventq *evq)
|
|||||||
{
|
{
|
||||||
if(evq && evq->q) {
|
if(evq && evq->q) {
|
||||||
tls_os_queue_delete(evq->q);
|
tls_os_queue_delete(evq->q);
|
||||||
|
evq->q = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +248,11 @@ os_callout_timer_cb(void *ptmr, void *parg)
|
|||||||
struct ble_npl_callout *co;
|
struct ble_npl_callout *co;
|
||||||
co = (struct ble_npl_callout *)parg;
|
co = (struct ble_npl_callout *)parg;
|
||||||
|
|
||||||
if(co->evq) {
|
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);
|
ble_npl_eventq_put(co->evq, &co->ev);
|
||||||
} else {
|
} else {
|
||||||
co->ev.fn(&co->ev);
|
co->ev.fn(&co->ev);
|
||||||
|
Loading…
Reference in New Issue
Block a user