MTB CAT1 Peripheral driver library

General Description

Functions

cy_en_dmac_status_t Cy_DMAC_Descriptor_Init (cy_stc_dmac_descriptor_t *descriptor, cy_stc_dmac_descriptor_config_t const *config)
 Initializes the descriptor structure in SRAM from a pre-initialized configuration structure. More...
 
void Cy_DMAC_Descriptor_DeInit (cy_stc_dmac_descriptor_t *descriptor)
 Clears the content of the specified descriptor. More...
 
void Cy_DMAC_Descriptor_SetNextDescriptor (cy_stc_dmac_descriptor_t *descriptor, cy_stc_dmac_descriptor_t const *nextDescriptor)
 Sets a Next Descriptor parameter for the specified descriptor. More...
 
void Cy_DMAC_Descriptor_SetDescriptorType (cy_stc_dmac_descriptor_t *descriptor, cy_en_dmac_descriptor_type_t descriptorType)
 Sets the descriptor's type for the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetSrcAddress (cy_stc_dmac_descriptor_t *descriptor, void const *srcAddress)
 Sets the source address parameter for the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetDstAddress (cy_stc_dmac_descriptor_t *descriptor, void const *dstAddress)
 Sets the destination address parameter for the specified descriptor. More...
 
void Cy_DMAC_Descriptor_SetXloopDataCount (cy_stc_dmac_descriptor_t *descriptor, uint32_t xCount)
 Sets the number of data elements to transfer in the X loop for the specified descriptor (for all descriptor types except single transfer). More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetYloopDataCount (cy_stc_dmac_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_DMAC_Descriptor_SetXloopSrcIncrement (cy_stc_dmac_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_DMAC_Descriptor_SetXloopDstIncrement (cy_stc_dmac_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_DMAC_Descriptor_SetYloopSrcIncrement (cy_stc_dmac_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_DMAC_Descriptor_SetYloopDstIncrement (cy_stc_dmac_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_DMAC_Descriptor_SetInterruptType (cy_stc_dmac_descriptor_t *descriptor, cy_en_dmac_trigger_type_t interruptType)
 Sets the interrupt type parameter for the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetTriggerInType (cy_stc_dmac_descriptor_t *descriptor, cy_en_dmac_trigger_type_t triggerInType)
 Sets the Trigger In Type parameter for the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetTriggerOutType (cy_stc_dmac_descriptor_t *descriptor, cy_en_dmac_trigger_type_t triggerOutType)
 Sets the Trigger Out Type parameter for the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetDataSize (cy_stc_dmac_descriptor_t *descriptor, cy_en_dmac_data_size_t dataSize)
 Sets the Data Element Size parameter for the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetSrcTransferSize (cy_stc_dmac_descriptor_t *descriptor, cy_en_dmac_transfer_size_t srcTransferSize)
 Sets the Source Transfer Size parameter for the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetDstTransferSize (cy_stc_dmac_descriptor_t *descriptor, cy_en_dmac_transfer_size_t dstTransferSize)
 Sets the Destination Transfer Size parameter for the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetRetrigger (cy_stc_dmac_descriptor_t *descriptor, cy_en_dmac_retrigger_t retrigger)
 Sets the retrigger value which specifies whether the controller should wait for the input trigger to be deactivated. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetChannelState (cy_stc_dmac_descriptor_t *descriptor, cy_en_dmac_channel_state_t channelState)
 Sets the channel state on completion of the specified descriptor. More...
 
cy_stc_dmac_descriptor_tCy_DMAC_Descriptor_GetNextDescriptor (cy_stc_dmac_descriptor_t const *descriptor)
 Returns a next descriptor address of the specified descriptor. More...
 
__STATIC_INLINE cy_en_dmac_descriptor_type_t Cy_DMAC_Descriptor_GetDescriptorType (cy_stc_dmac_descriptor_t const *descriptor)
 Returns the descriptor's type of the specified descriptor. More...
 
__STATIC_INLINE void * Cy_DMAC_Descriptor_GetSrcAddress (cy_stc_dmac_descriptor_t const *descriptor)
 Returns the source address of the specified descriptor. More...
 
__STATIC_INLINE void * Cy_DMAC_Descriptor_GetDstAddress (cy_stc_dmac_descriptor_t const *descriptor)
 Returns the destination address of the specified descriptor. More...
 
uint32_t Cy_DMAC_Descriptor_GetXloopDataCount (cy_stc_dmac_descriptor_t const *descriptor)
 Returns the number of data elements for the X loop of the specified descriptor (for all descriptor types except single transfer). More...
 
__STATIC_INLINE uint32_t Cy_DMAC_Descriptor_GetYloopDataCount (cy_stc_dmac_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_DMAC_Descriptor_GetXloopSrcIncrement (cy_stc_dmac_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_DMAC_Descriptor_GetXloopDstIncrement (cy_stc_dmac_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_DMAC_Descriptor_GetYloopSrcIncrement (cy_stc_dmac_descriptor_t const *descriptor)
 Returns the source increment parameter for the Y loop of the specified descriptor (for 2D descriptors only). More...
 
__STATIC_INLINE int32_t Cy_DMAC_Descriptor_GetYloopDstIncrement (cy_stc_dmac_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_dmac_trigger_type_t Cy_DMAC_Descriptor_GetInterruptType (cy_stc_dmac_descriptor_t const *descriptor)
 Returns the Interrupt-Type of the specified descriptor. More...
 
__STATIC_INLINE cy_en_dmac_trigger_type_t Cy_DMAC_Descriptor_GetTriggerInType (cy_stc_dmac_descriptor_t const *descriptor)
 Returns the Trigger In Type of the specified descriptor. More...
 
__STATIC_INLINE cy_en_dmac_trigger_type_t Cy_DMAC_Descriptor_GetTriggerOutType (cy_stc_dmac_descriptor_t const *descriptor)
 Returns the Trigger Out Type of the specified descriptor. More...
 
__STATIC_INLINE cy_en_dmac_data_size_t Cy_DMAC_Descriptor_GetDataSize (cy_stc_dmac_descriptor_t const *descriptor)
 Returns the Data Element Size of the specified descriptor. More...
 
__STATIC_INLINE cy_en_dmac_transfer_size_t Cy_DMAC_Descriptor_GetSrcTransferSize (cy_stc_dmac_descriptor_t const *descriptor)
 Returns the Source Transfer Size of the specified descriptor. More...
 
__STATIC_INLINE cy_en_dmac_transfer_size_t Cy_DMAC_Descriptor_GetDstTransferSize (cy_stc_dmac_descriptor_t const *descriptor)
 Returns the Destination Transfer Size of the specified descriptor. More...
 
__STATIC_INLINE cy_en_dmac_retrigger_t Cy_DMAC_Descriptor_GetRetrigger (cy_stc_dmac_descriptor_t const *descriptor)
 Returns a value which specifies whether the controller should wait for the input trigger to be deactivated. More...
 
__STATIC_INLINE cy_en_dmac_channel_state_t Cy_DMAC_Descriptor_GetChannelState (cy_stc_dmac_descriptor_t const *descriptor)
 Returns the channel state on completion of the specified descriptor. More...
 

Function Documentation

◆ Cy_DMAC_Descriptor_Init()

cy_en_dmac_status_t Cy_DMAC_Descriptor_Init ( cy_stc_dmac_descriptor_t descriptor,
const cy_stc_dmac_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.

Parameters
descriptorThe descriptor structure instance.
configThis is a configuration structure that has all initialization information for the descriptor.
Returns
The status /ref cy_en_dmac_status_t.
Function Usage
#define DATA_COUNT (8UL)
/* Scenario: Initialize a 1D descriptor */
cy_stc_dmac_descriptor_t nextDescriptor;
uint32_t src[DATA_COUNT];
uint32_t dst[DATA_COUNT];
{
.interruptType = CY_DMAC_DESCR,
.triggerOutType = CY_DMAC_DESCR,
.channelState = CY_DMAC_CHANNEL_ENABLED,
.triggerInType = CY_DMAC_DESCR,
.dataSize = CY_DMAC_WORD,
.srcTransferSize = CY_DMAC_TRANSFER_SIZE_WORD,
.dstTransferSize = CY_DMAC_TRANSFER_SIZE_WORD,
.descriptorType = CY_DMAC_1D_TRANSFER,
.srcAddress = &src,
.dstAddress = &dst,
.srcXincrement = 1U,
.dstXincrement = 1U,
.xCount = DATA_COUNT,
.srcYincrement = 0U,
.dstYincrement = 0U,
.yCount = 1UL,
.nextDescriptor = &nextDescriptor,
};
if (CY_DMAC_SUCCESS != Cy_DMAC_Descriptor_Init(&descriptor, &descriptor_cfg))
{
/* Insert error handling */
}
/* Scenario: Setup and enable the DMAC channel 0 */
channelConfig.enable = false;
channelConfig.bufferable = false;
if (CY_DMAC_SUCCESS != Cy_DMAC_Channel_Init(DMAC, 0UL, &channelConfig))
{
/* Insert error handling */
}
Cy_DMAC_Channel_SetDescriptor(DMAC, 0UL, &descriptor);
Cy_DMAC_Channel_SetPriority(DMAC, 0UL, 3UL);
if (true != Cy_DMAC_Channel_IsEnabled(DMAC, 0UL))
{
/* Insert error handling */
}

◆ Cy_DMAC_Descriptor_DeInit()

void Cy_DMAC_Descriptor_DeInit ( cy_stc_dmac_descriptor_t descriptor)

Clears the content of the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
Function Usage
/* Scenario: Disable a descriptor */
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
}

◆ Cy_DMAC_Descriptor_SetNextDescriptor()

void Cy_DMAC_Descriptor_SetNextDescriptor ( cy_stc_dmac_descriptor_t descriptor,
cy_stc_dmac_descriptor_t const *  nextDescriptor 
)

Sets a Next Descriptor parameter for the specified descriptor.

Based on the descriptor type, the offset of the address for the next descriptor register may vary: For the single and scatter transfer descriptors, this register is at offset 0x0c. For the memory copy descriptor type, this register is at offset 0x10. For the 1D-transfer descriptor type, this register is at offset 0x14. For the 2D-transfer descriptor type, this register is at offset 0x1c.

Parameters
descriptorThe descriptor structure instance.
nextDescriptorThe pointer to the next descriptor. For CAT1C devices this pointer needs to point to 32 byte aligned structure.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetDescriptorType()

void Cy_DMAC_Descriptor_SetDescriptorType ( cy_stc_dmac_descriptor_t descriptor,
cy_en_dmac_descriptor_type_t  descriptorType 
)

Sets the descriptor's type for the specified descriptor.

Moves the next descriptor pointer and X data count values into the proper offset in accordance to the actual descriptor type.

During the descriptor's type change, carefully set up the settings starting from dstAddress and all the rest below in the cy_stc_dmac_descriptor_config_t structure. This is because the content of the descriptor registers might be lost/overridden by other descriptor settings due to the different registers structure for different descriptor types.

Parameters
descriptorThe descriptor structure instance.
descriptorTypeThe descriptor type cy_en_dmac_descriptor_type_t.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetSrcAddress()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetSrcAddress ( cy_stc_dmac_descriptor_t descriptor,
void const *  srcAddress 
)

Sets the source address parameter for the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
srcAddressThe source address value for the descriptor. For CAT1C devices this pointer needs to point to 32 byte aligned structure.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetDstAddress()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetDstAddress ( cy_stc_dmac_descriptor_t descriptor,
void const *  dstAddress 
)

Sets the destination address parameter for the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
dstAddressThe destination address value for the descriptor. For CAT1C devices this pointer needs to point to 32 byte aligned structure.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetXloopDataCount()

void Cy_DMAC_Descriptor_SetXloopDataCount ( cy_stc_dmac_descriptor_t descriptor,
uint32_t  xCount 
)

Sets the number of data elements to transfer in the X loop for the specified descriptor (for all descriptor types except single transfer).

Based on the descriptor type, the offset of the address for the xCount register may vary: For the scatter transfer descriptors type, this register is at offset 0x8. For all the rest of the supported descriptor types, this register is at offset 0xc.

Parameters
descriptorThe descriptor structure instance.
xCountThe number of data elements to transfer in the X loop. For scatter transfer descriptors the valid range is 1...32768. For all the rest of the descriptors (except single transfer), the valid range is 1...65536.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetYloopDataCount()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetYloopDataCount ( cy_stc_dmac_descriptor_t descriptor,
uint32_t  yCount 
)

Sets the number of data elements for the Y loop of the specified descriptor (for 2D descriptors only).

Parameters
descriptorThe descriptor structure instance.
yCountThe number of X loops to execute in the Y loop. The valid range is 1 ... 65536.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetXloopSrcIncrement()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetXloopSrcIncrement ( cy_stc_dmac_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).

Parameters
descriptorThe descriptor structure instance.
srcXincrementThe value of the source increment. The valid range is -32768 ... 32767.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetXloopDstIncrement()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetXloopDstIncrement ( cy_stc_dmac_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).

Parameters
descriptorThe descriptor structure instance.
dstXincrementThe value of the destination increment. The valid range is -32768 ... 32767.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetYloopSrcIncrement()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetYloopSrcIncrement ( cy_stc_dmac_descriptor_t descriptor,
int32_t  srcYincrement 
)

Sets the source increment parameter for the Y loop for the specified descriptor (for 2D descriptors only).

Parameters
descriptorThe descriptor structure instance.
srcYincrementThe value of the source increment. The valid range is -32768 ... 32767.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetYloopDstIncrement()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetYloopDstIncrement ( cy_stc_dmac_descriptor_t descriptor,
int32_t  dstYincrement 
)

Sets the destination increment parameter for the Y loop of the specified descriptor (for 2D descriptors only).

Parameters
descriptorThe descriptor structure instance.
dstYincrementThe value of the destination increment. The valid range is -32768 ... 32767.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetInterruptType()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetInterruptType ( cy_stc_dmac_descriptor_t descriptor,
cy_en_dmac_trigger_type_t  interruptType 
)

Sets the interrupt type parameter for the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
interruptTypeThe interrupt type set for the descriptor. cy_en_dmac_trigger_type_t
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetTriggerInType()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetTriggerInType ( cy_stc_dmac_descriptor_t descriptor,
cy_en_dmac_trigger_type_t  triggerInType 
)

Sets the Trigger In Type parameter for the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
triggerInTypeThe Trigger In Type parameter cy_en_dmac_trigger_type_t
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetTriggerOutType()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetTriggerOutType ( cy_stc_dmac_descriptor_t descriptor,
cy_en_dmac_trigger_type_t  triggerOutType 
)

Sets the Trigger Out Type parameter for the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
triggerOutTypeThe Trigger Out Type set for the descriptor. cy_en_dmac_trigger_type_t
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetDataSize()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetDataSize ( cy_stc_dmac_descriptor_t descriptor,
cy_en_dmac_data_size_t  dataSize 
)

Sets the Data Element Size parameter for the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
dataSizeThe Data Element Size cy_en_dmac_data_size_t
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetSrcTransferSize()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetSrcTransferSize ( cy_stc_dmac_descriptor_t descriptor,
cy_en_dmac_transfer_size_t  srcTransferSize 
)

Sets the Source Transfer Size parameter for the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
srcTransferSizeThe Source Transfer Size cy_en_dmac_transfer_size_t.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetDstTransferSize()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetDstTransferSize ( cy_stc_dmac_descriptor_t descriptor,
cy_en_dmac_transfer_size_t  dstTransferSize 
)

Sets the Destination Transfer Size parameter for the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
dstTransferSizeThe Destination Transfer Size cy_en_dmac_transfer_size_t.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetRetrigger()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetRetrigger ( cy_stc_dmac_descriptor_t descriptor,
cy_en_dmac_retrigger_t  retrigger 
)

Sets the retrigger value which specifies whether the controller should wait for the input trigger to be deactivated.

Parameters
descriptorThe descriptor structure instance.
retriggerThe cy_en_dmac_retrigger_t parameter specifies whether the controller should wait for the input trigger to be deactivated.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_SetChannelState()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetChannelState ( cy_stc_dmac_descriptor_t descriptor,
cy_en_dmac_channel_state_t  channelState 
)

Sets the channel state on completion of the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
channelStateThe channel state cy_en_dmac_channel_state_t.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATA_CNT (8UL)
cy_stc_dmac_descriptor_t descriptor = {0};
cy_stc_dmac_descriptor_t nextDescriptor = {0};
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
uint32_t next_src[DATA_CNT];
uint32_t next_dst[DATA_CNT];
for(uint32_t i = 0u; i < DATA_CNT; i++)
{
src[i] = i;
next_src[i] = i*2u;
}
if (&descriptor != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0UL)) /* Make sure it is not in use */
{
Cy_DMAC_Descriptor_SetXloopDataCount(&descriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetSrcAddress(&nextDescriptor, next_src);
Cy_DMAC_Descriptor_SetDstAddress(&nextDescriptor, next_dst);
Cy_DMAC_Descriptor_SetXloopDataCount(&nextDescriptor, DATA_CNT);
Cy_DMAC_Descriptor_SetYloopDataCount(&nextDescriptor, 1UL);
Cy_DMAC_Descriptor_SetNextDescriptor(&descriptor, &nextDescriptor);
}

◆ Cy_DMAC_Descriptor_GetNextDescriptor()

cy_stc_dmac_descriptor_t* Cy_DMAC_Descriptor_GetNextDescriptor ( cy_stc_dmac_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 register may vary: For the single and scatter transfer descriptors, this register is at offset 0x0c. For the memory copy descriptor type, this register is at offset 0x10. For the 1D-transfer descriptor type, this register is at offset 0x14. For the 2D-transfer descriptor type, this register is at offset 0x1c.

Parameters
descriptorThe descriptor structure instance.
Returns
The pointer to the next descriptor.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetDescriptorType()

__STATIC_INLINE cy_en_dmac_descriptor_type_t Cy_DMAC_Descriptor_GetDescriptorType ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the descriptor's type of the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
Returns
The descriptor type cy_en_dmac_descriptor_type_t
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetSrcAddress()

__STATIC_INLINE void * Cy_DMAC_Descriptor_GetSrcAddress ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the source address of the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
Returns
The source address value of the descriptor.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetDstAddress()

__STATIC_INLINE void * Cy_DMAC_Descriptor_GetDstAddress ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the destination address of the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
Returns
The destination address value of the descriptor.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetXloopDataCount()

uint32_t Cy_DMAC_Descriptor_GetXloopDataCount ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the number of data elements for the X loop of the specified descriptor (for all descriptor types except single transfer).

Based on the descriptor type, the offset of the address for the xCount register may vary: For the scatter transfer descriptors type, this register is at offset 0x8. For all the rest supported descriptor types, this register is at offset 0xc.

Parameters
descriptorThe descriptor structure instance.
Returns
The number of data elements to transfer in the X loop. For scatter transfer descriptors the X loop count unit is an [address, data] pair (two words, or 8 bytes). For memory copy descriptors X loop count unit is one byte. For all the rest descriptors (except single transfer) the X loop count unit is specified by the data transfer size /ref cy_en_dmac_data_size_t.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetYloopDataCount()

__STATIC_INLINE uint32_t Cy_DMAC_Descriptor_GetYloopDataCount ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the number of X loops to execute in the Y loop of the specified descriptor (for 2D descriptors only).

Parameters
descriptorThe descriptor structure instance.
Returns
The number of X loops to execute in the Y loop. The range is 1 ... 65536.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetXloopSrcIncrement()

__STATIC_INLINE int32_t Cy_DMAC_Descriptor_GetXloopSrcIncrement ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the source increment parameter for the X loop of the specified descriptor (for 1D or 2D descriptors only).

Parameters
descriptorThe descriptor structure instance.
Returns
The value of the source increment. The range is -32768 ... 32767.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetXloopDstIncrement()

__STATIC_INLINE int32_t Cy_DMAC_Descriptor_GetXloopDstIncrement ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the destination increment parameter for the X loop of the specified descriptor (for 1D or 2D descriptors only).

Parameters
descriptorThe descriptor structure instance.
Returns
The value of the destination increment. The range is -32768 ... 32767.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetYloopSrcIncrement()

__STATIC_INLINE int32_t Cy_DMAC_Descriptor_GetYloopSrcIncrement ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the source increment parameter for the Y loop of the specified descriptor (for 2D descriptors only).

Parameters
descriptorThe descriptor structure instance.
Returns
The value of source increment. The range is -32768 ... 32767.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetYloopDstIncrement()

__STATIC_INLINE int32_t Cy_DMAC_Descriptor_GetYloopDstIncrement ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the destination increment parameter for the Y loop of the specified descriptor (for 2D descriptors only).

Parameters
descriptorThe descriptor structure instance.
Returns
The value of the destination increment. The range is -32768 ... 32767.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetInterruptType()

__STATIC_INLINE cy_en_dmac_trigger_type_t Cy_DMAC_Descriptor_GetInterruptType ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the Interrupt-Type of the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
Returns
The Interrupt-Type cy_en_dmac_trigger_type_t.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetTriggerInType()

__STATIC_INLINE cy_en_dmac_trigger_type_t Cy_DMAC_Descriptor_GetTriggerInType ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the Trigger In Type of the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
Returns
The Trigger In Type cy_en_dmac_trigger_type_t
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetTriggerOutType()

__STATIC_INLINE cy_en_dmac_trigger_type_t Cy_DMAC_Descriptor_GetTriggerOutType ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the Trigger Out Type of the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
Returns
The Trigger Out Type parameter cy_en_dmac_trigger_type_t.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetDataSize()

__STATIC_INLINE cy_en_dmac_data_size_t Cy_DMAC_Descriptor_GetDataSize ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the Data Element Size of the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
Returns
The Data Element Size cy_en_dmac_data_size_t.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetSrcTransferSize()

__STATIC_INLINE cy_en_dmac_transfer_size_t Cy_DMAC_Descriptor_GetSrcTransferSize ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the Source Transfer Size of the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
Returns
The Source Transfer Size cy_en_dmac_transfer_size_t.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetDstTransferSize()

__STATIC_INLINE cy_en_dmac_transfer_size_t Cy_DMAC_Descriptor_GetDstTransferSize ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the Destination Transfer Size of the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
Returns
The Destination Transfer Size cy_en_dmac_transfer_size_t
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetRetrigger()

__STATIC_INLINE cy_en_dmac_retrigger_t Cy_DMAC_Descriptor_GetRetrigger ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns a value which specifies whether the controller should wait for the input trigger to be deactivated.

Parameters
descriptorThe descriptor structure instance.
Returns
The Retrigger setting cy_en_dmac_retrigger_t.
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);

◆ Cy_DMAC_Descriptor_GetChannelState()

__STATIC_INLINE cy_en_dmac_channel_state_t Cy_DMAC_Descriptor_GetChannelState ( cy_stc_dmac_descriptor_t const *  descriptor)

Returns the channel state on completion of the specified descriptor.

Parameters
descriptorThe descriptor structure instance.
Returns
The Channel State setting cy_en_dmac_channel_state_t
Function Usage
/* Scenario: Get the value of individual descriptor parameters dynamically. The snippet shows them all. */
/* This function assumes the 'descriptor' is initialized, see \ref Cy_DMAC_Enable description */
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(&descriptor);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(&descriptor);
int32_t srcXincrement = Cy_DMAC_Descriptor_GetXloopSrcIncrement(&descriptor);
int32_t dstXincrement = Cy_DMAC_Descriptor_GetXloopDstIncrement(&descriptor);
uint32_t xCount = Cy_DMAC_Descriptor_GetXloopDataCount(&descriptor);
int32_t srcYincrement = Cy_DMAC_Descriptor_GetYloopSrcIncrement(&descriptor);
int32_t dstYincrement = Cy_DMAC_Descriptor_GetYloopDstIncrement(&descriptor);
uint32_t yCount = Cy_DMAC_Descriptor_GetYloopDataCount(&descriptor);