} tSMP_OPCODE;
/* SMP event type */
+#define SMP_EVT_NONE 0 /* Default no event */
#define SMP_IO_CAP_REQ_EVT 1 /* IO capability request event */
#define SMP_SEC_REQUEST_EVT 2 /* SMP pairing request */
#define SMP_PASSKEY_NOTIF_EVT 3 /* passkey notification event */
break;
default:
+ LOG_ERROR("Unexpected event:%hhu", p_cb->cb_evt);
break;
}
smp_br_state_machine_event(p_cb, SMP_BR_KEYS_RSP_EVT, NULL);
break;
+
+ default:
+ LOG_ERROR("Unexpected event: %hhu", p_cb->cb_evt);
}
}
}
SMP_TRACE_DEBUG("%s: auth_req=0x%x", __func__, auth_req);
- p_cb->cb_evt = 0;
+ p_cb->cb_evt = SMP_EVT_NONE;
btm_ble_link_sec_check(p_cb->pairing_bda, auth_req, &sec_req_act);
/* clear the SMP_SEC_REQUEST_EVT event after get grant */
/* avoid generating duplicate pair request */
- smp_cb.cb_evt = 0;
+ smp_cb.cb_evt = SMP_EVT_NONE;
tSMP_INT_DATA smp_int_data;
smp_int_data.status = res;
smp_br_state_machine_event(&smp_cb, SMP_BR_API_SEC_GRANT_EVT,
return;
/* clear the SMP_SEC_REQUEST_EVT event after get grant */
/* avoid generate duplicate pair request */
- smp_cb.cb_evt = 0;
+ smp_cb.cb_evt = SMP_EVT_NONE;
tSMP_INT_DATA smp_int_data;
smp_int_data.status = res;
smp_sm_event(&smp_cb, SMP_API_SEC_GRANT_EVT, &smp_int_data);
uint8_t status;
uint8_t role;
uint16_t flags;
- uint8_t cb_evt;
+ tSMP_EVT cb_evt;
tSMP_SEC_LEVEL sec_level;
bool connect_initialized;
Octet16 confirm;