Functions are used in the driver.
Functions | |
__STATIC_INLINE IPC_STRUCT_Type * | Cy_IPC_Drv_GetIpcBaseAddress (uint32_t ipcIndex) |
This function takes an IPC channel index as a parameter and returns the base address the IPC registers corresponding to the IPC channel. More... | |
__STATIC_INLINE IPC_INTR_STRUCT_Type * | Cy_IPC_Drv_GetIntrBaseAddr (uint32_t ipcIntrIndex) |
This function takes an IPC interrupt structure index and returns the base address of the IPC interrupt registers corresponding to the IPC Interrupt. More... | |
__STATIC_INLINE void | Cy_IPC_Drv_AcquireNotify (IPC_STRUCT_Type *base, uint32_t notifyEventIntr) |
The function generates a acquire notification event by IPC interrupt structure. More... | |
__STATIC_INLINE void | Cy_IPC_Drv_ReleaseNotify (IPC_STRUCT_Type *base, uint32_t notifyEventIntr) |
The function generates a release notification event by IPC interrupt structure. More... | |
__STATIC_INLINE cy_en_ipcdrv_status_t | Cy_IPC_Drv_LockAcquire (IPC_STRUCT_Type const *base) |
This function is used to acquire the IPC channel. More... | |
cy_en_ipcdrv_status_t | Cy_IPC_Drv_LockRelease (IPC_STRUCT_Type *base, uint32_t releaseEventIntr) |
The function is used to release an IPC channel from the locked state. More... | |
__STATIC_INLINE bool | Cy_IPC_Drv_IsLockAcquired (IPC_STRUCT_Type const *base) |
The function is used to test the status of an IPC channel. More... | |
__STATIC_INLINE uint32_t | Cy_IPC_Drv_GetLockStatus (IPC_STRUCT_Type const *base) |
The function is used to get the status of an IPC channel. More... | |
cy_en_ipcdrv_status_t | Cy_IPC_Drv_SendMsgWord (IPC_STRUCT_Type *base, uint32_t notifyEventIntr, uint32_t message) |
This function is used to send a 32-bit word message through an IPC channel. More... | |
cy_en_ipcdrv_status_t | Cy_IPC_Drv_ReadMsgWord (IPC_STRUCT_Type const *base, uint32_t *message) |
This function is used to read a 32-bit word message through an IPC channel. More... | |
cy_en_ipcdrv_status_t | Cy_IPC_Drv_SendMsgDWord (IPC_STRUCT_Type *base, uint32_t notifyEventIntr, uint32_t *message) |
This function is used to send two 32-bit word message through an IPC channel. More... | |
cy_en_ipcdrv_status_t | Cy_IPC_Drv_ReadMsgDWord (IPC_STRUCT_Type const *base, uint32_t *message) |
This function is used to read two 32-bit word message through an IPC channel. More... | |
__STATIC_INLINE cy_en_ipcdrv_status_t | Cy_IPC_Drv_SendMsgPtr (IPC_STRUCT_Type *base, uint32_t notifyEventIntr, void const *msgPtr) |
This function is used to send a message pointer through an IPC channel. More... | |
__STATIC_INLINE cy_en_ipcdrv_status_t | Cy_IPC_Drv_ReadMsgPtr (IPC_STRUCT_Type const *base, void **msgPtr) |
This function is used to read a 32-bit pointer message through an IPC channel. More... | |
__STATIC_INLINE void | Cy_IPC_Drv_SetInterruptMask (IPC_INTR_STRUCT_Type *base, uint32_t ipcReleaseMask, uint32_t ipcNotifyMask) |
This function is used to set the interrupt mask for an IPC Interrupt. More... | |
__STATIC_INLINE uint32_t | Cy_IPC_Drv_GetInterruptMask (IPC_INTR_STRUCT_Type const *base) |
This function is used to read the interrupt mask. More... | |
__STATIC_INLINE uint32_t | Cy_IPC_Drv_GetInterruptStatusMasked (IPC_INTR_STRUCT_Type const *base) |
This function is used to read the active unmasked interrupt. More... | |
__STATIC_INLINE uint32_t | Cy_IPC_Drv_GetInterruptStatus (IPC_INTR_STRUCT_Type const *base) |
This function is used to read the pending interrupts. More... | |
__STATIC_INLINE void | Cy_IPC_Drv_SetInterrupt (IPC_INTR_STRUCT_Type *base, uint32_t ipcReleaseMask, uint32_t ipcNotifyMask) |
This function is used to set the interrupt source. More... | |
__STATIC_INLINE void | Cy_IPC_Drv_ClearInterrupt (IPC_INTR_STRUCT_Type *base, uint32_t ipcReleaseMask, uint32_t ipcNotifyMask) |
This function is used to clear the interrupt source. More... | |
__STATIC_INLINE IPC_STRUCT_Type * Cy_IPC_Drv_GetIpcBaseAddress | ( | uint32_t | ipcIndex | ) |
This function takes an IPC channel index as a parameter and returns the base address the IPC registers corresponding to the IPC channel.
ipcIndex | Represents the number of IPC structure. This is converted to the base address of the IPC channel registers. This comprises of total number of channels present in all IPC IP instances. |
__STATIC_INLINE IPC_INTR_STRUCT_Type * Cy_IPC_Drv_GetIntrBaseAddr | ( | uint32_t | ipcIntrIndex | ) |
This function takes an IPC interrupt structure index and returns the base address of the IPC interrupt registers corresponding to the IPC Interrupt.
ipcIntrIndex | Represents the number of IPC interrupt structure. This is converted to the base address of the IPC interrupt registers. This comprises of total number of channels present in all IPC IP instances. |
__STATIC_INLINE void Cy_IPC_Drv_AcquireNotify | ( | IPC_STRUCT_Type * | base, |
uint32_t | notifyEventIntr | ||
) |
The function generates a acquire notification event by IPC interrupt structure.
base | This parameter is a handle that represents the base address of the registers of the IPC channel. The parameter is generally returned from a call to the Cy_IPC_Drv_GetIpcBaseAddress. |
notifyEventIntr | Bit encoded list of IPC interrupt structures that are triggered by a notification. Bit number correspond to number of the IPC interrupt structure. In case of devices having multiple IPC IP instances, this comprises of all IPC interrupts associated with only particular IPC IP. |
__STATIC_INLINE void Cy_IPC_Drv_ReleaseNotify | ( | IPC_STRUCT_Type * | base, |
uint32_t | notifyEventIntr | ||
) |
The function generates a release notification event by IPC interrupt structure.
base | This parameter is a handle that represents the base address of the registers of the IPC channel. The parameter is generally returned from a call to the Cy_IPC_Drv_GetIpcBaseAddress. |
notifyEventIntr | Bit encoded list of IPC interrupt lines that are triggered by a notification. In case of devices having multiple IPC IP instances, this comprises of all IPC interrupts associated with only particular IPC IP. |
__STATIC_INLINE cy_en_ipcdrv_status_t Cy_IPC_Drv_LockAcquire | ( | IPC_STRUCT_Type const * | base | ) |
This function is used to acquire the IPC channel.
base | This parameter is a handle that represents the base address of the registers of the IPC channel. The parameter is generally returned from a call to the Cy_IPC_Drv_GetIpcBaseAddress |
CY_IPC_DRV_SUCCESS | The IPC was successfully acquired |
CY_IPC_DRV_ERROR | The IPC was not acquired because it was already acquired by another master |
cy_en_ipcdrv_status_t Cy_IPC_Drv_LockRelease | ( | IPC_STRUCT_Type * | base, |
uint32_t | releaseEventIntr | ||
) |
The function is used to release an IPC channel from the locked state.
The function also has a way to specify through a parameter which IPC interrupts must be notified during the release event.
base | This parameter is a handle that represents the base address of the registers of the IPC channel. The parameter is generally returned from a call to the Cy_IPC_Drv_GetIpcBaseAddress. |
releaseEventIntr | Bit encoded list of IPC interrupt lines that are triggered by a release event. In case of devices having multiple IPC IP instances, this comprises of all IPC interrupts associated with only particular IPC IP. |
CY_IPC_DRV_SUCCESS | The function executed successfully and the IPC channel was released. |
CY_IPC_DRV_ERROR | The IPC channel was not acquired before the function call. |
__STATIC_INLINE bool Cy_IPC_Drv_IsLockAcquired | ( | IPC_STRUCT_Type const * | base | ) |
The function is used to test the status of an IPC channel.
The function tells the reader if the IPC channel was in the locked or released state.
base | This parameter is a handle that represents the base address of the registers of the IPC channel. The parameter is generally returned from a call to the Cy_IPC_Drv_GetIpcBaseAddress. |
__STATIC_INLINE uint32_t Cy_IPC_Drv_GetLockStatus | ( | IPC_STRUCT_Type const * | base | ) |
The function is used to get the status of an IPC channel.
base | This parameter is a handle that represents the base address of the registers of the IPC channel. The parameter is generally returned from a call to the Cy_IPC_Drv_GetIpcBaseAddress. |
cy_en_ipcdrv_status_t Cy_IPC_Drv_SendMsgWord | ( | IPC_STRUCT_Type * | base, |
uint32_t | notifyEventIntr, | ||
uint32_t | message | ||
) |
This function is used to send a 32-bit word message through an IPC channel.
The function also has an associated notification field that will let the message notify one or multiple IPC interrupts. The IPC channel is locked and remains locked after the function returns. The receiver of the message should release the channel.
base | This parameter is a handle that represents the base address of the registers of the IPC channel. The parameter is generally returned from a call to the Cy_IPC_Drv_GetIpcBaseAddress. |
notifyEventIntr | Bit encoded list of IPC interrupt lines that are triggered by a notification. In case of devices having multiple IPC IP instances, this comprises of all IPC interrupts associated with only particular IPC IP. |
message | The message word that is the data placed in the IPC data register. |
CY_IPC_DRV_SUCCESS | The send operation was successful. |
CY_IPC_DRV_ERROR | The IPC channel is unavailable because it is already locked. |
cy_en_ipcdrv_status_t Cy_IPC_Drv_ReadMsgWord | ( | IPC_STRUCT_Type const * | base, |
uint32_t * | message | ||
) |
This function is used to read a 32-bit word message through an IPC channel.
This function assumes that the channel is locked (for a valid message). If the channel is not locked, the message is invalid. The user must call Cy_IPC_Drv_Release() function after reading the message to release the IPC channel.
base | This parameter is a handle that represents the base address of the registers of the IPC channel. The parameter is generally returned from a call to the Cy_IPC_Drv_GetIpcBaseAddress. |
message | A variable where the read data is copied. |
CY_IPC_DRV_SUCCESS | The function executed successfully and the IPC was acquired. |
CY_IPC_DRV_ERROR | The function encountered an error because the IPC channel was already in a released state, meaning the data may be invalid. |
cy_en_ipcdrv_status_t Cy_IPC_Drv_SendMsgDWord | ( | IPC_STRUCT_Type * | base, |
uint32_t | notifyEventIntr, | ||
uint32_t * | message | ||
) |
This function is used to send two 32-bit word message through an IPC channel.
The function also has an associated notification field that will let the message notify one or multiple IPC interrupts. The IPC channel is locked and remains locked after the function returns. The receiver of the message should release the channel.
base | This parameter is a handle that represents the base address of the registers of the IPC channel. The parameter is generally returned from a call to the Cy_IPC_Drv_GetIpcBaseAddress. |
notifyEventIntr | Bit encoded list of IPC interrupt lines that are triggered by a notification. In case of devices having multiple IPC IP instances, this comprises of all IPC interrupts associated with only particular IPC IP. |
message | The message word that is the data placed in the IPC data register. |
CY_IPC_DRV_SUCCESS | The send operation was successful. |
CY_IPC_DRV_ERROR | The IPC channel is unavailable because it is already locked. |
cy_en_ipcdrv_status_t Cy_IPC_Drv_ReadMsgDWord | ( | IPC_STRUCT_Type const * | base, |
uint32_t * | message | ||
) |
This function is used to read two 32-bit word message through an IPC channel.
This function assumes that the channel is locked (for a valid message). If the channel is not locked, the message is invalid. The user must call Cy_IPC_Drv_Release() function after reading the message to release the IPC channel.
base | This parameter is a handle that represents the base address of the registers of the IPC channel. The parameter is generally returned from a call to the Cy_IPC_Drv_GetIpcBaseAddress. |
message | A variable where the read data is copied. |
CY_IPC_DRV_SUCCESS | The function executed successfully and the IPC was acquired. |
CY_IPC_DRV_ERROR | The function encountered an error because the IPC channel was already in a released state, meaning the data may be invalid. |
__STATIC_INLINE cy_en_ipcdrv_status_t Cy_IPC_Drv_SendMsgPtr | ( | IPC_STRUCT_Type * | base, |
uint32_t | notifyEventIntr, | ||
void const * | msgPtr | ||
) |
This function is used to send a message pointer through an IPC channel.
The message structure may hold a generic pointer that may contain the address of any user data type or structure. This parameter could be a pointer to a 32-bit integer, an array, or even a data structure defined in the user code. This function acts as a transfer engine for sending the pointer. Any memory management of the pointer allocation and deallocation is up to the application code. The function also has an associated notification field that will let the message notify one or multiple interrupts.
base | This parameter is a handle that represents the base address of the registers of the IPC channel. The parameter is generally returned from a call to the Cy_IPC_Drv_GetIpcBaseAddress. |
notifyEventIntr | Bit encoded list of IPC interrupt lines that are triggered during the release action. In case of devices having multiple IPC IP instances, this comprises of all IPC interrupts associated with only particular IPC IP. |
msgPtr | The message pointer that is being sent over the IPC channel. |
CY_IPC_DRV_SUCCESS | The send operation was successful. |
CY_IPC_DRV_ERROR | The IPC channel is unavailable because it is already locked. |
__STATIC_INLINE cy_en_ipcdrv_status_t Cy_IPC_Drv_ReadMsgPtr | ( | IPC_STRUCT_Type const * | base, |
void ** | msgPtr | ||
) |
This function is used to read a 32-bit pointer message through an IPC channel.
base | This parameter is a handle that represents the base address of the registers of the IPC channel. The parameter is generally returned from a call to the Cy_IPC_Drv_GetIpcBaseAddress. |
msgPtr | Pointer variable to hold the data pointer that is being read from the IPC channel. |
CY_IPC_DRV_SUCCESS | The function executed successfully and the IPC was acquired. |
CY_IPC_DRV_ERROR | The function encountered an error because the IPC channel was already in a released state meaning the data in it is invalid. |
__STATIC_INLINE void Cy_IPC_Drv_SetInterruptMask | ( | IPC_INTR_STRUCT_Type * | base, |
uint32_t | ipcReleaseMask, | ||
uint32_t | ipcNotifyMask | ||
) |
This function is used to set the interrupt mask for an IPC Interrupt.
The mask sets release or acquire notification events for all IPC channels.
base | This is a handle to the IPC interrupt. This handle can be calculated from the IPC interrupt number using Cy_IPC_Drv_GetIntrBaseAddr. |
ipcReleaseMask | An encoded list of all IPC channels that can trigger the interrupt on a release event. In case of devices having multiple IPC IP instances, this comprises of total number of channels present in only particular IPC IP. |
ipcNotifyMask | An encoded list of all IPC channels that can trigger the interrupt on a notify event. In case of devices having multiple IPC IP instances, this comprises of total number of channels present in only particular IPC IP. |
__STATIC_INLINE uint32_t Cy_IPC_Drv_GetInterruptMask | ( | IPC_INTR_STRUCT_Type const * | base | ) |
This function is used to read the interrupt mask.
base | This is a handle to the IPC interrupt. This handle can be calculated from the IPC interrupt number using Cy_IPC_Drv_GetIntrBaseAddr. |
Interrupt sources | Value |
---|---|
Ipc_PORTX_RELEASE | Xth bit set |
Ipc_PORTX_NOTIFY | X+16th bit set |
__STATIC_INLINE uint32_t Cy_IPC_Drv_GetInterruptStatusMasked | ( | IPC_INTR_STRUCT_Type const * | base | ) |
This function is used to read the active unmasked interrupt.
This function can be used in the interrupt service routine to find which source triggered the interrupt.
base | This is a handle to the IPC interrupt. This handle can be calculated from the IPC interrupt number using Cy_IPC_Drv_GetIntrBaseAddr. |
Interrupt sources | Value |
---|---|
Ipc_PORTX_RELEASE | Xth bit set |
Ipc_PORTX_NOTIFY | X+16th bit set |
__STATIC_INLINE uint32_t Cy_IPC_Drv_GetInterruptStatus | ( | IPC_INTR_STRUCT_Type const * | base | ) |
This function is used to read the pending interrupts.
Note that this read is an unmasked read of the interrupt status. Interrupt sources read as active by this function would generate interrupts only if they were not masked.
base | This is a handle to the IPC interrupt. This handle can be calculated from the IPC interrupt number using Cy_IPC_Drv_GetIntrBaseAddr. |
Interrupt sources | Value |
---|---|
Ipc_PORTX_RELEASE | Xth bit set |
Ipc_PORTX_NOTIFY | X+16th bit set |
__STATIC_INLINE void Cy_IPC_Drv_SetInterrupt | ( | IPC_INTR_STRUCT_Type * | base, |
uint32_t | ipcReleaseMask, | ||
uint32_t | ipcNotifyMask | ||
) |
This function is used to set the interrupt source.
This function can be used to activate interrupts through software.
base | This is a handle to the IPC interrupt. This handle can be calculated from the IPC interrupt number using Cy_IPC_Drv_GetIntrBaseAddr. |
ipcReleaseMask | An encoded list of all IPC channels that can trigger the interrupt on a release event. In case of devices having multiple IPC IP instances, this comprises of total number of channels present in only particular IPC IP. |
ipcNotifyMask | An encoded list of all IPC channels that can trigger the interrupt on a notify event. In case of devices having multiple IPC IP instances, this comprises of total number of channels present in only particular IPC IP. |
__STATIC_INLINE void Cy_IPC_Drv_ClearInterrupt | ( | IPC_INTR_STRUCT_Type * | base, |
uint32_t | ipcReleaseMask, | ||
uint32_t | ipcNotifyMask | ||
) |
This function is used to clear the interrupt source.
Use this function to clear a pending interrupt source in the interrupt status.
base | This is a handle to the IPC interrupt. This handle can be calculated from the IPC interrupt number using Cy_IPC_Drv_GetIntrBaseAddr. |
ipcReleaseMask | An encoded list of all IPC channels that can trigger the interrupt on a release event. In case of devices having multiple IPC IP instances, this comprises of total number of channels present in only particular IPC IP. |
ipcNotifyMask | An encoded list of all IPC channels that can trigger the interrupt on a notify event. In case of devices having multiple IPC IP instances, this comprises of total number of channels present in only particular IPC IP. |