force 2.0.0.0
force.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  force_t
 Click ctx object definition. More...
 
struct  force_cfg_t
 Click configuration structure definition. More...
 

Macros

#define FORCE_MAP_MIKROBUS(cfg, mikrobus)    cfg.an_pin = MIKROBUS( mikrobus, MIKROBUS_AN )
 
#define FORCE_RETVAL   uint8_t
 
#define FORCE_OK   0x00
 
#define FORCE_INIT_ERROR   0xFF
 
#define FORCE_RLOAD   10.0
 
#define FORCE_RZERO   76.63
 
#define FORCE_PARA   116.6020682
 
#define FORCE_PARB   2.769034857
 
#define FORCE_CORA   0.00035
 
#define FORCE_CORB   0.02718
 
#define FORCE_CORC   1.39538
 
#define FORCE_CORD   0.0018
 
#define FORCE_ATMOCO2   397.13
 

Typedefs

typedef uint16_t force_data_t
 Analog data type.
 

Functions

void force_cfg_setup (force_cfg_t *cfg)
 Config Object Initialization function.
 
FORCE_RETVAL force_init (force_t *ctx, force_cfg_t *cfg)
 Initialization function.
 
force_data_t force_generic_read (force_t *ctx)
 Generic read function.
 
float force_get_correction_factor (float temperature, float humidity)
 Get correction factor function.
 
float force_get_resistance (uint32_t adc_value)
 Get resistance function.
 
float force_get_corrected_resistance (float temperature, float humidity, uint32_t adc_value)
 Get corrected resistance function.
 

Detailed Description

This file contains API for Force Click driver.