when I use softDevice S110, there exists ble_evt_dispatch function, Can I define event ? if I can, how to define event and how to use event handler . Thank you !
when I use softDevice S110, there exists ble_evt_dispatch function, Can I define event ? if I can, how to define event and how to use event handler . Thank you !
The events come from the S110, and you can not define these events yourself.
To handle these event, set the handler function by calling softdevice_handler_set
if you are using the softdevice handler from the SDK. If you are not using the softdevice handler from the SDK you can handle these events by calling sd_ble_evt_get
directly.
Try to search for softdevice_ble_evt_handler_set();
. This is the function used in SDK 9 to register the ble_evt_dispatch()
event handler.
What do you mean exactly by "and the write characteristic operate will generate what events"? When you perform a write operation the GATT event "BLE_GATTS_EVT_WRITE" will be passed to ble_evt_dispatch()
Try to search for softdevice_ble_evt_handler_set();
. This is the function used in SDK 9 to register the ble_evt_dispatch()
event handler.
What do you mean exactly by "and the write characteristic operate will generate what events"? When you perform a write operation the GATT event "BLE_GATTS_EVT_WRITE" will be passed to ble_evt_dispatch()