OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include "sensor.h"
#include "plat_gpio.h"
#include "plat_def.h"
#include <zephyr.h>
#include <drivers/adc.h>
#include <logging/log.h>
Macros | |
#define | ADC_CHANNEL_COUNT 8 |
#define | BUFFER_SIZE 1 |
#define | ADC_RESOLUTION 10 |
#define | ADC_CALIBRATION 0 |
#define | ADC_GAIN ADC_GAIN_1 |
#define | ADC_REFERENCE ADC_REF_INTERNAL |
#define | ADC_ACQUISITION_TIME ADC_ACQ_TIME_DEFAULT |
#define | ADC_AVERAGE_DELAY_MSEC 1 |
Enumerations | |
enum | adc_device_idx { adc0 , adc1 , ADC_NUM } |
Functions | |
LOG_MODULE_REGISTER (dev_ast_adc) | |
uint8_t | ast_adc_read (sensor_cfg *cfg, int *reading) |
uint8_t | ast_adc_init (sensor_cfg *cfg) |
#define ADC_ACQUISITION_TIME ADC_ACQ_TIME_DEFAULT |
#define ADC_AVERAGE_DELAY_MSEC 1 |
#define ADC_CALIBRATION 0 |
#define ADC_CHANNEL_COUNT 8 |
#define ADC_GAIN ADC_GAIN_1 |
#define ADC_REFERENCE ADC_REF_INTERNAL |
#define ADC_RESOLUTION 10 |
#define BUFFER_SIZE 1 |
enum adc_device_idx |
uint8_t ast_adc_init | ( | sensor_cfg * | cfg | ) |
uint8_t ast_adc_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |
LOG_MODULE_REGISTER | ( | dev_ast_adc | ) |