Implementation specific interface for using the DMAC peripheral.
◆ _mtb_hal_dma_dmac_setup()
Sets up a HAL instance to use the specified hardware resource.
This hardware resource must have already been configured via the PDL.
- Parameters
-
| [out] | obj | The HAL driver instance object. The caller must allocate the memory for this object, but the HAL will initialize its contents |
| [in] | config | The configurator-generated HAL config structure for this peripheral instance |
- Returns
- the status of the HAL setup
◆ _mtb_hal_dma_dmac_set_src_addr()
Set the source address for the DMA transfer.
- Parameters
-
| [in] | obj | The DMA object |
| [in] | src_addr | The source address |
- Returns
- The status of the request
◆ _mtb_hal_dma_dmac_set_dst_addr()
Set the destination address for the DMA transfer.
- Parameters
-
| [in] | obj | The DMA object |
| [in] | dst_addr | The destination address |
- Returns
- The status of the request
◆ _mtb_hal_dma_dmac_set_length()
Set the length for the DMA transfer.
- Parameters
-
| [in] | obj | The DMA object |
| [in] | length | The transfer length, in bytes |
- Returns
- The status of the request
◆ _mtb_hal_dma_dmac_enable()
Enable the DMA transfer so that it can start transferring data when triggered.
A trigger is caused either by calling mtb_hal_dma_start_transfer or by hardware as a result of connection made using the interconnect components in the device configurator. The DMA can be disabled by calling mtb_hal_dma_disable
- Parameters
-
- Returns
- The status of the enable request
◆ _mtb_hal_dma_dmac_disable()
Disable the DMA transfer so that it does not continue to trigger.
It can be reenabled by calling mtb_hal_dma_enable
- Parameters
-
- Returns
- The status of the disable request
◆ _mtb_hal_dma_dmac_start_transfer()
Initiates DMA channel transfer for specified DMA object.
This should only be done after the channel has been configured and setup and any necessary event callbacks setup (mtb_hal_dma_register_callback mtb_hal_dma_enable_event)
- Parameters
-
- Returns
- The status of the start_transfer request
◆ _mtb_hal_dma_dmac_is_busy()
Checks if the transfer has been triggered, but not yet complete (eg: is pending, blocked or running)
- Parameters
-
- Returns
- True if DMA channel is busy
◆ _mtb_hal_dma_dmac_process_interrupt()
Process interrupts related related to a DMA instance.
- Parameters
-
| obj | HAL object for which the interrupt should be processed |
- Returns
- CY_RSLT_SUCCESS if the interrupt was processed successfully; otherwise an error
◆ _mtb_hal_dma_dmac_enable_event()
Configure DMA event enablement.
When an enabled event occurs, the function specified by mtb_hal_dma_register_callback will be called.
- Parameters
-
| [in] | obj | The DMA object |
| [in] | event | The DMA event type recent call will take precedence, i.e all events will have the same priority. |
| [in] | enable | True to turn on interrupts, False to turn off |
◆ _mtb_hal_dma_dmac_get_max_elements_per_burst()
| uint32_t _mtb_hal_dma_dmac_get_max_elements_per_burst |
( |
mtb_hal_dma_t * |
obj | ) |
|
Max number of elements, that can be transferred by one burst.
- Parameters
-
- Returns
- Max number of elements, that can be transferred by one burst