RTEMS  5.1
Functions
dac_dma.c File Reference
#include "chip.h"
#include <stdint.h>
#include <assert.h>

Functions

uint32_t Dac_ConfigureDma (DacDma *pDacd, Dacc *pDacHw, uint8_t DacId, sXdmad *pXdmad)
 Initializes the DacDma structure and the corresponding DAC & DMA . hardware select value. The driver will uses DMA channel 0 for RX . The DMA channels are freed automatically when no DMA command processing. More...
 
uint32_t Dac_SendData (DacDma *pDacd, DacCmd *pCommand)
 Starts a DAC transfer. This is a non blocking function. It will return as soon as the transfer is started. More...
 

Detailed Description

Implementation of Digital-to-Analog Converter Controller (DACC).

Function Documentation

◆ Dac_ConfigureDma()

uint32_t Dac_ConfigureDma ( DacDma pDacd,
Dacc pDacHw,
uint8_t  DacId,
sXdmad pXdmad 
)

Initializes the DacDma structure and the corresponding DAC & DMA . hardware select value. The driver will uses DMA channel 0 for RX . The DMA channels are freed automatically when no DMA command processing.

Parameters
pDacdPointer to a DacDma instance.
pDacHwAssociated Dac peripheral.
DacIdDac peripheral identifier.
pDmadPointer to a Dmad instance.

◆ Dac_SendData()

uint32_t Dac_SendData ( DacDma pDacd,
DacCmd pCommand 
)

Starts a DAC transfer. This is a non blocking function. It will return as soon as the transfer is started.

Parameters
pDacdPointer to a DacDma instance.
pCommandPointer to the Dac command to execute.
Returns
0 if the transfer has been started successfully; otherwise returns DAC_ERROR_LOCK is the driver is in use, or DAC_ERROR if the command is not valid.