summaryrefslogtreecommitdiff
path: root/ports/nrf/bluetooth
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2019-11-22 16:33:48 -0800
committerScott Shawcroft <scott@tannewt.org>2019-12-04 14:39:02 -0800
commit17c8356b8c06ac160bf9fad6b6b4b8b1095d8dcd (patch)
treee5ea5b202c9d4647cce9a8e07819f35b4297e9b9 /ports/nrf/bluetooth
parent19dc219ff76ed448a80921cf407c9312277147d7 (diff)
Add connection interval and debugging
This also sets TinyUSB to master and to not include its submodules. It also fixes an old displayio example comment and retries gattc reads.
Diffstat (limited to 'ports/nrf/bluetooth')
-rw-r--r--ports/nrf/bluetooth/ble_drv.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/ports/nrf/bluetooth/ble_drv.c b/ports/nrf/bluetooth/ble_drv.c
index 16475e4b3..896fa0fb0 100644
--- a/ports/nrf/bluetooth/ble_drv.c
+++ b/ports/nrf/bluetooth/ble_drv.c
@@ -134,6 +134,9 @@ void SD_EVT_IRQHandler(void) {
}
ble_evt_t* event = (ble_evt_t *)m_ble_evt_buf;
+ #if CIRCUITPY_VERBOSE_BLE
+ mp_printf(&mp_plat_print, "BLE event: 0x%04x\n", event->header.evt_id);
+ #endif
if (supervisor_bluetooth_hook(event)) {
continue;
@@ -145,8 +148,15 @@ void SD_EVT_IRQHandler(void) {
done = it->func(event, it->param) || done;
it = it->next;
}
+ #if CIRCUITPY_VERBOSE_BLE
+ if (event->header.evt_id == BLE_GATTS_EVT_WRITE) {
+ ble_gatts_evt_write_t* write_evt = &event->evt.gatts_evt.params.write;
+ mp_printf(&mp_plat_print, "Write to: UUID(0x%04x) handle %x of length %d auth %x\n", write_evt->uuid.uuid, write_evt->handle, write_evt->len, write_evt->auth_required);
+ }
if (!done) {
- //mp_printf(&mp_plat_print, "Unhandled ble event: 0x%04x\n", event->header.evt_id);
+ mp_printf(&mp_plat_print, "Unhandled ble event: 0x%04x\n", event->header.evt_id);
+
}
+ #endif
}
}