diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-12-10 21:04:46 -0500 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2019-12-10 21:04:46 -0500 |
| commit | 68ae47907c076a966a533d90371acf65ae9875c8 (patch) | |
| tree | dce1b21bbbf658e596dd27da3ce6b8e9fa14fdd4 /ports/nrf/bluetooth | |
| parent | 013c84086288141696e4c09250c61b6f2dbdf4d2 (diff) | |
| parent | 024ba978ec909d39d411a74b443d2ffa20250fa6 (diff) | |
merge from upstream
Diffstat (limited to 'ports/nrf/bluetooth')
| -rw-r--r-- | ports/nrf/bluetooth/ble_drv.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ports/nrf/bluetooth/ble_drv.c b/ports/nrf/bluetooth/ble_drv.c index 16475e4b3..63d67a7f4 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,11 @@ void SD_EVT_IRQHandler(void) { done = it->func(event, it->param) || done; it = it->next; } - if (!done) { - //mp_printf(&mp_plat_print, "Unhandled ble event: 0x%04x\n", event->header.evt_id); + #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); } + #endif } } |
