Functions | |
cy_en_dma_status_t | Cy_DMA_Descriptor_Init (cy_stc_dma_descriptor_t *descriptor, cy_stc_dma_descriptor_config_t const *config) |
Initializes the descriptor structure in SRAM from a pre-initialized configuration structure. More... | |
void | Cy_DMA_Descriptor_DeInit (cy_stc_dma_descriptor_t *descriptor) |
Clears the content of the specified descriptor. More... | |
void | Cy_DMA_Descriptor_SetNextDescriptor (cy_stc_dma_descriptor_t *descriptor, cy_stc_dma_descriptor_t const *nextDescriptor) |
Sets a Next Descriptor for the specified descriptor. More... | |
void | Cy_DMA_Descriptor_SetDescriptorType (cy_stc_dma_descriptor_t *descriptor, cy_en_dma_descriptor_type_t descriptorType) |
Sets the descriptor's type for the specified descriptor. More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetSrcAddress (cy_stc_dma_descriptor_t *descriptor, void const *srcAddress) |
Sets the source address for the specified descriptor. More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetDstAddress (cy_stc_dma_descriptor_t *descriptor, void const *dstAddress) |
Sets the destination address for the specified descriptor. More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetXloopDataCount (cy_stc_dma_descriptor_t *descriptor, uint32_t xCount) |
Sets the number of data elements to transfer in the X loop for the specified descriptor (for 1D or 2D descriptors only). More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetYloopDataCount (cy_stc_dma_descriptor_t *descriptor, uint32_t yCount) |
Sets the number of data elements for the Y loop of the specified descriptor (for 2D descriptors only). More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetXloopSrcIncrement (cy_stc_dma_descriptor_t *descriptor, int32_t srcXincrement) |
Sets the source increment parameter for the X loop of the specified descriptor (for 1D or 2D descriptors only). More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetXloopDstIncrement (cy_stc_dma_descriptor_t *descriptor, int32_t dstXincrement) |
Sets the destination increment parameter for the X loop for the specified descriptor (for 1D or 2D descriptors only). More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetYloopSrcIncrement (cy_stc_dma_descriptor_t *descriptor, int32_t srcYincrement) |
Sets the source increment parameter for the Y loop for the specified descriptor (for 2D descriptors only). More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetYloopDstIncrement (cy_stc_dma_descriptor_t *descriptor, int32_t dstYincrement) |
Sets the destination increment parameter for the Y loop of the specified descriptor (for 2D descriptors only). More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetInterruptType (cy_stc_dma_descriptor_t *descriptor, cy_en_dma_trigger_type_t interruptType) |
Sets the interrupt type for the specified descriptor. More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetTriggerInType (cy_stc_dma_descriptor_t *descriptor, cy_en_dma_trigger_type_t triggerInType) |
Sets the Trigger-In-Type for the specified descriptor. More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetTriggerOutType (cy_stc_dma_descriptor_t *descriptor, cy_en_dma_trigger_type_t triggerOutType) |
Sets the Trigger-Out-Type for the specified descriptor. More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetDataSize (cy_stc_dma_descriptor_t *descriptor, cy_en_dma_data_size_t dataSize) |
Sets the Data Element Size for the specified descriptor. More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetSrcTransferSize (cy_stc_dma_descriptor_t *descriptor, cy_en_dma_transfer_size_t srcTransferSize) |
Sets the Source Transfer Size for the specified descriptor. More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetDstTransferSize (cy_stc_dma_descriptor_t *descriptor, cy_en_dma_transfer_size_t dstTransferSize) |
Sets the Destination Transfer Size for the specified descriptor. More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetRetrigger (cy_stc_dma_descriptor_t *descriptor, cy_en_dma_retrigger_t retrigger) |
Sets the retrigger value that specifies whether the controller should wait for the input trigger to be deactivated. More... | |
__STATIC_INLINE void | Cy_DMA_Descriptor_SetChannelState (cy_stc_dma_descriptor_t *descriptor, cy_en_dma_channel_state_t channelState) |
Sets the channel state on completion of the specified descriptor. More... | |
cy_stc_dma_descriptor_t * | Cy_DMA_Descriptor_GetNextDescriptor (cy_stc_dma_descriptor_t const *descriptor) |
Returns a next descriptor address of the specified descriptor. More... | |
__STATIC_INLINE cy_en_dma_descriptor_type_t | Cy_DMA_Descriptor_GetDescriptorType (cy_stc_dma_descriptor_t const *descriptor) |
Returns the descriptor's type of the specified descriptor. More... | |
__STATIC_INLINE void * | Cy_DMA_Descriptor_GetSrcAddress (cy_stc_dma_descriptor_t const *descriptor) |
Returns the source address parameter of the specified descriptor. More... | |
__STATIC_INLINE void * | Cy_DMA_Descriptor_GetDstAddress (cy_stc_dma_descriptor_t const *descriptor) |
Returns the destination address parameter of the specified descriptor. More... | |
__STATIC_INLINE uint32_t | Cy_DMA_Descriptor_GetXloopDataCount (cy_stc_dma_descriptor_t const *descriptor) |
Returns the number of data elements for the X loop of the specified descriptor (for 1D or 2D descriptors only). More... | |
__STATIC_INLINE uint32_t | Cy_DMA_Descriptor_GetYloopDataCount (cy_stc_dma_descriptor_t const *descriptor) |
Returns the number of X loops to execute in the Y loop of the specified descriptor (for 2D descriptors only). More... | |
__STATIC_INLINE int32_t | Cy_DMA_Descriptor_GetXloopSrcIncrement (cy_stc_dma_descriptor_t const *descriptor) |
Returns the source increment parameter for the X loop of the specified descriptor (for 1D or 2D descriptors only). More... | |
__STATIC_INLINE int32_t | Cy_DMA_Descriptor_GetXloopDstIncrement (cy_stc_dma_descriptor_t const *descriptor) |
Returns the destination increment parameter for the X loop of the specified descriptor (for 1D or 2D descriptors only). More... | |
__STATIC_INLINE int32_t | Cy_DMA_Descriptor_GetYloopSrcIncrement (cy_stc_dma_descriptor_t const *descriptor) |
Returns the source increment parameter for the outer Y of the specified descriptor (for 2D descriptors only). More... | |
__STATIC_INLINE int32_t | Cy_DMA_Descriptor_GetYloopDstIncrement (cy_stc_dma_descriptor_t const *descriptor) |
Returns the destination increment parameter for the Y loop of the specified descriptor (for 2D descriptors only). More... | |
__STATIC_INLINE cy_en_dma_trigger_type_t | Cy_DMA_Descriptor_GetInterruptType (cy_stc_dma_descriptor_t const *descriptor) |
Returns the Interrupt-Type of the specified descriptor. More... | |
__STATIC_INLINE cy_en_dma_trigger_type_t | Cy_DMA_Descriptor_GetTriggerInType (cy_stc_dma_descriptor_t const *descriptor) |
Returns the Trigger-In-Type parameter of the specified descriptor. More... | |
__STATIC_INLINE cy_en_dma_trigger_type_t | Cy_DMA_Descriptor_GetTriggerOutType (cy_stc_dma_descriptor_t const *descriptor) |
Returns the Trigger-Out-Type parameter of the specified descriptor. More... | |
__STATIC_INLINE cy_en_dma_data_size_t | Cy_DMA_Descriptor_GetDataSize (cy_stc_dma_descriptor_t const *descriptor) |
Returns the Data Element Size parameter of the specified descriptor. More... | |
__STATIC_INLINE cy_en_dma_transfer_size_t | Cy_DMA_Descriptor_GetSrcTransferSize (cy_stc_dma_descriptor_t const *descriptor) |
Returns the Source Transfer Size parameter of the specified descriptor. More... | |
__STATIC_INLINE cy_en_dma_transfer_size_t | Cy_DMA_Descriptor_GetDstTransferSize (cy_stc_dma_descriptor_t const *descriptor) |
Returns the Destination Transfer Size parameter of the specified descriptor. More... | |
__STATIC_INLINE cy_en_dma_retrigger_t | Cy_DMA_Descriptor_GetRetrigger (cy_stc_dma_descriptor_t const *descriptor) |
Returns a value that specifies whether the controller should wait for the input trigger to be deactivated. More... | |
__STATIC_INLINE cy_en_dma_channel_state_t | Cy_DMA_Descriptor_GetChannelState (cy_stc_dma_descriptor_t const *descriptor) |
Returns the channel state on completion of the specified descriptor. More... | |
cy_en_dma_status_t Cy_DMA_Descriptor_Init | ( | cy_stc_dma_descriptor_t * | descriptor, |
const cy_stc_dma_descriptor_config_t * | config | ||
) |
Initializes the descriptor structure in SRAM from a pre-initialized configuration structure.
This function initializes only the descriptor and not the channel.
descriptor | The descriptor structure instance declared by the user/component. |
config | This is a configuration structure that has all initialization information for the descriptor. |
void Cy_DMA_Descriptor_DeInit | ( | cy_stc_dma_descriptor_t * | descriptor | ) |
Clears the content of the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
void Cy_DMA_Descriptor_SetNextDescriptor | ( | cy_stc_dma_descriptor_t * | descriptor, |
cy_stc_dma_descriptor_t const * | nextDescriptor | ||
) |
Sets a Next Descriptor for the specified descriptor.
Based on the descriptor type, the offset of the address for the next descriptor may vary. For the single-transfer descriptor type, this register is at offset 0x0c. For the 1D-transfer descriptor type, this register is at offset 0x10. For the 2D-transfer descriptor type, this register is at offset 0x14.
descriptor | The descriptor structure instance declared by the user/component. |
nextDescriptor | The pointer to the next descriptor. For CAT1C devices this pointer needs to point to 32 byte aligned structure. |
void Cy_DMA_Descriptor_SetDescriptorType | ( | cy_stc_dma_descriptor_t * | descriptor, |
cy_en_dma_descriptor_type_t | descriptorType | ||
) |
Sets the descriptor's type for the specified descriptor.
Moves the next descriptor register value into the proper place in accordance to the actual descriptor type. During the descriptor's type changing, the Xloop and Yloop settings, such as data count and source/destination increment (i.e. the content of the xCtl and yCtl descriptor registers) might be lost (overridden by the next descriptor value) because of the different descriptor registers structures for different descriptor types. Carefully set up the Xloop (and Yloop, if used) data count and source/destination increment if the descriptor type is changed from a simpler to a more complicated type ("single transfer" -> "1D", "1D" -> "2D", etc.).
descriptor | The descriptor structure instance declared by the user/component. |
descriptorType | The descriptor type cy_en_dma_descriptor_type_t. |
__STATIC_INLINE void Cy_DMA_Descriptor_SetSrcAddress | ( | cy_stc_dma_descriptor_t * | descriptor, |
void const * | srcAddress | ||
) |
Sets the source address for the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
srcAddress | The source address value for the descriptor. For CAT1C devices this data pointer needs to point to 32 bit aligned data. |
__STATIC_INLINE void Cy_DMA_Descriptor_SetDstAddress | ( | cy_stc_dma_descriptor_t * | descriptor, |
void const * | dstAddress | ||
) |
Sets the destination address for the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
dstAddress | The destination address value for the descriptor. For CAT1C devices this data pointer needs to point to 32 byte aligned data. |
__STATIC_INLINE void Cy_DMA_Descriptor_SetXloopDataCount | ( | cy_stc_dma_descriptor_t * | descriptor, |
uint32_t | xCount | ||
) |
Sets the number of data elements to transfer in the X loop for the specified descriptor (for 1D or 2D descriptors only).
descriptor | The descriptor structure instance declared by the user/component. |
xCount | The number of data elements to transfer in the X loop. Valid range is 1 ... 256. |
__STATIC_INLINE void Cy_DMA_Descriptor_SetYloopDataCount | ( | cy_stc_dma_descriptor_t * | descriptor, |
uint32_t | yCount | ||
) |
Sets the number of data elements for the Y loop of the specified descriptor (for 2D descriptors only).
descriptor | The descriptor structure instance declared by the user/component. |
yCount | The number of X loops to execute in the Y loop. The valid range is 1 ... 256. |
__STATIC_INLINE void Cy_DMA_Descriptor_SetXloopSrcIncrement | ( | cy_stc_dma_descriptor_t * | descriptor, |
int32_t | srcXincrement | ||
) |
Sets the source increment parameter for the X loop of the specified descriptor (for 1D or 2D descriptors only).
descriptor | The descriptor structure instance declared by the user/component. |
srcXincrement | The value of the source increment. The valid range is -2048 ... 2047. |
__STATIC_INLINE void Cy_DMA_Descriptor_SetXloopDstIncrement | ( | cy_stc_dma_descriptor_t * | descriptor, |
int32_t | dstXincrement | ||
) |
Sets the destination increment parameter for the X loop for the specified descriptor (for 1D or 2D descriptors only).
descriptor | The descriptor structure instance declared by the user/component. |
dstXincrement | The value of the destination increment. The valid range is -2048 ... 2047. |
__STATIC_INLINE void Cy_DMA_Descriptor_SetYloopSrcIncrement | ( | cy_stc_dma_descriptor_t * | descriptor, |
int32_t | srcYincrement | ||
) |
Sets the source increment parameter for the Y loop for the specified descriptor (for 2D descriptors only).
descriptor | The descriptor structure instance declared by the user/component. |
srcYincrement | The value of the source increment. The valid range is -2048 ... 2047. |
__STATIC_INLINE void Cy_DMA_Descriptor_SetYloopDstIncrement | ( | cy_stc_dma_descriptor_t * | descriptor, |
int32_t | dstYincrement | ||
) |
Sets the destination increment parameter for the Y loop of the specified descriptor (for 2D descriptors only).
descriptor | The descriptor structure instance declared by the user/component. |
dstYincrement | The value of the destination increment. The valid range is -2048 ... 2047. |
__STATIC_INLINE void Cy_DMA_Descriptor_SetInterruptType | ( | cy_stc_dma_descriptor_t * | descriptor, |
cy_en_dma_trigger_type_t | interruptType | ||
) |
Sets the interrupt type for the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
interruptType | The interrupt type set for the descriptor. cy_en_dma_trigger_type_t |
__STATIC_INLINE void Cy_DMA_Descriptor_SetTriggerInType | ( | cy_stc_dma_descriptor_t * | descriptor, |
cy_en_dma_trigger_type_t | triggerInType | ||
) |
Sets the Trigger-In-Type for the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
triggerInType | The Trigger In Type parameter cy_en_dma_trigger_type_t |
__STATIC_INLINE void Cy_DMA_Descriptor_SetTriggerOutType | ( | cy_stc_dma_descriptor_t * | descriptor, |
cy_en_dma_trigger_type_t | triggerOutType | ||
) |
Sets the Trigger-Out-Type for the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
triggerOutType | The Trigger-Out-Type set for the descriptor. cy_en_dma_trigger_type_t |
__STATIC_INLINE void Cy_DMA_Descriptor_SetDataSize | ( | cy_stc_dma_descriptor_t * | descriptor, |
cy_en_dma_data_size_t | dataSize | ||
) |
Sets the Data Element Size for the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
dataSize | The Data Element Size cy_en_dma_data_size_t |
__STATIC_INLINE void Cy_DMA_Descriptor_SetSrcTransferSize | ( | cy_stc_dma_descriptor_t * | descriptor, |
cy_en_dma_transfer_size_t | srcTransferSize | ||
) |
Sets the Source Transfer Size for the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
srcTransferSize | The Source Transfer Size cy_en_dma_transfer_size_t. |
__STATIC_INLINE void Cy_DMA_Descriptor_SetDstTransferSize | ( | cy_stc_dma_descriptor_t * | descriptor, |
cy_en_dma_transfer_size_t | dstTransferSize | ||
) |
Sets the Destination Transfer Size for the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
dstTransferSize | The Destination Transfer Size cy_en_dma_transfer_size_t. |
__STATIC_INLINE void Cy_DMA_Descriptor_SetRetrigger | ( | cy_stc_dma_descriptor_t * | descriptor, |
cy_en_dma_retrigger_t | retrigger | ||
) |
Sets the retrigger value that specifies whether the controller should wait for the input trigger to be deactivated.
descriptor | The descriptor structure instance declared by the user/component. |
retrigger | The cy_en_dma_retrigger_t parameter specifies whether the controller should wait for the input trigger to be deactivated. |
__STATIC_INLINE void Cy_DMA_Descriptor_SetChannelState | ( | cy_stc_dma_descriptor_t * | descriptor, |
cy_en_dma_channel_state_t | channelState | ||
) |
Sets the channel state on completion of the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
channelState | The channel state cy_en_dma_channel_state_t. |
cy_stc_dma_descriptor_t* Cy_DMA_Descriptor_GetNextDescriptor | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns a next descriptor address of the specified descriptor.
Based on the descriptor type, the offset of the address for the next descriptor may vary. For a single-transfer descriptor type, this register is at offset 0x0c. For the 1D-transfer descriptor type, this register is at offset 0x10. For the 2D-transfer descriptor type, this register is at offset 0x14.
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE cy_en_dma_descriptor_type_t Cy_DMA_Descriptor_GetDescriptorType | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the descriptor's type of the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE void * Cy_DMA_Descriptor_GetSrcAddress | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the source address parameter of the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE void * Cy_DMA_Descriptor_GetDstAddress | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the destination address parameter of the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE uint32_t Cy_DMA_Descriptor_GetXloopDataCount | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the number of data elements for the X loop of the specified descriptor (for 1D or 2D descriptors only).
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE uint32_t Cy_DMA_Descriptor_GetYloopDataCount | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the number of X loops to execute in the Y loop of the specified descriptor (for 2D descriptors only).
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE int32_t Cy_DMA_Descriptor_GetXloopSrcIncrement | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the source increment parameter for the X loop of the specified descriptor (for 1D or 2D descriptors only).
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE int32_t Cy_DMA_Descriptor_GetXloopDstIncrement | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the destination increment parameter for the X loop of the specified descriptor (for 1D or 2D descriptors only).
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE int32_t Cy_DMA_Descriptor_GetYloopSrcIncrement | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the source increment parameter for the outer Y of the specified descriptor (for 2D descriptors only).
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE int32_t Cy_DMA_Descriptor_GetYloopDstIncrement | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the destination increment parameter for the Y loop of the specified descriptor (for 2D descriptors only).
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE cy_en_dma_trigger_type_t Cy_DMA_Descriptor_GetInterruptType | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the Interrupt-Type of the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE cy_en_dma_trigger_type_t Cy_DMA_Descriptor_GetTriggerInType | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the Trigger-In-Type parameter of the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE cy_en_dma_trigger_type_t Cy_DMA_Descriptor_GetTriggerOutType | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the Trigger-Out-Type parameter of the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE cy_en_dma_data_size_t Cy_DMA_Descriptor_GetDataSize | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the Data Element Size parameter of the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE cy_en_dma_transfer_size_t Cy_DMA_Descriptor_GetSrcTransferSize | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the Source Transfer Size parameter of the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE cy_en_dma_transfer_size_t Cy_DMA_Descriptor_GetDstTransferSize | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the Destination Transfer Size parameter of the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE cy_en_dma_retrigger_t Cy_DMA_Descriptor_GetRetrigger | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns a value that specifies whether the controller should wait for the input trigger to be deactivated.
descriptor | The descriptor structure instance declared by the user/component. |
__STATIC_INLINE cy_en_dma_channel_state_t Cy_DMA_Descriptor_GetChannelState | ( | cy_stc_dma_descriptor_t const * | descriptor | ) |
Returns the channel state on completion of the specified descriptor.
descriptor | The descriptor structure instance declared by the user/component. |