wheatstone 2.0.0.0
wheatstone.h File Reference

This file contains API for Wheatstone Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  wheatstone_t
 Click ctx object definition. More...
 
struct  wheatstone_cfg_t
 Click configuration structure definition. More...
 

Macros

#define WHEATSTONE_MAP_MIKROBUS(cfg, mikrobus)
 
#define WHEATSTONE_OK   0
 
#define WHEATSTONE_ERROR   -1
 
#define WHEATSTONE_POT_RESOLUTION   256
 
#define WHEATSTONE_POT_MAX   255
 
#define WHEATSTONE_POT_MIN   0
 
#define WHEATSTONE_MAX_POT_KOHM   100
 
#define WHEATSTONE_R8_KOHM   1
 
#define WHEATSTONE_GAIN_R1_KOHM   1
 
#define WHEATSTONE_VCC_5V   5.0f
 
#define WHEATSTONE_VCC_3V3   3.3f
 

Functions

void wheatstone_cfg_setup (wheatstone_cfg_t *cfg)
 Config Object Initialization function.
 
err_t wheatstone_init (wheatstone_t *ctx, wheatstone_cfg_t *cfg)
 Initialization function.
 
void wheatstone_set_potentiometer (wheatstone_t *ctx, uint8_t pot_value)
 Set potentiometer ( 0 - 100k )
 
err_t wheatstone_read_an_pin_value (wheatstone_t *ctx, uint16_t *data_out)
 Wheatstone read AN pin value function.
 
err_t wheatstone_read_an_pin_voltage (wheatstone_t *ctx, float *data_out)
 Wheatstone read AN pin voltage level function.
 

Detailed Description

This file contains API for Wheatstone Click driver.