adc3 2.0.0.0
|
This file contains API for ADC 3 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | adc3_t |
Click ctx object definition. More... | |
struct | adc3_cfg_t |
Click configuration structure definition. More... | |
Functions | |
void | adc3_cfg_setup (adc3_cfg_t *cfg) |
Config Object Initialization function. | |
ADC3_RETVAL | adc3_init (adc3_t *ctx, adc3_cfg_t *cfg) |
Initialization function. | |
void | adc3_default_cfg (adc3_t *ctx) |
Click Default Configuration function. | |
void | adc3_generic_write (adc3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | adc3_generic_read (adc3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | adc3_reset (adc3_t *ctx) |
General call reset function. | |
void | adc3_latch (adc3_t *ctx) |
General call latch function. | |
void | adc3_conversion (adc3_t *ctx) |
General call conversion function. | |
int16_t | adc3_read_measurement (adc3_t *ctx, uint8_t channel, uint8_t resolution, uint8_t gain) |
ADC3 read measurement function. | |
float | adc3_read_voltage (adc3_t *ctx, uint8_t channel, uint8_t resolution, uint8_t gain) |
Read voltage function. | |
This file contains API for ADC 3 Click driver.
#define ADC3_CONV_CONTINOUS 0x10 |
#define ADC3_CONV_ONE_SHOT 0x00 |
#define ADC3_DATA_RESOL_RATE_12 0x0F |
#define ADC3_DATA_RESOL_RATE_14 0x3F |
#define ADC3_DATA_RESOL_RATE_16 0xFF |
#define ADC3_DATA_RESULT_RATE_12 0x07FF |
#define ADC3_DATA_RESULT_RATE_14 0x1FFF |
#define ADC3_DATA_RESULT_RATE_16 0x7FFF |
#define ADC3_DATA_START_VALUE 0 |
#define ADC3_GENERAL_CALL_CONVERSION 0x08 |
#define ADC3_GENERAL_CALL_LATCH 0x04 |
#define ADC3_GENERAL_CALL_RESET 0x06 |
#define ADC3_RDY_CLEAR 0x00 |
#define ADC3_RDY_SET 0x80 |
#define ADC3_SELECT_CHANNEL_1 0x00 |
#define ADC3_SELECT_CHANNEL_2 0x20 |
#define ADC3_SELECT_CHANNEL_3 0x40 |
#define ADC3_SELECT_CHANNEL_4 0x60 |