complete refactor AdaCallback to generic arguments

This commit is contained in:
hathach committed 2017-09-15 16:24:45 +07:00
1 parent 725cea11ff
commit 0101bcc8fc
7 files changed
+23 -64

No files matched your search

+2 -2
View File
@@ -151,7 +151,7 @@ void BLECentral::_event_handler(ble_evt_t* evt)
if ( Bluefruit.Gap.getRole(evt_conn_hdl) == BLE_GAP_ROLE_CENTRAL)
{
// Invoke callback
if ( _connect_cb) ada_callback_defer(NULL, _connect_cb, evt_conn_hdl);
if ( _connect_cb) ada_callback(NULL, _connect_cb, evt_conn_hdl);
}
break;
@@ -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_defer(NULL, _disconnect_cb, evt_conn_hdl, evt->evt.gap_evt.params.disconnected.reason);
if ( _disconnect_cb) ada_callback(NULL, _disconnect_cb, evt_conn_hdl, evt->evt.gap_evt.params.disconnected.reason);
}
break;