Go to the documentation of this file.
58 #ifdef ENV_USE_FREERTOS
66 #ifdef HAL_ADC_MODULE_ENABLED
267 #ifdef ENV_RTOS_USE_SEMP
278 uint16_t app_adc_conversion_sem_sync(uint16_t *p_data, uint32_t length);
290 uint16_t app_adc_multi_channel_conversion_sem_sync(
app_adc_samle_node_t *p_begin_node, uint32_t total_nodes);
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).
@ APP_ADC_EVT_CONV_CPLT
Conversion completed by ADC peripheral.
app_io_mux_t mux
Specifies the Peripheral to be connected to the selected pins.
app_adc_evt_type_t type
Type of event.
app_io_type_t
GPIO type Enumerations definition.
dma_channel_t dma_channel
Specifies the dma channel of ADC.
ADC operate mode Structures.
ADC parameters structure definition.
uint32_t pin
Specifies the IO pins to be configured.
@ APP_ADC_TYPE_MAX
Only for check parameter, not used as input parameters.
app_adc_pin_cfg_t pin_cfg
the pin configuration information for the specified ADC module.
LL ADC init Structure definition.
Header file containing functions prototypes of GPIO app library.
ADC event structure definition.
app_adc_evt_type_t
ADC event Enumerations definition.
app_adc_mode_t use_mode
ADC operate mode.
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).
app_adc_type_t
ADC operating mode Enumerations definition.
struct link_node app_adc_samle_node_t
ADC sample-node definition.
@ APP_ADC_TYPE_POLLING
Polling operation mode
app_adc_type_t type
Specifies the operation mode of ADC.
void(* app_adc_evt_handler_t)(app_adc_evt_t *p_evt)
ADC event callback definition.
uint16_t app_adc_conversion_sync(uint16_t *p_data, uint32_t length, uint32_t timeout)
Polling for conversion.
ADC handle Structure definition.
app_io_type_t type
Specifies the type of ADC IO.
app_adc_pin_t extern_ref
Set the configuration of ADC extern reference pin; this parameter no need to configure and can be any...
struct link_node * next
Point to the next sample node.
adc_init_t init
ADC configuration parameters.
uint32_t len
Sample len codes on current channel.
uint16_t * p_buf
Buffer pointer of current channel sample codes.
This file contains all the functions prototypes for the HAL module driver.
uint16_t app_adc_deinit(void)
De-initialize the APP ADC DRIVER peripheral.
ADC sample-node definition.
uint32_t channel
Which channel to be sample; This parameter can be any value of ADC_INPUT_SOURCE:ADC_INPUT_SRC_IO0~ADC...
app_adc_pin_t channel_n
Set the configuration of ADC channel N pin.
adc_handle_t * app_adc_get_handle(void)
Return the ADC handle.
app_io_mux_t
GPIO mux Enumerations definition.
uint16_t app_adc_conversion_async(uint16_t *p_data, uint32_t length)
DMA for conversion.
app_adc_pin_t channel_p
Set the configuration of ADC channel P pin;this parameter no need to configure and can be any value i...
@ APP_ADC_TYPE_DMA
DMA operation mode
Header file of app rtos config code.
Header file of app driver error code.
uint16_t app_adc_multi_channel_conversion_async(app_adc_samle_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...
ADC pins config Structures.
dma_channel_t
HAL DMA Channel Enumerations definition.
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_a...