CAT2 Peripheral Driver Library

Functions

cy_en_dmac_status_t Cy_DMAC_Descriptor_Init (DMAC_Type *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor, const cy_stc_dmac_descriptor_config_t *config)
 Initializes the descriptor structure from a pre-initialized configuration structure. More...
 
void Cy_DMAC_Descriptor_DeInit (DMAC_Type *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Clears the content of the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetState (DMAC_Type *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor, bool valid)
 Sets the state of the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetSrcAddress (DMAC_Type *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor, void volatile const *srcAddress)
 Sets the source address parameter for the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetDstAddress (DMAC_Type *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor, void volatile *dstAddress)
 Sets the destination address parameter for the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetDataCount (DMAC_Type *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor, uint32_t count)
 Sets the number of data elements of the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetSrcIncrement (DMAC_Type *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor, bool increment)
 Sets the source increment parameter for the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetDstIncrement (DMAC_Type *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor, bool increment)
 Sets the destination increment parameter for the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetDataSize (DMAC_Type *base, uint32_t channel, cy_en_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 (DMAC_Type *base, uint32_t channel, cy_en_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 (DMAC_Type *base, uint32_t channel, cy_en_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 (DMAC_Type *base, uint32_t channel, cy_en_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_SetFlipping (DMAC_Type *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor, bool flipping)
 Enables/disables the descriptor flipping parameter of the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetTriggerType (DMAC_Type *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor, cy_en_dmac_trigger_type_t triggerType)
 Sets the mode of the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetPreemptable (DMAC_Type *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor, bool preemptable)
 Sets the preemptable value for the specified descriptor. More...
 
__STATIC_INLINE void Cy_DMAC_Descriptor_SetCpltState (DMAC_Type *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor, bool invalidate)
 Sets the invalidate value for the specified descriptor. More...
 
__STATIC_INLINE bool Cy_DMAC_Descriptor_GetState (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns a state of the specified descriptor. More...
 
__STATIC_INLINE void * Cy_DMAC_Descriptor_GetSrcAddress (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the source address parameter of the specified descriptor. More...
 
__STATIC_INLINE void * Cy_DMAC_Descriptor_GetDstAddress (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the destination address parameter of the specified descriptor. More...
 
__STATIC_INLINE uint32_t Cy_DMAC_Descriptor_GetDataCount (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the number of data elements of the specified descriptor. More...
 
__STATIC_INLINE bool Cy_DMAC_Descriptor_GetSrcIncrement (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the source increment parameter for the specified descriptor. More...
 
__STATIC_INLINE bool Cy_DMAC_Descriptor_GetDstIncrement (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the destination increment parameter for the specified descriptor. More...
 
__STATIC_INLINE uint32_t Cy_DMAC_Descriptor_GetCurrentIndex (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the current transfer data element index of the specified descriptor. More...
 
__STATIC_INLINE cy_en_dmac_data_size_t Cy_DMAC_Descriptor_GetDataSize (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the Data Element Size of the specified descriptor. More...
 
__STATIC_INLINE cy_en_dmac_transfer_size_t Cy_DMAC_Descriptor_GetSrcTransferSize (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the Source Transfer Size of the specified descriptor. More...
 
__STATIC_INLINE cy_en_dmac_transfer_size_t Cy_DMAC_Descriptor_GetDstTransferSize (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the Destination Transfer Size of the specified descriptor. More...
 
__STATIC_INLINE cy_en_dmac_retrigger_t Cy_DMAC_Descriptor_GetRetrigger (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the value, which specifies whether the controller should wait for the input trigger to be deactivated. More...
 
__STATIC_INLINE bool Cy_DMAC_Descriptor_GetFlipping (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the flipping parameter of the specified descriptor. More...
 
__STATIC_INLINE cy_en_dmac_trigger_type_t Cy_DMAC_Descriptor_GetTriggerType (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the mode of the specified descriptor. More...
 
__STATIC_INLINE cy_en_dmac_response_t Cy_DMAC_Descriptor_GetResponse (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the last transfer response code. More...
 
__STATIC_INLINE bool Cy_DMAC_Descriptor_GetPreemptable (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the preemptable value for the specified descriptor. More...
 
__STATIC_INLINE bool Cy_DMAC_Descriptor_GetCpltState (DMAC_Type const *base, uint32_t channel, cy_en_dmac_descriptor_t descriptor)
 Returns the completion state parameter for the specified descriptor. More...
 

Detailed Description

Function Documentation

◆ Cy_DMAC_Descriptor_Init()

cy_en_dmac_status_t Cy_DMAC_Descriptor_Init ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
const cy_stc_dmac_descriptor_config_t config 
)

Initializes the descriptor structure from a pre-initialized configuration structure.

This function initializes only one ping/pong descriptor and not the channel.

Parameters
baseThe pointer to the hardware DMAC block.
channelA channel number.
descriptorThe ping/pong descriptor.
configThis is a configuration structure that has all initialization information for the descriptor.
Returns
The status /ref cy_en_dmac_status_t.
Function Usage
/* Scenario: Initialize the single ping descriptor */
#define DATA_CNT (8U)
#define CHANN_NUM (0U)
uint32_t src[DATA_CNT];
uint32_t dst[DATA_CNT];
/* Descriptor ping configuration structure */
cy_stc_dmac_descriptor_config_t descriptorPingCfg =
{
.srcAddress = src,
.dstAddress = dst,
.dataCount = DATA_CNT,
.dataSize = CY_DMAC_WORD,
.srcTransferSize = CY_DMAC_TRANSFER_SIZE_WORD,
.srcAddrIncrement = true,
.dstTransferSize = CY_DMAC_TRANSFER_SIZE_WORD,
.dstAddrIncrement = true,
.retrigger = CY_DMAC_RETRIG_IM,
.cpltState = false,
.interrupt = false,
.preemptable = false,
.flipping = false,
.triggerType = CY_DMAC_SINGLE_DESCR
};
/* Channel configuration structure */
{
.priority = 3U,
.enable = false,
};
/* Initialize the ping descriptor for channel 0 */
if (CY_DMAC_SUCCESS != Cy_DMAC_Descriptor_Init(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING, &descriptorPingCfg))
{
/* Insert error handling */
}
/* Scenario: Setup and enable DMAC channel 0 */
if (CY_DMAC_SUCCESS != Cy_DMAC_Channel_Init(DMAC, CHANN_NUM, &channelConfig))
{
/* Insert error handling */
}

◆ Cy_DMAC_Descriptor_DeInit()

void Cy_DMAC_Descriptor_DeInit ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Clears the content of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe descriptor structure instance.
Function Usage
/* Scenario: Invalidate the pong descriptor for channel 0 */
#define CHANN_NUM (0U)
if (CHANN_NUM != Cy_DMAC_GetActiveChannel(DMAC))
{
/* Make sure it is not in use */
{
}
}

◆ Cy_DMAC_Descriptor_SetState()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetState ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
bool  valid 
)

Sets the state of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
validtrue - validate, false - invalidate.
Note
If descriptor is initialized dynamically there is a need to set state to invalid before initialization and to valid after. Do this to prevent the descriptor execution with wrong parameters.
Function Usage
/* Scenario: Enable the descriptor and channel after an invalidated descriptor trigger */
#define CHANN_NUM (0U)
if(CY_DMAC_INVALID_DESCR == descrResp)
{
/* Validate the invalidated descriptor after it is processed and enable the channel */
Cy_DMAC_Channel_Enable(DMAC, CHANN_NUM);
}

◆ Cy_DMAC_Descriptor_SetSrcAddress()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetSrcAddress ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
void volatile const *  srcAddress 
)

Sets the source address parameter for the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
srcAddressThe source address value for the descriptor.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATACNT (8)
#define CHANN_NUM (0U)
uint32_t src[DATACNT];
uint32_t dst[DATACNT];
if (CY_DMAC_DESCRIPTOR_PING != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0U)) /* Make sure it is not in use */
{
/* Invalidate the descriptor before modify to prevent execution */
/* Validate descriptor after modifying */
}

◆ Cy_DMAC_Descriptor_SetDstAddress()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetDstAddress ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
void volatile *  dstAddress 
)

Sets the destination address parameter for the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
dstAddressThe destination address value for the descriptor.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATACNT (8)
#define CHANN_NUM (0U)
uint32_t src[DATACNT];
uint32_t dst[DATACNT];
if (CY_DMAC_DESCRIPTOR_PING != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0U)) /* Make sure it is not in use */
{
/* Invalidate the descriptor before modify to prevent execution */
/* Validate descriptor after modifying */
}

◆ Cy_DMAC_Descriptor_SetDataCount()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetDataCount ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
uint32_t  count 
)

Sets the number of data elements of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
countThe natural number of data elements to transfer, for example, "1" means one data element is transferred. The valid range is 1...65536.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATACNT (8)
#define CHANN_NUM (0U)
uint32_t src[DATACNT];
uint32_t dst[DATACNT];
if (CY_DMAC_DESCRIPTOR_PING != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0U)) /* Make sure it is not in use */
{
/* Invalidate the descriptor before modify to prevent execution */
/* Validate descriptor after modifying */
}

◆ Cy_DMAC_Descriptor_SetSrcIncrement()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetSrcIncrement ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
bool  increment 
)

Sets the source increment parameter for the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
incrementThe value of the source increment parameter, true - the address increment is enabled.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATACNT (8)
#define CHANN_NUM (0U)
uint32_t src[DATACNT];
uint32_t dst[DATACNT];
if (CY_DMAC_DESCRIPTOR_PING != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0U)) /* Make sure it is not in use */
{
/* Invalidate the descriptor before modify to prevent execution */
/* Validate descriptor after modifying */
}

◆ Cy_DMAC_Descriptor_SetDstIncrement()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetDstIncrement ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
bool  increment 
)

Sets the destination increment parameter for the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
incrementThe value of the destination increment parameter, true - the address increment is enabled.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATACNT (8)
#define CHANN_NUM (0U)
uint32_t src[DATACNT];
uint32_t dst[DATACNT];
if (CY_DMAC_DESCRIPTOR_PING != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0U)) /* Make sure it is not in use */
{
/* Invalidate the descriptor before modify to prevent execution */
/* Validate descriptor after modifying */
}

◆ Cy_DMAC_Descriptor_SetDataSize()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetDataSize ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
cy_en_dmac_data_size_t  dataSize 
)

Sets the Data Element Size parameter for the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
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 DATACNT (8)
#define CHANN_NUM (0U)
uint32_t src[DATACNT];
uint32_t dst[DATACNT];
if (CY_DMAC_DESCRIPTOR_PING != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0U)) /* Make sure it is not in use */
{
/* Invalidate the descriptor before modify to prevent execution */
/* Validate descriptor after modifying */
}

◆ Cy_DMAC_Descriptor_SetSrcTransferSize()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetSrcTransferSize ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
cy_en_dmac_transfer_size_t  srcTransferSize 
)

Sets the Source Transfer Size parameter for the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
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 DATACNT (8)
#define CHANN_NUM (0U)
uint32_t src[DATACNT];
uint32_t dst[DATACNT];
if (CY_DMAC_DESCRIPTOR_PING != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0U)) /* Make sure it is not in use */
{
/* Invalidate the descriptor before modify to prevent execution */
/* Validate descriptor after modifying */
}

◆ Cy_DMAC_Descriptor_SetDstTransferSize()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetDstTransferSize ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
cy_en_dmac_transfer_size_t  dstTransferSize 
)

Sets the Destination Transfer Size parameter for the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
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 DATACNT (8)
#define CHANN_NUM (0U)
uint32_t src[DATACNT];
uint32_t dst[DATACNT];
if (CY_DMAC_DESCRIPTOR_PING != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0U)) /* Make sure it is not in use */
{
/* Invalidate the descriptor before modify to prevent execution */
/* Validate descriptor after modifying */
}

◆ Cy_DMAC_Descriptor_SetRetrigger()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetRetrigger ( DMAC_Type base,
uint32_t  channel,
cy_en_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
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
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 DATACNT (8)
#define CHANN_NUM (0U)
uint32_t src[DATACNT];
uint32_t dst[DATACNT];
if (CY_DMAC_DESCRIPTOR_PING != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0U)) /* Make sure it is not in use */
{
/* Invalidate the descriptor before modify to prevent execution */
/* Validate descriptor after modifying */
}

◆ Cy_DMAC_Descriptor_SetFlipping()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetFlipping ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
bool  flipping 
)

Enables/disables the descriptor flipping parameter of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
flippingEnable descriptor flipping.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATACNT (8)
#define CHANN_NUM (0U)
uint32_t src[DATACNT];
uint32_t dst[DATACNT];
if (CY_DMAC_DESCRIPTOR_PING != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0U)) /* Make sure it is not in use */
{
/* Invalidate the descriptor before modify to prevent execution */
/* Validate descriptor after modifying */
}

