SAM Peripheral Digital-to-Analog Converter Driver.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
static void | _dac_set_config (struct dac_module *const module_inst, struct dac_config *const config) |
void | dac_chan_disable (struct dac_module *const module_inst, enum dac_channel channel) |
Disable a DAC channel. More... | |
void | dac_chan_disable_output_buffer (struct dac_module *const module_inst, enum dac_channel channel) |
Disable the output buffer. More... | |
void | dac_chan_enable (struct dac_module *const module_inst, enum dac_channel channel) |
Enable a DAC channel. More... | |
void | dac_chan_enable_output_buffer (struct dac_module *const module_inst, enum dac_channel channel) |
Enable the output buffer. More... | |
void | dac_chan_get_config_defaults (struct dac_chan_config *const config) |
Initializes a DAC channel configuration structure to defaults. More... | |
void | dac_chan_set_config (struct dac_module *const module_inst, const enum dac_channel channel, struct dac_chan_config *const config) |
Writes a DAC channel configuration to the hardware module. More... | |
enum status_code | dac_chan_write (struct dac_module *const module_inst, enum dac_channel channel, const uint16_t data) |
Write to the DAC. More... | |
enum status_code | dac_chan_write_buffer_wait (struct dac_module *const module_inst, enum dac_channel channel, uint16_t *buffer, uint32_t length) |
Write to the DAC. More... | |
void | dac_clear_status (struct dac_module *const module_inst, uint32_t status_flags) |
Clears a module status flag. More... | |
void | dac_disable (struct dac_module *const module_inst) |
Disable the DAC module. More... | |
void | dac_disable_events (struct dac_module *const module_inst, struct dac_events *const events) |
Disables a DAC event input or output. More... | |
void | dac_enable (struct dac_module *const module_inst) |
Enable the DAC module. More... | |
void | dac_enable_events (struct dac_module *const module_inst, struct dac_events *const events) |
Enables a DAC event input or output. More... | |
void | dac_get_config_defaults (struct dac_config *const config) |
Initializes a DAC configuration structure to defaults. More... | |
uint32_t | dac_get_status (struct dac_module *const module_inst) |
Retrieves the current module status. More... | |
enum status_code | dac_init (struct dac_module *const module_inst, Dac *const module, struct dac_config *const config) |
Initialize the DAC device struct. More... | |
bool | dac_is_syncing (struct dac_module *const dev_inst) |
Determines if the hardware module(s) are currently synchronizing to the bus. More... | |
void | dac_reset (struct dac_module *const module_inst) |
Resets the DAC module. More... | |
|
static |
Writes a DAC configuration to the hardware module.
Writes out a given configuration to the hardware module.
[out] | module_inst | Pointer to the DAC software instance struct |
[in] | config | Pointer to the configuration struct |
References Assert, dac_is_syncing(), dac_config::left_adjust, dac_config::output, dac_config::reference, dac_config::run_in_standby, and dac_config::voltage_pump_disable.
Referenced by dac_init().