diff --git a/apps/bttester/src/btp_gap.c b/apps/bttester/src/btp_gap.c index 0b2239149..79ec5152f 100644 --- a/apps/bttester/src/btp_gap.c +++ b/apps/bttester/src/btp_gap.c @@ -1511,7 +1511,7 @@ gap_event_cb(struct ble_gap_event *event, void *arg) == REJECT_SUPERVISION_TIMEOUT) { return EINVAL; } - case BLE_GAP_EVENT_PARING_COMPLETE: + case BLE_GAP_EVENT_PAIRING_COMPLETE: console_printf("received pairing complete: " "conn_handle=%d status=%d\n", event->pairing_complete.conn_handle, diff --git a/nimble/host/include/host/ble_gap.h b/nimble/host/include/host/ble_gap.h index a8f6e3c54..271933963 100644 --- a/nimble/host/include/host/ble_gap.h +++ b/nimble/host/include/host/ble_gap.h @@ -247,7 +247,10 @@ struct hci_conn_update; #define BLE_GAP_EVENT_TRANSMIT_POWER 26 /** GAP event: Pairing complete */ -#define BLE_GAP_EVENT_PARING_COMPLETE 27 +#define BLE_GAP_EVENT_PAIRING_COMPLETE 27 + +/** GAP event: Pairing complete (deprecated) */ +#define BLE_GAP_EVENT_PARING_COMPLETE BLE_GAP_EVENT_PAIRING_COMPLETE /** GAP event: Subrate change */ #define BLE_GAP_EVENT_SUBRATE_CHANGE 28 @@ -1245,7 +1248,8 @@ struct ble_gap_event { * Represents a received Pairing Complete message * * Valid for the following event types: - * o BLE_GAP_EVENT_PARING_COMPLETE + * o BLE_GAP_EVENT_PAIRING_COMPLETE + * o BLE_GAP_EVENT_PARING_COMPLETE (deprecated) */ struct { /** diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c index eb4e6f601..85d7a9e4c 100644 --- a/nimble/host/src/ble_gap.c +++ b/nimble/host/src/ble_gap.c @@ -6382,7 +6382,7 @@ ble_gap_pairing_complete_event(uint16_t conn_handle, int status) struct ble_gap_event event; memset(&event, 0, sizeof event); - event.type = BLE_GAP_EVENT_PARING_COMPLETE; + event.type = BLE_GAP_EVENT_PAIRING_COMPLETE; event.pairing_complete.conn_handle = conn_handle; event.pairing_complete.status = status; ble_gap_call_conn_event_cb(&event, conn_handle);