Hardware Abstraction Layer (HAL)

General Description

Implementation specific interface for using the Datawire DMA peripheral.

Functions

cy_rslt_t _cyhal_dma_dw_init (cyhal_dma_t *obj, uint8_t priority)
 Initialize the Datawire peripheral. More...
 
void _cyhal_dma_dw_free (cyhal_dma_t *obj)
 Frees the Datawire specific DMA object. More...
 
cy_rslt_t _cyhal_dma_dw_configure (cyhal_dma_t *obj, const cyhal_dma_cfg_t *cfg)
 Setup a Datawire descriptor for the dma resource. More...
 
cy_rslt_t _cyhal_dma_dw_start_transfer (cyhal_dma_t *obj)
 Start a Datawire transfer. More...
 
void _cyhal_dma_dw_enable_event (cyhal_dma_t *obj, cyhal_dma_event_t event, uint8_t intr_priority, bool enable)
 Configure Datawire event enablement. More...
 
bool _cyhal_dma_dw_is_busy (cyhal_dma_t *obj)
 Checks whether a transfer is pending or running on the DMA channel. More...
 

Function Documentation

◆ _cyhal_dma_dw_init()

cy_rslt_t _cyhal_dma_dw_init ( cyhal_dma_t obj,
uint8_t  priority 
)

Initialize the Datawire 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_dw_free()

void _cyhal_dma_dw_free ( cyhal_dma_t obj)

Frees the Datawire specific DMA object.

Parameters
[in,out]objThe DMA object

◆ _cyhal_dma_dw_configure()

cy_rslt_t _cyhal_dma_dw_configure ( cyhal_dma_t obj,
const cyhal_dma_cfg_t cfg 
)

Setup a Datawire descriptor for the dma resource.

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

◆ _cyhal_dma_dw_start_transfer()

cy_rslt_t _cyhal_dma_dw_start_transfer ( cyhal_dma_t obj)

Start a Datawire transfer.

Initiates DMA channel transfer for specified DMA object

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

◆ _cyhal_dma_dw_enable_event()

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

Configure Datawire 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_dw_is_busy()

bool _cyhal_dma_dw_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