File syn_port_dac.h¶
FileList > port > syn_port_dac.h
Go to the source code of this file
Platform port: Digital-to-Analog Converter (DAC). More...
#include "../common/syn_defs.h"#include <stdint.h>
Public Functions¶
| Type | Name |
|---|---|
| SYN_Status | syn_port_dac_init (uint8_t channel) Initialize a DAC channel. |
| uint16_t | syn_port_dac_reference_mv (void) Return the DAC reference voltage in millivolts. |
| uint8_t | syn_port_dac_resolution (void) Return the DAC resolution in bits (e.g. 12 for a 12-bit DAC). |
| SYN_Status | syn_port_dac_write (uint8_t channel, uint16_t value) Write a raw value to a DAC channel. |
Detailed Description¶
Mirrors syn_port_adc.h. Implementors provide these four functions for the target hardware DAC channels.
Public Functions Documentation¶
function syn_port_dac_init¶
Initialize a DAC channel.
Parameters:
channelPlatform-specific channel index.
Returns:
SYN_OK on success.
function syn_port_dac_reference_mv¶
Return the DAC reference voltage in millivolts.
Returns:
Reference voltage in mV.
function syn_port_dac_resolution¶
Return the DAC resolution in bits (e.g. 12 for a 12-bit DAC).
Returns:
Resolution in bits.
function syn_port_dac_write¶
Write a raw value to a DAC channel.
Parameters:
channelPlatform-specific channel index.valueRaw counts (0 .. (1 << resolution) - 1).
Returns:
SYN_OK on success.
The documentation for this class was generated from the following file src/syntropic/port/syn_port_dac.h