|
VSF Documented
|
#include "../vsf_espidf_cfg.h"#include "driver/adc_oneshot.h"#include "../vsf_espidf.h"#include "kernel/vsf_kernel.h"#include "hal/driver/driver.h"#include "service/heap/vsf_heap.h"#include "FreeRTOS.h"#include "semphr.h"#include "task.h"#include <string.h>Data Structures | |
| struct | __adc_chan_ctx_t |
| struct | adc_oneshot_unit_ctx_t |
Macros | |
| #define | __ADC_MAX_CHANNELS 10 /* matches adc_channel_t range */ |
Typedefs | |
| typedef struct __adc_chan_ctx_t | __adc_chan_ctx_t |
| typedef struct adc_oneshot_unit_ctx_t | adc_oneshot_unit_ctx_t |
Functions | |
| void | vsf_espidf_adc_init (const vsf_espidf_adc_cfg_t *cfg) |
| 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. | |
| #define __ADC_MAX_CHANNELS 10 /* matches adc_channel_t range */ |
| typedef struct __adc_chan_ctx_t __adc_chan_ctx_t |
| typedef struct adc_oneshot_unit_ctx_t adc_oneshot_unit_ctx_t |
|
extern |
| 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.
| bool inited |
| uint16_t pool_count |
| vsf_adc_t* const* pool |
| adc_oneshot_unit_ctx_t units[2] |