2.6.4.1.1 Function adc_init()

Initializes the ADC.

enum status_code adc_init( struct adc_module *const module_inst, Adc * hw, struct adc_config * config)

Initializes the ADC device struct and the hardware module based on the given configuration struct values.

Table 2-7. Parameters
Data directionParameter nameDescription

[out]

module_inst

Pointer to the ADC software instance struct

[in]

hw

Pointer to the ADC module instance

[in]

config

Pointer to the configuration struct

Returns

Status of the initialization procedure.

Table 2-8. Return Values
Return valueDescription

STATUS_OK

The initialization was successful

STATUS_ERR_INVALID_ARG

Invalid argument(s) were provided

STATUS_BUSY

The module is busy with a reset operation

STATUS_ERR_DENIED

The module is enabled