Functions | |
uint16_t | app_adc_init (app_adc_params_t *p_params, app_adc_evt_handler_t evt_handler) |
Initialize the APP ADC DRIVER according to the specified parameters in the app_adc_params_t and app_adc_evt_handler_t. More... | |
uint16_t | app_adc_deinit (void) |
De-initialize the APP ADC DRIVER peripheral. More... | |
uint16_t | app_adc_conversion_sync (uint16_t *p_data, uint32_t length, uint32_t timeout) |
Polling for conversion. More... | |
uint16_t | app_adc_conversion_async (uint16_t *p_data, uint32_t length) |
DMA for conversion. More... | |
uint16_t | app_adc_voltage_intern (uint16_t *inbuf, double *outbuf, uint32_t buflen) |
Convert the ADC conversion results to a voltage value(internal reference). More... | |
uint16_t | app_adc_voltage_extern (double ref, uint16_t *inbuf, double *outbuf, uint32_t buflen) |
Convert the ADC conversion results to a voltage value(external reference). More... | |
adc_handle_t * | app_adc_get_handle (void) |
Return the ADC handle. More... | |
uint16_t | app_adc_multi_channel_conversion_async (app_adc_sample_node_t *p_begin_node, uint32_t total_nodes) |
DMA for multi channels conversion; evt_handler in app_adc_init will callback when all channels finish. More... | |
uint16_t | app_adc_dma_init (app_adc_params_t *p_params) |
Initialize the APP ADC DRIVER according to the specified parameters in the app_adc_params_t and app_adc_evt_handler_t. More... | |
uint16_t | app_adc_dma_deinit (void) |
De-initialize the APP ADC DRIVER peripheral. More... | |
uint16_t | app_adc_dma_conversion_async (uint16_t *p_data, uint32_t length) |
DMA for conversion. More... | |
uint16_t app_adc_conversion_async | ( | uint16_t * | p_data, |
uint32_t | length | ||
) |
DMA for conversion.
[in] | p_data | Pointer to data buffer which to storage ADC conversion results. |
[in] | length | Length of data buffer, ranging between 0 and 4095. |
uint16_t app_adc_conversion_sync | ( | uint16_t * | p_data, |
uint32_t | length, | ||
uint32_t | timeout | ||
) |
Polling for conversion.
[in] | p_data | Pointer to data buffer which to storage ADC conversion results. |
[in] | length | Length of data buffer. |
[in] | timeout | : Timeout duration |
uint16_t app_adc_deinit | ( | void | ) |
De-initialize the APP ADC DRIVER peripheral.
uint16_t app_adc_dma_conversion_async | ( | uint16_t * | p_data, |
uint32_t | length | ||
) |
DMA for conversion.
[in] | p_data | Pointer to data buffer which to storage ADC conversion results. |
[in] | length | Length of data buffer, ranging between 0 and 4095. |
uint16_t app_adc_dma_deinit | ( | void | ) |
De-initialize the APP ADC DRIVER peripheral.
uint16_t app_adc_dma_init | ( | app_adc_params_t * | p_params | ) |
Initialize the APP ADC DRIVER according to the specified parameters in the app_adc_params_t and app_adc_evt_handler_t.
[in] | p_params | Pointer to app_adc_params_t parameter which contains the configuration information for the specified ADC module. |
adc_handle_t* app_adc_get_handle | ( | void | ) |
Return the ADC handle.
uint16_t app_adc_init | ( | app_adc_params_t * | p_params, |
app_adc_evt_handler_t | evt_handler | ||
) |
Initialize the APP ADC DRIVER according to the specified parameters in the app_adc_params_t and app_adc_evt_handler_t.
[in] | p_params | Pointer to app_adc_params_t parameter which contains the configuration information for the specified ADC module. |
[in] | evt_handler | ADC user callback function. |
uint16_t app_adc_multi_channel_conversion_async | ( | app_adc_sample_node_t * | p_begin_node, |
uint32_t | total_nodes | ||
) |
DMA for multi channels conversion; evt_handler in app_adc_init will callback when all channels finish.
[in] | p_begin_node | Pointer to the multi sample channels list node. |
[in] | total_nodes | total sample channels. |
uint16_t app_adc_voltage_extern | ( | double | ref, |
uint16_t * | inbuf, | ||
double * | outbuf, | ||
uint32_t | buflen | ||
) |
Convert the ADC conversion results to a voltage value(external reference).
[in] | ref | slope of ADC. |
[in] | inbuf | Pointer to data buffer which storage ADC conversion results. |
[out] | outbuf | Pointer to data buffer which to storage voltage results. |
[in] | buflen | Length of data buffer. |
uint16_t app_adc_voltage_intern | ( | uint16_t * | inbuf, |
double * | outbuf, | ||
uint32_t | buflen | ||
) |
Convert the ADC conversion results to a voltage value(internal reference).
[in] | inbuf | Pointer to data buffer which storage ADC conversion results. |
[out] | outbuf | Pointer to data buffer which to storage voltage results. |
[in] | buflen | Length of data buffer. |