◆ Cy_DMAC_Descriptor_SetTriggerType()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetTriggerType ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
cy_en_dmac_trigger_type_t  triggerType 
)

Sets the mode of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
triggerTypeThe descriptor trigger type, see cy_en_dmac_trigger_type_t.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATACNT (8)
#define CHANN_NUM (0U)
uint32_t src[DATACNT];
uint32_t dst[DATACNT];
if (CY_DMAC_DESCRIPTOR_PING != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0U)) /* Make sure it is not in use */
{
/* Invalidate the descriptor before modify to prevent execution */
/* Validate descriptor after modifying */
}

◆ Cy_DMAC_Descriptor_SetPreemptable()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetPreemptable ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
bool  preemptable 
)

Sets the preemptable value for the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
preemptableThe preemptable control value: true - enabled, false - disabled.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATACNT (8)
#define CHANN_NUM (0U)
uint32_t src[DATACNT];
uint32_t dst[DATACNT];
if (CY_DMAC_DESCRIPTOR_PING != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0U)) /* Make sure it is not in use */
{
/* Invalidate the descriptor before modify to prevent execution */
/* Validate descriptor after modifying */
}

◆ Cy_DMAC_Descriptor_SetCpltState()

__STATIC_INLINE void Cy_DMAC_Descriptor_SetCpltState ( DMAC_Type base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor,
bool  invalidate 
)

