Functions are used in the driver.
Functions | |
cy_en_btipcdrv_status_t | Cy_BTIPC_Init (cy_stc_ipc_bt_context_t *btIpcContext, cy_stc_ipc_bt_config_t *btIpcConfig) |
This function initializes the Bluetooth IPC. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_WarmInit (cy_stc_ipc_bt_context_t *btIpcContext, cy_stc_ipc_bt_config_t *btIpcConfig) |
This function performs the warm initialization of the Bluetooth IPC. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_Deinit (cy_stc_ipc_bt_context_t *btIpcContext) |
This function de-initializes the Bluetooth IPC. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HCI_getPTI (cy_en_btipc_hcipti_t *pti, uint32_t *p_length, uint32_t *msgPtr) |
This function gets the payload type indicator and the length of the HCI packet received from BTSS. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HCI_Write (cy_stc_ipc_bt_context_t *btIpcContext, cy_en_btipc_hcipti_t pti, void *data, size_t length) |
This function sends the HCI packet form the BT stack to the BTSS. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HPC_Write (cy_stc_ipc_bt_context_t *btIpcContext, void *data, size_t length) |
This function sends the HPC packet form the MCU to the BTSS. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HCI_GetReadBufPtr (cy_stc_ipc_bt_context_t *btIpcContext, void **ppData, size_t *pLength) |
This function gets the pointer to the received HCI packet by MCU from BTSS. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HCI_GetWriteBufPtr (cy_stc_ipc_bt_context_t *btIpcContext, cy_en_btipc_hcipti_t pti, void **ppData, size_t length) |
This function gets the pointer to the buffer to write HCI packet to send to BTSS. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HPC_GetWriteBufPtr (cy_stc_ipc_bt_context_t *btIpcContext, void **ppData, size_t length) |
This function gets the pointer to the buffer to write HPC long message packet to send to BTSS. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HCI_RelChannel (cy_stc_ipc_bt_context_t *btIpcContext) |
This function releases the HCI channel after handling the notification from the BT SS. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HCI_RelBuffer (cy_stc_ipc_bt_context_t *btIpcContext, uint32_t *msgPtr) |
This function releases the HCI buffer after copying the data received from BTSS. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HPC_RelChannel (cy_stc_ipc_bt_context_t *btIpcContext, void *buf) |
This function releases the HPC channel after handling the notification from the BT SS. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HCI_RegisterCb (cy_stc_ipc_bt_context_t *btIpcContext, cy_ipc_bt_callback_ptr_t hciNotifyCallbackPtr) |
This function registers the callback for HCI message notifications from BT SS. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HCI_UnregisterCb (cy_stc_ipc_bt_context_t *btIpcContext) |
This function un-registers the callback function registered for HCI message notifications from BT SS. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HPC_RegisterCb (cy_stc_ipc_bt_context_t *btIpcContext, cy_stc_ipc_hcp_cb_t *pHpcNotifyCallbackParam) |
This function registers the callback for HPC message notifications from BT SS. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HPC_UnregisterCb (cy_stc_ipc_bt_context_t *btIpcContext, cy_stc_ipc_hcp_cb_t *pHpcNotifyCallbackParam) |
This function un-registers the callback function registered for HPC message notifications from BT SS. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_Buffer_RegisterCb (cy_stc_ipc_bt_context_t *btIpcContext, cy_ipc_bt_bufcallback_ptr_t bufCallbackPtr) |
This function registers the callback for buffer available notification. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_HCI_FIFOGet (cy_stc_ipc_bt_context_t *btIpcContext, uint32_t **ppMsg, uint8_t delete) |
This function is called to pull the IPC message from FIFO. More... | |
uint16_t | Cy_BTIPC_HCI_FIFOCount (cy_stc_ipc_bt_context_t *btIpcContext) |
This function is called to get the number of messages in the IPC FIFO. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_RetrieveContext (cy_stc_ipc_bt_context_t *btIpcContext, cy_stc_ipc_bt_save_ctxt_t *pContextRet) |
This function is called to retrieve the context to be saved during RAM off state. More... | |
cy_en_btipcdrv_status_t | Cy_BTIPC_RestoreContext (cy_stc_ipc_bt_context_t *btIpcContext, cy_stc_ipc_bt_save_ctxt_t *pContextRet) |
This function is called to restore the saved context during RAM off state. More... | |
cy_en_btipcdrv_status_t Cy_BTIPC_Init | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
cy_stc_ipc_bt_config_t * | btIpcConfig | ||
) |
This function initializes the Bluetooth IPC.
The IPC channels used for HCI and HPC packet exchange between MCU and BT SS are initialized.
btIpcConfig | This is the pointer to the bt ipc configuration structure. |
btIpcContext | This is the pointer to the bt ipc context structure. |
cy_en_btipcdrv_status_t Cy_BTIPC_WarmInit | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
cy_stc_ipc_bt_config_t * | btIpcConfig | ||
) |
This function performs the warm initialization of the Bluetooth IPC.
btIpcConfig | This is the pointer to the bt ipc configuration structure. |
btIpcContext | This is the pointer to the bt ipc context structure. |
cy_en_btipcdrv_status_t Cy_BTIPC_Deinit | ( | cy_stc_ipc_bt_context_t * | btIpcContext | ) |
This function de-initializes the Bluetooth IPC.
All the registered callbacks are deleted.
btIpcContext | This is the pointer to the bt ipc context structure. |
cy_en_btipcdrv_status_t Cy_BTIPC_HCI_getPTI | ( | cy_en_btipc_hcipti_t * | pti, |
uint32_t * | p_length, | ||
uint32_t * | msgPtr | ||
) |
This function gets the payload type indicator and the length of the HCI packet received from BTSS.
This function can be called to find out the type of HCI packet and allocate buffer of appropriate size to copy the packet data.
pti | This is the pointer to payload type indicator which is returned by the function. |
p_length | This is the pointer to the length of the payload filled by the function. |
msgPtr | This is the pointer to buffer which contains the IPC data received in DATA0 and DATA1 registers. |
cy_en_btipcdrv_status_t Cy_BTIPC_HCI_Write | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
cy_en_btipc_hcipti_t | pti, | ||
void * | data, | ||
size_t | length | ||
) |
This function sends the HCI packet form the BT stack to the BTSS.
pti | This is the HCI payload type indicator. |
data | This is the pointer to the buffer holding the HCI payload. |
length | This is the length of the HCI payload in number of bytes. |
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_HPC_Write | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
void * | data, | ||
size_t | length | ||
) |
This function sends the HPC packet form the MCU to the BTSS.
data | This is the pointer to the buffer holding the HPC payload. |
length | This is the length of the HPC payload in number of bytes. |
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_HCI_GetReadBufPtr | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
void ** | ppData, | ||
size_t * | pLength | ||
) |
This function gets the pointer to the received HCI packet by MCU from BTSS.
ppData | This is the pointer to the pointer of received HCI payload buffer |
pLength | This is the pointer to the size of the payload received in number of bytes |
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_HCI_GetWriteBufPtr | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
cy_en_btipc_hcipti_t | pti, | ||
void ** | ppData, | ||
size_t | length | ||
) |
This function gets the pointer to the buffer to write HCI packet to send to BTSS.
pti | This is the HCI payload type indicator. |
ppData | This is the pointer to the pointer of buffer to write HCI payload buffer |
length | This is the length of the HCI payload in number of bytes. |
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_HPC_GetWriteBufPtr | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
void ** | ppData, | ||
size_t | length | ||
) |
This function gets the pointer to the buffer to write HPC long message packet to send to BTSS.
ppData | This is the pointer to the pointer of buffer to write HPC long message payload buffer |
length | This is the length of the HPC payload in number of bytes. |
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_HCI_RelChannel | ( | cy_stc_ipc_bt_context_t * | btIpcContext | ) |
This function releases the HCI channel after handling the notification from the BT SS.
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_HCI_RelBuffer | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
uint32_t * | msgPtr | ||
) |
This function releases the HCI buffer after copying the data received from BTSS.
btIpcContext | This is the pointer to the bt ipc context structure |
msgPtr | This is the pointer to the IPC message received form BTSS |
cy_en_btipcdrv_status_t Cy_BTIPC_HPC_RelChannel | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
void * | buf | ||
) |
This function releases the HPC channel after handling the notification from the BT SS.
buf | This is the pointer to the buffer received from BT SS in DATA0 and DATA1 channel registers. |
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_HCI_RegisterCb | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
cy_ipc_bt_callback_ptr_t | hciNotifyCallbackPtr | ||
) |
This function registers the callback for HCI message notifications from BT SS.
hciNotifyCallbackPtr | This is the pointer to the function to be called for HCI notifications. |
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_HCI_UnregisterCb | ( | cy_stc_ipc_bt_context_t * | btIpcContext | ) |
This function un-registers the callback function registered for HCI message notifications from BT SS.
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_HPC_RegisterCb | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
cy_stc_ipc_hcp_cb_t * | pHpcNotifyCallbackParam | ||
) |
This function registers the callback for HPC message notifications from BT SS.
pHpcNotifyCallbackParam | This is the pointer to the function to be called for HPC notifications. |
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_HPC_UnregisterCb | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
cy_stc_ipc_hcp_cb_t * | pHpcNotifyCallbackParam | ||
) |
This function un-registers the callback function registered for HPC message notifications from BT SS.
pHpcNotifyCallbackParam | This is the pointer to the callback function to be un-registered. |
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_Buffer_RegisterCb | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
cy_ipc_bt_bufcallback_ptr_t | bufCallbackPtr | ||
) |
This function registers the callback for buffer available notification.
bufCallbackPtr | This is the pointer to the function to be called for buffer available notification. |
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_HCI_FIFOGet | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
uint32_t ** | ppMsg, | ||
uint8_t | delete | ||
) |
This function is called to pull the IPC message from FIFO.
ppMsg | This is the pointer to pointer the location in FIFO where the retrieved message is stored. |
delete | When set to 1, the entry from the FIFO is deleted after pulling it. |
btIpcContext | This is the pointer to the bt ipc context structure |
uint16_t Cy_BTIPC_HCI_FIFOCount | ( | cy_stc_ipc_bt_context_t * | btIpcContext | ) |
This function is called to get the number of messages in the IPC FIFO.
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_RetrieveContext | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
cy_stc_ipc_bt_save_ctxt_t * | pContextRet | ||
) |
This function is called to retrieve the context to be saved during RAM off state.
pContextRet | Pointer to the context to be retrieved. This will be updated by this function. |
btIpcContext | This is the pointer to the bt ipc context structure |
cy_en_btipcdrv_status_t Cy_BTIPC_RestoreContext | ( | cy_stc_ipc_bt_context_t * | btIpcContext, |
cy_stc_ipc_bt_save_ctxt_t * | pContextRet | ||
) |
This function is called to restore the saved context during RAM off state.
pContextRet | Pointer to the saved context structure to be restored |
btIpcContext | This is the pointer to the bt ipc context structure |