softdevice: fix event handler
This commit is contained in:
parent
ca2f0920f9
commit
6ded078c91
@ -114,13 +114,13 @@ func (a *Adapter) Enable() error {
|
||||
}
|
||||
|
||||
func handleEvent() {
|
||||
handler := defaultAdapter.handler
|
||||
if handler == nil {
|
||||
return
|
||||
}
|
||||
id := eventBuf.header.evt_id
|
||||
switch {
|
||||
case id >= C.BLE_GAP_EVT_BASE && id <= C.BLE_GAP_EVT_LAST:
|
||||
handler := defaultAdapter.handler
|
||||
if handler == nil {
|
||||
return
|
||||
}
|
||||
gapEvent := GAPEvent{
|
||||
Connection: Connection(eventBuf.evt.unionfield_gap_evt().conn_handle),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user