adc_dma_init

Initialize ADC.

int32_t adc_dma_init(
    struct adc_dma_descriptor *const descr,
    void *const hw
)

This function initializes the given ADC descriptor. It checks if the given hardware is not initialized and if the given hardware is permitted to be initialized.

Parameters

descr

Type: struct adc_dma_descriptor Struct *const

An ADC descriptor to initialize

hw

Type: void *const

The pointer to hardware instance

Returns

Type: int32_t

Initialization status.

-1

Passed parameters were invalid or an ADC is already initialized

0

The initialization is completed successfully