VSF Documented
Data Structures | Typedefs | Functions
adc_oneshot.h File Reference
#include <stdint.h>
#include "esp_err.h"
#include "driver/adc_types.h"

Go to the source code of this file.

Data Structures

struct  adc_oneshot_unit_init_cfg_t
 Unit-level init configuration. More...
 
struct  adc_oneshot_chan_cfg_t
 Per-channel configuration. More...
 

Typedefs

typedef struct adc_oneshot_unit_ctx_tadc_oneshot_unit_handle_t
 Opaque handle for an ADC oneshot unit.
 

Functions

esp_err_t adc_oneshot_new_unit (const adc_oneshot_unit_init_cfg_t *init_config, adc_oneshot_unit_handle_t *ret_unit)
 Allocate an ADC oneshot unit handle from the pool entry matching init_config->unit_id.
 
esp_err_t adc_oneshot_del_unit (adc_oneshot_unit_handle_t handle)
 Release an ADC oneshot unit handle allocated by adc_oneshot_new_unit().
 
esp_err_t adc_oneshot_config_channel (adc_oneshot_unit_handle_t handle, adc_channel_t channel, const adc_oneshot_chan_cfg_t *config)
 Cache a channel configuration on the handle. The actual vsf_adc channel_request_once call happens in adc_oneshot_read().
 
esp_err_t adc_oneshot_read (adc_oneshot_unit_handle_t handle, adc_channel_t channel, int *out_raw)
 Perform one blocking conversion on a channel and return the raw result.
 

Typedef Documentation

◆ adc_oneshot_unit_handle_t

Opaque handle for an ADC oneshot unit.

Function Documentation

◆ adc_oneshot_new_unit()

esp_err_t adc_oneshot_new_unit ( const adc_oneshot_unit_init_cfg_t init_config,
adc_oneshot_unit_handle_t ret_unit 
)
extern

Allocate an ADC oneshot unit handle from the pool entry matching init_config->unit_id.

◆ adc_oneshot_del_unit()

esp_err_t adc_oneshot_del_unit ( adc_oneshot_unit_handle_t  handle)
extern

Release an ADC oneshot unit handle allocated by adc_oneshot_new_unit().

◆ adc_oneshot_config_channel()

esp_err_t adc_oneshot_config_channel ( adc_oneshot_unit_handle_t  handle,
adc_channel_t  channel,
const adc_oneshot_chan_cfg_t config 
)
extern

Cache a channel configuration on the handle. The actual vsf_adc channel_request_once call happens in adc_oneshot_read().

◆ adc_oneshot_read()

esp_err_t adc_oneshot_read ( adc_oneshot_unit_handle_t  handle,
adc_channel_t  channel,
int *  out_raw 
)
extern

Perform one blocking conversion on a channel and return the raw result.

Generated from commit: vsfteam/vsf@015f4d1