Sets the invalidate value for the specified descriptor.

If true - the descriptor will be invalidated on completion.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
invalidateThe invalidate control value: true - enabled, false - disabled.
Function Usage
/* Scenario: Set or modify individual descriptor parameters dynamically. This snippet shows them all. */
#define DATACNT (8)
#define CHANN_NUM (0U)
uint32_t src[DATACNT];
uint32_t dst[DATACNT];
if (CY_DMAC_DESCRIPTOR_PING != Cy_DMAC_Channel_GetCurrentDescriptor(DMAC, 0U)) /* Make sure it is not in use */
{
/* Invalidate the descriptor before modify to prevent execution */
/* Validate descriptor after modifying */
}

◆ Cy_DMAC_Descriptor_GetState()

__STATIC_INLINE bool Cy_DMAC_Descriptor_GetState ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns a state of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
Returns
The state of descriptor. true - validated, false - invalidated.
Function Usage
/* Scenario: Set the ping descriptor as active for the channel and validate if it was invalidated before */
#define CHANN_NUM (0U)
{
/* Validate the descriptor */
}

◆ Cy_DMAC_Descriptor_GetSrcAddress()

__STATIC_INLINE void * Cy_DMAC_Descriptor_GetSrcAddress ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the source address parameter of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
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 */
#define CHANN_NUM (0U)
bool state = Cy_DMAC_Descriptor_GetState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
uint32_t dataCount = Cy_DMAC_Descriptor_GetDataCount(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool srcAddrIncrement = Cy_DMAC_Descriptor_GetSrcIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool dstAddrIncrement = Cy_DMAC_Descriptor_GetDstIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool cpltState = Cy_DMAC_Descriptor_GetCpltState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool preemptable = Cy_DMAC_Descriptor_GetPreemptable(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool flipping = Cy_DMAC_Descriptor_GetFlipping(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);

◆ Cy_DMAC_Descriptor_GetDstAddress()

__STATIC_INLINE void * Cy_DMAC_Descriptor_GetDstAddress ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the destination address parameter of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
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 */
#define CHANN_NUM (0U)
bool state = Cy_DMAC_Descriptor_GetState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
uint32_t dataCount = Cy_DMAC_Descriptor_GetDataCount(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool srcAddrIncrement = Cy_DMAC_Descriptor_GetSrcIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool dstAddrIncrement = Cy_DMAC_Descriptor_GetDstIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool cpltState = Cy_DMAC_Descriptor_GetCpltState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool preemptable = Cy_DMAC_Descriptor_GetPreemptable(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool flipping = Cy_DMAC_Descriptor_GetFlipping(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);

◆ Cy_DMAC_Descriptor_GetDataCount()

__STATIC_INLINE uint32_t Cy_DMAC_Descriptor_GetDataCount ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the number of data elements of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
Returns
The natural number of data elements to transfer, for example, "1" means one data element is transferred. 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 */
#define CHANN_NUM (0U)
bool state = Cy_DMAC_Descriptor_GetState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
uint32_t dataCount = Cy_DMAC_Descriptor_GetDataCount(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool srcAddrIncrement = Cy_DMAC_Descriptor_GetSrcIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool dstAddrIncrement = Cy_DMAC_Descriptor_GetDstIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool cpltState = Cy_DMAC_Descriptor_GetCpltState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool preemptable = Cy_DMAC_Descriptor_GetPreemptable(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool flipping = Cy_DMAC_Descriptor_GetFlipping(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);

◆ Cy_DMAC_Descriptor_GetSrcIncrement()

__STATIC_INLINE bool Cy_DMAC_Descriptor_GetSrcIncrement ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the source increment parameter for the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
Returns
The value of the source increment parameter, true - the address increment is enabled.
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 */
#define CHANN_NUM (0U)
bool state = Cy_DMAC_Descriptor_GetState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
uint32_t dataCount = Cy_DMAC_Descriptor_GetDataCount(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool srcAddrIncrement = Cy_DMAC_Descriptor_GetSrcIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool dstAddrIncrement = Cy_DMAC_Descriptor_GetDstIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool cpltState = Cy_DMAC_Descriptor_GetCpltState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool preemptable = Cy_DMAC_Descriptor_GetPreemptable(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool flipping = Cy_DMAC_Descriptor_GetFlipping(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);

◆ Cy_DMAC_Descriptor_GetDstIncrement()

__STATIC_INLINE bool Cy_DMAC_Descriptor_GetDstIncrement ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the destination increment parameter for the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
Returns
The value of the destination increment parameter, true - the address increment is enabled.
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 */
#define CHANN_NUM (0U)
bool state = Cy_DMAC_Descriptor_GetState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
uint32_t dataCount = Cy_DMAC_Descriptor_GetDataCount(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool srcAddrIncrement = Cy_DMAC_Descriptor_GetSrcIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool dstAddrIncrement = Cy_DMAC_Descriptor_GetDstIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool cpltState = Cy_DMAC_Descriptor_GetCpltState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool preemptable = Cy_DMAC_Descriptor_GetPreemptable(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool flipping = Cy_DMAC_Descriptor_GetFlipping(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);

◆ Cy_DMAC_Descriptor_GetCurrentIndex()

__STATIC_INLINE uint32_t Cy_DMAC_Descriptor_GetCurrentIndex ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the current transfer data element index of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
Returns
Returns the current transfer index for the desired descriptor.
Function Usage
/* Scenario: Make sure the current indexes are greater than a desired
* data source item before modifying for ping descriptor in case if it executing.
*/
#define CHANN_NUM (0U)
uint32_t src[16][16];
uint32_t idx = 7U;
{
if (((void*) src == Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING)) &&
{
/* Modify the src arrays content here */
}
}

◆ Cy_DMAC_Descriptor_GetDataSize()

__STATIC_INLINE cy_en_dmac_data_size_t Cy_DMAC_Descriptor_GetDataSize ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the Data Element Size of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
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 */
#define CHANN_NUM (0U)
bool state = Cy_DMAC_Descriptor_GetState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
uint32_t dataCount = Cy_DMAC_Descriptor_GetDataCount(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool srcAddrIncrement = Cy_DMAC_Descriptor_GetSrcIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool dstAddrIncrement = Cy_DMAC_Descriptor_GetDstIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool cpltState = Cy_DMAC_Descriptor_GetCpltState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool preemptable = Cy_DMAC_Descriptor_GetPreemptable(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool flipping = Cy_DMAC_Descriptor_GetFlipping(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);

◆ Cy_DMAC_Descriptor_GetSrcTransferSize()

__STATIC_INLINE cy_en_dmac_transfer_size_t Cy_DMAC_Descriptor_GetSrcTransferSize ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the Source Transfer Size of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
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 */
#define CHANN_NUM (0U)
bool state = Cy_DMAC_Descriptor_GetState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
uint32_t dataCount = Cy_DMAC_Descriptor_GetDataCount(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool srcAddrIncrement = Cy_DMAC_Descriptor_GetSrcIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool dstAddrIncrement = Cy_DMAC_Descriptor_GetDstIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool cpltState = Cy_DMAC_Descriptor_GetCpltState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool preemptable = Cy_DMAC_Descriptor_GetPreemptable(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool flipping = Cy_DMAC_Descriptor_GetFlipping(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);

◆ Cy_DMAC_Descriptor_GetDstTransferSize()

__STATIC_INLINE cy_en_dmac_transfer_size_t Cy_DMAC_Descriptor_GetDstTransferSize ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the Destination Transfer Size of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
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 */
#define CHANN_NUM (0U)
bool state = Cy_DMAC_Descriptor_GetState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
uint32_t dataCount = Cy_DMAC_Descriptor_GetDataCount(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool srcAddrIncrement = Cy_DMAC_Descriptor_GetSrcIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool dstAddrIncrement = Cy_DMAC_Descriptor_GetDstIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool cpltState = Cy_DMAC_Descriptor_GetCpltState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool preemptable = Cy_DMAC_Descriptor_GetPreemptable(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool flipping = Cy_DMAC_Descriptor_GetFlipping(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);

◆ Cy_DMAC_Descriptor_GetRetrigger()

__STATIC_INLINE cy_en_dmac_retrigger_t Cy_DMAC_Descriptor_GetRetrigger ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

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

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
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 */
#define CHANN_NUM (0U)
bool state = Cy_DMAC_Descriptor_GetState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
uint32_t dataCount = Cy_DMAC_Descriptor_GetDataCount(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool srcAddrIncrement = Cy_DMAC_Descriptor_GetSrcIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool dstAddrIncrement = Cy_DMAC_Descriptor_GetDstIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool cpltState = Cy_DMAC_Descriptor_GetCpltState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool preemptable = Cy_DMAC_Descriptor_GetPreemptable(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool flipping = Cy_DMAC_Descriptor_GetFlipping(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);

◆ Cy_DMAC_Descriptor_GetFlipping()

__STATIC_INLINE bool Cy_DMAC_Descriptor_GetFlipping ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the flipping parameter of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
Returns
The flipping mode.
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 */
#define CHANN_NUM (0U)
bool state = Cy_DMAC_Descriptor_GetState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
uint32_t dataCount = Cy_DMAC_Descriptor_GetDataCount(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool srcAddrIncrement = Cy_DMAC_Descriptor_GetSrcIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool dstAddrIncrement = Cy_DMAC_Descriptor_GetDstIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool cpltState = Cy_DMAC_Descriptor_GetCpltState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool preemptable = Cy_DMAC_Descriptor_GetPreemptable(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool flipping = Cy_DMAC_Descriptor_GetFlipping(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);

◆ Cy_DMAC_Descriptor_GetTriggerType()

__STATIC_INLINE cy_en_dmac_trigger_type_t Cy_DMAC_Descriptor_GetTriggerType ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the mode of the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
Returns
The descriptor trigger 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 */
#define CHANN_NUM (0U)
bool state = Cy_DMAC_Descriptor_GetState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
uint32_t dataCount = Cy_DMAC_Descriptor_GetDataCount(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool srcAddrIncrement = Cy_DMAC_Descriptor_GetSrcIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool dstAddrIncrement = Cy_DMAC_Descriptor_GetDstIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool cpltState = Cy_DMAC_Descriptor_GetCpltState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool preemptable = Cy_DMAC_Descriptor_GetPreemptable(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool flipping = Cy_DMAC_Descriptor_GetFlipping(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);

◆ Cy_DMAC_Descriptor_GetResponse()

__STATIC_INLINE cy_en_dmac_response_t Cy_DMAC_Descriptor_GetResponse ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the last transfer response code.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
Returns
Returns the response code cy_en_dmac_response_t.
Function Usage
/* Scenario: Enable the descriptor and channel after an invalidated descriptor trigger */
#define CHANN_NUM (0U)
if(CY_DMAC_INVALID_DESCR == descrResp)
{
/* Validate the invalidated descriptor after it is processed and enable the channel */
Cy_DMAC_Channel_Enable(DMAC, CHANN_NUM);
}

◆ Cy_DMAC_Descriptor_GetPreemptable()

__STATIC_INLINE bool Cy_DMAC_Descriptor_GetPreemptable ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the preemptable value for the specified descriptor.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
Returns
The preemptable control value: true - enabled, false - disabled.
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 */
#define CHANN_NUM (0U)
bool state = Cy_DMAC_Descriptor_GetState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
uint32_t dataCount = Cy_DMAC_Descriptor_GetDataCount(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool srcAddrIncrement = Cy_DMAC_Descriptor_GetSrcIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool dstAddrIncrement = Cy_DMAC_Descriptor_GetDstIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool cpltState = Cy_DMAC_Descriptor_GetCpltState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool preemptable = Cy_DMAC_Descriptor_GetPreemptable(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool flipping = Cy_DMAC_Descriptor_GetFlipping(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);

◆ Cy_DMAC_Descriptor_GetCpltState()

__STATIC_INLINE bool Cy_DMAC_Descriptor_GetCpltState ( DMAC_Type const *  base,
uint32_t  channel,
cy_en_dmac_descriptor_t  descriptor 
)

Returns the completion state parameter for the specified descriptor.

If true - the descriptor will be invalidated on completion.

Parameters
baseThe pointer to the hardware DMAC block.
channelThe channel number.
descriptorThe ping/pong descriptor.
Returns
Returns the invalidate control value: true - enabled, false - disabled.
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 */
#define CHANN_NUM (0U)
bool state = Cy_DMAC_Descriptor_GetState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * srcAddress = Cy_DMAC_Descriptor_GetSrcAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
void * dstAddress = Cy_DMAC_Descriptor_GetDstAddress(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
uint32_t dataCount = Cy_DMAC_Descriptor_GetDataCount(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool srcAddrIncrement = Cy_DMAC_Descriptor_GetSrcIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool dstAddrIncrement = Cy_DMAC_Descriptor_GetDstIncrement(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool cpltState = Cy_DMAC_Descriptor_GetCpltState(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool preemptable = Cy_DMAC_Descriptor_GetPreemptable(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);
bool flipping = Cy_DMAC_Descriptor_GetFlipping(DMAC, CHANN_NUM, CY_DMAC_DESCRIPTOR_PING);