Functions are used in the driver.
Functions | |
void | Cy_IPC_Pipe_EndpointInit (uint32_t epAddr, cy_ipc_pipe_callback_array_ptr_t cbArray, uint32_t cbCnt, uint32_t epConfig, cy_stc_sysint_t const *epInterrupt) |
This function initializes the endpoint of a pipe for the current CPU. More... | |
cy_en_ipc_pipe_status_t | Cy_IPC_Pipe_SendMessage (uint32_t toAddr, uint32_t fromAddr, void *msgPtr, cy_ipc_pipe_relcallback_ptr_t callBackPtr) |
This function is used to send a message from one endpoint to another. More... | |
cy_en_ipc_pipe_status_t | Cy_IPC_Pipe_RegisterCallback (uint32_t epAddr, cy_ipc_pipe_callback_ptr_t callBackPtr, uint32_t clientId) |
This function registers a callback that is called when a message is received on a pipe. More... | |
void | Cy_IPC_Pipe_ExecuteCallback (uint32_t epAddr) |
This function is called by the ISR for a given pipe endpoint to dispatch the appropriate callback function based on the client ID for that endpoint. More... | |
void | Cy_IPC_Pipe_RegisterCallbackRel (uint32_t epAddr, cy_ipc_pipe_relcallback_ptr_t callBackPtr) |
This function registers a default callback if a release interrupt is generated but the current release callback function is null. More... | |
void | Cy_IPC_Pipe_Config (cy_stc_ipc_pipe_ep_t *theEpArray) |
This function stores a copy of a pointer to the array of endpoints. More... | |
void | Cy_IPC_Pipe_Init (cy_stc_ipc_pipe_config_t const *config) |
Initializes the system pipes. More... | |
cy_en_ipc_pipe_status_t | Cy_IPC_Pipe_EndpointPause (uint32_t epAddr) |
This function sets the receiver endpoint to paused state. More... | |
cy_en_ipc_pipe_status_t | Cy_IPC_Pipe_EndpointResume (uint32_t epAddr) |
This function sets the receiver endpoint to active state. More... | |
void | Cy_IPC_Pipe_ExecCallback (cy_stc_ipc_pipe_ep_t *endpoint) |
This function is called by the ISR for a given pipe endpoint to dispatch the appropriate callback function based on the client ID for that endpoint. More... | |
void Cy_IPC_Pipe_EndpointInit | ( | uint32_t | epAddr, |
cy_ipc_pipe_callback_array_ptr_t | cbArray, | ||
uint32_t | cbCnt, | ||
uint32_t | epConfig, | ||
cy_stc_sysint_t const * | epInterrupt | ||
) |
This function initializes the endpoint of a pipe for the current CPU.
The current CPU is the CPU that is executing the code. An endpoint of a pipe is for the IPC channel that receives a message for the current CPU.
After this function is called, the callbackArray needs to be populated with the callback functions for that endpoint using the Cy_IPC_Pipe_RegisterCallback() function.
epAddr | This parameter is the address (or index in the array of endpoint structures) that designates the endpoint you want to initialize. |
cbArray | This is a pointer to the callback function array. Based on the client ID, one of the functions in this array is called to process the message. |
cbCnt | This is the size of the callback array, or the number of defined clients. |
epConfig | This value defines the IPC channel, IPC interrupt number, and the interrupt mask for the entire pipe. The format of the endpoint configuration Bits[31:16] Interrupt Mask Bits[15:8 ] IPC interrupt Bits[ 7:0 ] IPC channel |
epInterrupt | This is a pointer to the endpoint interrupt description structure. |
cy_en_ipc_pipe_status_t Cy_IPC_Pipe_SendMessage | ( | uint32_t | toAddr, |
uint32_t | fromAddr, | ||
void * | msgPtr, | ||
cy_ipc_pipe_relcallback_ptr_t | callBackPtr | ||
) |
This function is used to send a message from one endpoint to another.
It generates an interrupt on the endpoint that receives the message and a release interrupt to the sender to acknowledge the message has been processed.
toAddr | This parameter is the address (or index in the array of endpoint structures) of the endpoint to which you are sending the message. |
fromAddr | This parameter is the address (or index in the array of endpoint structures) of the endpoint from which the message is being sent. |
msgPtr | Pointer to the message structure to be sent. |
callBackPtr | Pointer to the Release callback function. |
cy_en_ipc_pipe_status_t Cy_IPC_Pipe_RegisterCallback | ( | uint32_t | epAddr, |
cy_ipc_pipe_callback_ptr_t | callBackPtr, | ||
uint32_t | clientId | ||
) |
This function registers a callback that is called when a message is received on a pipe.
The client_ID is the same as the index of the callback function array. The callback may be a real function pointer or NULL if no callback is required.
epAddr | This parameter is the address (or index in the array of endpoint structures) that designates the endpoint to which you want to add callback functions. |
callBackPtr | Pointer to the callback function called when the endpoint has received a message. If this parameters is NULL current callback will be unregistered. |
clientId | The index in the callback array (Client ID) where the function pointer is saved. |
void Cy_IPC_Pipe_ExecuteCallback | ( | uint32_t | epAddr | ) |
This function is called by the ISR for a given pipe endpoint to dispatch the appropriate callback function based on the client ID for that endpoint.
epAddr | This parameter is the address (or index in the array of endpoint structures) that designates the endpoint to process. |
void Cy_IPC_Pipe_RegisterCallbackRel | ( | uint32_t | epAddr, |
cy_ipc_pipe_relcallback_ptr_t | callBackPtr | ||
) |
This function registers a default callback if a release interrupt is generated but the current release callback function is null.
epAddr | This parameter is the address (or index in the array of endpoint structures) that designates the endpoint to which you want to add a release callback function. |
callBackPtr | Pointer to the callback executed when the endpoint has received a message. If this parameters is NULL current callback will be unregistered. |
void Cy_IPC_Pipe_Config | ( | cy_stc_ipc_pipe_ep_t * | theEpArray | ) |
This function stores a copy of a pointer to the array of endpoints.
All access to endpoints will be via the index of the endpoint in this array.
theEpArray | This is the pointer to an array of endpoint structures that the designer created and will be used to reference all endpoints. |
void Cy_IPC_Pipe_Init | ( | cy_stc_ipc_pipe_config_t const * | config | ) |
Initializes the system pipes.
The system pipes are used by BLE.
config | This is the pointer to the pipe configuration structure |
cy_en_ipc_pipe_status_t Cy_IPC_Pipe_EndpointPause | ( | uint32_t | epAddr | ) |
This function sets the receiver endpoint to paused state.
epAddr | This parameter is the address (or index in the array of endpoint structures) that designates the endpoint to pause. |
cy_en_ipc_pipe_status_t Cy_IPC_Pipe_EndpointResume | ( | uint32_t | epAddr | ) |
This function sets the receiver endpoint to active state.
epAddr | This parameter is the address (or index in the array of endpoint structures) that designates the endpoint to resume. |
void Cy_IPC_Pipe_ExecCallback | ( | cy_stc_ipc_pipe_ep_t * | endpoint | ) |
This function is called by the ISR for a given pipe endpoint to dispatch the appropriate callback function based on the client ID for that endpoint.
endpoint | Pointer to endpoint structure. |