API exposes BLE interrupt notifications to the application which indicates a different link layer and radio state transitions to the user from the BLESS interrupt context.
The user registers for a particular type of a callback and the PSoC 6 BLE Middleware will call that registered callback basing on the registered mask. Refer to section BLE Interrupt Notification Callback.
Functions | |
cy_en_ble_api_result_t | Cy_BLE_RegisterInterruptCallback (uint32_t intrMask, cy_ble_intr_callback_t CallBack) |
This function registers a callback to expose BLE interrupt notifications to an application that indicates a different link layer and radio state transition to the user from the BLESS interrupt context. More... | |
cy_en_ble_api_result_t | Cy_BLE_UnRegisterInterruptCallback (void) |
This function un-registers the callback that exposed BLE interrupt notifications to the application. More... | |
cy_en_ble_api_result_t | Cy_BLE_ConfigureIpcForInterruptCallback (uint32_t ipcChan, uint32_t ipcIntr, uint32_t ipcIntrPrior) |
This function configures IPC channel for BLE interrupt notifications feature, when BLE is operating in BLE dual CPU mode. More... | |
void | Cy_BLE_IntrNotifyIsrHandler (void) |
This function sends notification (with interrupt type information) to user callback for the BLE interrupts subscribed by user. More... | |
cy_en_ble_api_result_t Cy_BLE_RegisterInterruptCallback | ( | uint32_t | intrMask, |
cy_ble_intr_callback_t | CallBack | ||
) |
This function registers a callback to expose BLE interrupt notifications to an application that indicates a different link layer and radio state transition to the user from the BLESS interrupt context.
This callback is triggered at the beginning of a received BLESS interrupt (based on the registered interrupt mask).
An application can use an interrupt callback to know when:
These BLESS real-time states can be used to synchronize an application with the BLESS or prevent radio interference with other peripherals, etc.
BLE dual CPU mode requires an additional configuration IPC channel and IPC Interrupt structure to send notifications from the controller core to Host core. Refer to Cy_BLE_ConfigureIpcForInterruptCallback() for details.
intrMask | All interrupts masks are specified in the cy_en_ble_interrupt_callback_feature_t enumeration. |
CallBack | The pointer to an application notify callback. |
Errors codes | Description |
---|---|
CY_BLE_SUCCESS | The callback is registered successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameters failed. |
cy_en_ble_api_result_t Cy_BLE_UnRegisterInterruptCallback | ( | void | ) |
This function un-registers the callback that exposed BLE interrupt notifications to the application.
Errors codes | Description |
---|---|
CY_BLE_SUCCESS | The callback registered successfully. |
CY_BLE_ERROR_INVALID_OPERATION | The IPC channel is busy (BLE dual CPU mode only). |
cy_en_ble_api_result_t Cy_BLE_ConfigureIpcForInterruptCallback | ( | uint32_t | ipcChan, |
uint32_t | ipcIntr, | ||
uint32_t | ipcIntrPrior | ||
) |
This function configures IPC channel for BLE interrupt notifications feature, when BLE is operating in BLE dual CPU mode.
This function must be called only on the Host CPU core.
ipcChan | IPC channel. Valid range: 9..15 |
ipcIntr | IPC Interrupt structure. Valid range: 9..15 |
ipcIntrPrior | IPC Interrupt priority. Valid range: 0..7 |
Errors codes | Description |
---|---|
CY_BLE_SUCCESS | The callback is registered successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameters failed. |
CY_BLE_ERROR_INVALID_OPERATION | The IPC channel is busy (BLE dual CPU mode only). |
void Cy_BLE_IntrNotifyIsrHandler | ( | void | ) |
This function sends notification (with interrupt type information) to user callback for the BLE interrupts subscribed by user.
The list of supported interrupts described in the enumeration cy_en_ble_interrupt_callback_feature_t. Cy_BLE_RegisterInterruptCallback() API used to register callback for receiving the BLE interrupts.
This function must be called inside the user-defined BLESS interrupt service routine (ISR) if user uses Interrupt Notifications Feature.
Updates the firmware and hardware to exit sleep mode, when called from the interrupt mode, after checking the state machine.