MityDSP::tcDspDac8534 Class Reference
Instances of this class handle access to a TI DAC8534 digital-to-analog converter via the generic SPI interface for the MityDSP.
More...
#include <core/DspDac8534.h>
List of all members.
Detailed Description
Instances of this class handle access to a TI DAC8534 digital-to-analog converter via the generic SPI interface for the MityDSP.
- See also:
- tcDspDac8534 Page
Member Enumeration Documentation
The teLoadCommand enumeration defines various options for loading one or more 8534 devices on the SPI bus.
- Enumerator:
eeLoadNone |
don't load value into DAC
|
eeLoadSingle |
load value into current channel
|
eeLoadAll |
load all channels with their current data
|
eeBroadcast |
broadcast to all DAC's on this SPI
|
Constructor & Destructor Documentation
tcDspDac8534::tcDspDac8534 |
( |
tcDspSpi * |
apSpi, |
|
|
unsigned int |
anSpiAddr, |
|
|
tcDspOutputLatch * |
apLatch = NULL , |
|
|
unsigned int |
anLatchID = 0 | |
|
) |
| | |
This constructor is used to open an interface to a DAC8534 via the provided SPI interface.
- Parameters:
-
[in] | apSpi | Pointer to the SPI interface for the DAC8534. |
[in] | anSpiAddr | Address of device on the SPI (0-3). |
[in] | apLatch | Point to an output latch (default:NULL) |
[in] | anLatchID | ID of the latch to use for this device, if any |
- Returns:
- None.
- See also:
- DspDac8534.h
tcDspDac8534::~tcDspDac8534 |
( |
|
) |
|
Member Function Documentation
bool tcDspDac8534::update |
( |
unsigned int |
anChannel, |
|
|
unsigned short |
anData, |
|
|
teLoadCommand |
aeLoad = eeLoadSingle | |
|
) |
| | |
Updates the specified DAC channel with the provided 16-bit data.
By default, the data is loaded to the DAC output immediately. However, the data can also be written and not loaded, or the data can be written and all DAC channels loaded (this supports simultaneously changing the values on all 4 channels).
- Parameters:
-
[in] | anChannel | DAC channel to write (0-3). |
[in] | anData | 16-bit data to load to specified DAC channel. |
[in] | aeLoad | Specifies if and when data is loaded (eeLoadNone, eeLoadSingle, eeLoadAll). |
- Returns:
- true if successful
- See also:
- DspDac8534.h
Member Data Documentation
Constants for each of the 4 available channels on this device.
Device address on SPI bus.
Access to latch selector.
ID of latch to use (if any).
Last data written to DAC.