Go to the documentation of this file.
65 #ifdef HAL_ADC_MODULE_ENABLED
84 #ifdef APP_DRIVER_WAKEUP_CALL_FUN
278 #if (APP_DRIVER_CHIP_TYPE != APP_DRIVER_GR551X)
290 uint16_t app_adc_temperature_conv(uint16_t *inbuf,
double *outbuf, uint32_t buflen);
303 uint16_t app_adc_vbat_conv(uint16_t *inbuf,
double *outbuf, uint32_t buflen);
327 #if (APP_DRIVER_CHIP_TYPE == APP_DRIVER_GR5526X)
335 uint16_t app_adc_clock_start(
void);
347 uint16_t app_adc_get_avg_voltage(
float *avg_voltage, uint32_t length);
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).
void(* app_adc_evt_handler_t)(app_adc_evt_t *p_evt)
ADC event callback definition.
@ 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.
dma_channel_t dma_channel
Specifies the dma channel of ADC.
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...
adc_env_t adc_env
ADC device structure definition.
app_adc_state_t adc_state
ADC state types.
ADC device structure definition.
app_adc_evt_type_t type
Type of event.
app_io_type_t
GPIO type Enumerations definition.
app_adc_dma_state_t adc_dma_state
ADC dma state types.
ADC parameters structure definition.
uint32_t pin
Specifies the IO pins to be configured.
ADC DMA configuration Structures.
app_adc_state_t
App adc state types.
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.
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_evt_handler_t evt_handler
ADC event callback definition.
This file contains all the functions prototypes for the HAL module driver.
struct link_node app_adc_sample_node_t
ADC sample-node 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 extern reference pin.
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.
Header file containing functions prototypes of DMA app library.
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 pin.
adc_handle_t * app_adc_get_handle(void)
Return the ADC handle.
app_io_mux_t
GPIO mux Enumerations definition.
adc_handle_t handle
ADC handle definition.
uint32_t multi_channel
multi channel 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 pin.
dma_id_t dma_id
DMA id definition .
Header file of app driver error code.
Header file of app driver config code.
dma_regs_t * dma_instance
Specifies the dma instance of ADC.
app_adc_dma_state_t
App adc dma state types.
int16_t dma_id_t
DMA id definition.
ADC pins config Structures.
dma_channel_t
HAL DMA Channel Enumerations definition.
app_adc_sample_node_t * p_current_sample_node
ADC sample-node definition.
app_adc_dma_cfg_t dma_cfg
ADC DMA configuration.
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...