BL4S200 User’s Manual
130
anaOutDriver
int anaOutDriver(unsigned int cmd)
FUNCTION DESCRIPTION
Low-level driver to read the DAC128S085 D/A converter chip. It handles writing the
rawdata
output value to the D/A converter chip.
The synch/asynch D/A converter mode is critical for determining whether a strobe
needs to follow
anaOut in _bias_adc()
, so any mode change is detected here, not
relying on that mode to only be changed through the high-level
anaOutConfig()
function call.
PARAMETER
cmd
The
cmd
parameter format is as follows:
Use the following calculation and tables to determine
cmd
:
cmd = (channel<<12) | rawdata value
RETURN VALUE
0 — success.
BL_SPIBUSY
— SPI port busy.
D15–D12
D11–D0
channel
(0–7)
rawdata value
(0–4095)