Appearance
DMA
DMA Driver.
Functions for interacting with peripheral devices via DMA
Functions Overview
| Name | |
|---|---|
| cw_driver_return_t | dma_acquire_channel(int hDev, dma_cb cb, void * p) Acquires a DMA channel. |
| cw_driver_return_t | dma_release_channel(int hDev, unsigned int channel) Releases a DMA channel. |
| cw_driver_return_t | dma_acquire_syncbit(int hDev) Acquires the synchronization bit for a DMA device. |
| cw_driver_return_t | dma_release_syncbit(int hDev, uint16_t bit) Releases a synchronization bit in a DMA channel. |
Function Details
function dma_acquire_channel
cpp
cw_driver_return_t dma_acquire_channel(
int hDev,
dma_cb cb,
void * p
)Acquires a DMA channel.
Parameters:
- hDev The handle of the device.
- cb Callback function to be called when DMA transfer is complete.
- p User-defined data to be passed to the callback function.
Return: cw_driver_return_t Returns CW_DRIVER_SUCCESS if successful, otherwise returns an error code.
This function acquires a DMA channel for the specified device.
function dma_release_channel
cpp
cw_driver_return_t dma_release_channel(
int hDev,
unsigned int channel
)Releases a DMA channel.
Parameters:
- hDev The handle to the device.
- channel The channel number to release.
Return: Returns 0 on success, or a negative value on failure.
This function releases a DMA channel associated with a device.
function dma_acquire_syncbit
cpp
cw_driver_return_t dma_acquire_syncbit(
int hDev
)Acquires the synchronization bit for a DMA device.
Parameters:
- hDev The handle of the DMA device.
Return: None
This function acquires the synchronization bit for the given DMA device.
function dma_release_syncbit
cpp
cw_driver_return_t dma_release_syncbit(
int hDev,
uint16_t bit
)Releases a synchronization bit in a DMA channel.
Parameters:
- hDev The handle of the device.
- bit The synchronization bit to be released.
Return: The result of the operation. Returns 0 on success, or a negative error code otherwise.
This function releases a synchronization bit in a DMA channel specified by the device handle. The synchronization bit that needs to be released is specified by the bit parameter.