adc2 2.0.0.0
adc2.h File Reference

This file contains API for ADC 2 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  adc2_t
 Click ctx object definition. More...
 
struct  adc2_cfg_t
 Click configuration structure definition. More...
 

Macros

#define ADC2_MAP_MIKROBUS(cfg, mikrobus)
 
#define ADC2_RETVAL   uint8_t
 
#define ADC2_OK   0x00
 
#define ADC2_INIT_ERROR   0xFF
 
#define ADC2_VCC_3v3   3300.0
 
#define ADC2_VCC_5V   5000.0
 
#define ADC2_VCC_4v096   4096.0
 
#define ADC2_INTERRUPT_FLAG   -4000000
 
#define ADC2_OVERFLOW_HIGH_FLAG   3000000
 
#define ADC2_OVERFLOW_LOW_FLAG   -3000000
 

Functions

void adc2_cfg_setup (adc2_cfg_t *cfg)
 Config Object Initialization function.
 
ADC2_RETVAL adc2_init (adc2_t *ctx, adc2_cfg_t *cfg)
 Initialization function.
 
float adc2_read_adc_data (adc2_t *ctx)
 Read adc data function.
 
void adc2_set_vref (adc2_t *ctx, float vref)
 Setting reference voltage.
 

Detailed Description

This file contains API for ADC 2 Click driver.