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 1. Parameters
Data direction Parameter name Description

[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. Return Values
Return value Description

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