6.6.4.1.3 Function dac_init()
Initialize the DAC device struct.
enum status_code dac_init( struct dac_module *const dev_inst, Dac *const module, struct dac_config *const config)
Use this function to initialize the Digital to Analog Converter. Resets the underlying hardware module and configures it.
Data direction | Parameter name | Description |
---|---|---|
[out] |
module_inst |
Pointer to the DAC software instance struct |
[in] |
module |
Pointer to the DAC module instance |
[in] |
config |
Pointer to the config struct, created by the user application |
Returns
Status of initialization.
Return value | Description |
---|---|
STATUS_OK |
Module initiated correctly |
STATUS_ERR_DENIED |
If module is enabled |
STATUS_BUSY |
If module is busy resetting |