refactor AdaCallback

- replace BLEGap connect_callback_t with adacb_1arg_t
- replace BLEGap disconnect_callback_t with adacb_2arg_t
This commit is contained in:
hathach committed 2017-09-15 02:44:34 +07:00
1 parent a8496fcaf1
commit 725cea11ff
4 files changed
+2 -11

No files matched your search

+1 -1
View File
@@ -159,7 +159,7 @@ void BLECentral::_event_handler(ble_evt_t* evt)
if ( Bluefruit.Gap.getRole(evt_conn_hdl) == BLE_GAP_ROLE_CENTRAL)
{
// Invoke callback
if ( _disconnect_cb) ada_callback(NULL, _disconnect_cb, evt_conn_hdl);
if ( _disconnect_cb) ada_callback_defer(NULL, _disconnect_cb, evt_conn_hdl, evt->evt.gap_evt.params.disconnected.reason);
}
break;