Hardware Abstraction Layer (HAL)
DMAC (Direct Memory Access Controller)

General Description

Implementation specific interface for using the DMAC DMA peripheral.

Functions

cy_rslt_t _cyhal_dma_dmac_init (cyhal_dma_t *obj, uint8_t priority)
 Initialize the DMAC peripheral. More...
 
void _cyhal_dma_dmac_free (cyhal_dma_t *obj)
 Frees the DMAC specific object. More...
 
cy_rslt_t _cyhal_dma_dmac_configure (cyhal_dma_t *obj, const cyhal_dma_cfg_t *cfg)
 Setup a DMAC descriptor for the dma resource. More...
 
cy_rslt_t _cyhal_dma_dmac_start_transfer (cyhal_dma_t *obj)
 Start a DMAC transfer. More...
 
void _cyhal_dma_dmac_enable_event (cyhal_dma_t *obj, cyhal_dma_event_t event, uint8_t intr_priority, bool enable)
 Configure DMAC event enablement. More...
 
bool _cyhal_dma_dmac_is_busy (cyhal_dma_t *obj)
 Checks whether a transfer is pending or running on the DMA channel. More...
 

Function Documentation

◆ _cyhal_dma_dmac_init()

cy_rslt_t _cyhal_dma_dmac_init ( cyhal_dma_t obj,
uint8_t  priority 
)

Initialize the DMAC peripheral.

Parameters
[out]objThe DMA object to initialize
[in]priorityThe priority of this DMA operation relative to others. Values must be between 0-3 with 0 being the highest priority.
Returns
The status of the init request

◆ _cyhal_dma_dmac_free()

void _cyhal_dma_dmac_free ( cyhal_dma_t obj)

Frees the DMAC specific object.

Parameters
[in,out]objThe DMA object

◆ _cyhal_dma_dmac_configure()

cy_rslt_t _cyhal_dma_dmac_configure ( cyhal_dma_t obj,
const cyhal_dma_cfg_t cfg 
)

Setup a DMAC descriptor for the dma resource.

Parameters
[in]objThe DMA object
[in]cfgConfiguration parameters for the transfer
Returns
The status of the configure request

◆ _cyhal_dma_dmac_start_transfer()

cy_rslt_t _cyhal_dma_dmac_start_transfer ( cyhal_dma_t obj)

Start a DMAC transfer.

Initiates DMA channel transfer for specified DMA object

Parameters
[in]objThe DMA object
Returns
The status of the start_transfer request

◆ _cyhal_dma_dmac_enable_event()

void _cyhal_dma_dmac_enable_event ( cyhal_dma_t obj,
cyhal_dma_event_t  event,
uint8_t  intr_priority,
bool  enable 
)

Configure DMAC event enablement.

Parameters
[in]objThe DMA object
[in]eventThe DMA event type
[in]intr_priorityThe priority for NVIC interrupt events. The priority from the most recent call will take precedence, i.e all events will have the same priority.
[in]enableTrue to turn on interrupts, False to turn off

◆ _cyhal_dma_dmac_is_busy()

bool _cyhal_dma_dmac_is_busy ( cyhal_dma_t obj)

Checks whether a transfer is pending or running on the DMA channel.

Parameters
[in]objThe DMA object
Returns
True if DMA channel is busy