5.1.4.6 adc_async_register_callback
Register ADC callback.
int32_t adc_async_register_callback(
struct adc_async_descriptor *const descr,
const uint8_t channel,
const enum adc_async_callback_type type,
adc_async_cb_t cb
)
Parameters
- io_descr
-
An adc descriptor
- channel
-
Type: const uint8_t
Channel number
- type
-
Type: const enum adc_async_callback_type Enum
Callback type
- cb
-
Type: adc_async_cb_t typedef
A callback function, passing NULL de-registers callback
Returns
Type: int32_t
The status of callback assignment.
- -1
-
Passed parameters were invalid or the ADC is not initialized
- 0
-
A callback is registered successfully