alcohol3 2.0.0.0
|
This file contains API for Alcohol 3 Click driver. More...
#include "drv_digital_out.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | alcohol3_t |
Click ctx object definition. More... | |
struct | alcohol3_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | ALCOHOL3_MAP_MIKROBUS(cfg, mikrobus) |
#define | ALCOHOL3_RETVAL uint8_t |
#define | ALCOHOL3_OK 0x00 |
#define | ALCOHOL3_INIT_ERROR 0xFF |
#define | ALCOHOL3_DEVICE_SLAVE_ADDRESS 0x4D |
#define | ALCOHOL3_PARAM_CO_OUT_MIN 1 |
#define | ALCOHOL3_PARAM_CO_OUT_MAX 1000 |
#define | ALCOHOL3_PARAM_SUPPLY_IN_MIN 0 |
#define | ALCOHOL3_PARAM_SUPPLY_IN_MAX 4096 |
#define | ALCOHOL3_CONV_MGL_PARAM_A 1.82 |
#define | ALCOHOL3_CONV_MGL_PARAM_B 0.91 |
#define | ALCOHOL3_CONV_MGL_PARAM_C 0.18 |
#define | ALCOHOL3_CONV_MGL_PARAM_D 0.09 |
#define | ALCOHOL3_CONV_AIR_PPM_PARAM_A 1000 |
#define | ALCOHOL3_CONV_AIR_PPM_PARAM_B 500 |
#define | ALCOHOL3_CONV_AIR_PPM_PARAM_C 100 |
#define | ALCOHOL3_CONV_AIR_PPM_PARAM_D 50 |
#define | ALCOHOL3_CO_PPM_0 0 |
#define | ALCOHOL3_CO_PPM_10 10 |
#define | ALCOHOL3_CO_PPM_50 50 |
#define | ALCOHOL3_CO_PPM_100 100 |
#define | ALCOHOL3_CO_PPM_500 500 |
#define | ALCOHOL3_EQU_TO_PPM_0 0 |
#define | ALCOHOL3_EQU_TO_PPM_10 1 |
#define | ALCOHOL3_EQU_TO_PPM_50 6 |
#define | ALCOHOL3_EQU_TO_PPM_100 18 |
#define | ALCOHOL3_EQU_TO_PPM_500 274 |
Functions | |
void | alcohol3_cfg_setup (alcohol3_cfg_t *cfg) |
Config Object Initialization function. | |
ALCOHOL3_RETVAL | alcohol3_init (alcohol3_t *ctx, alcohol3_cfg_t *cfg) |
Initialization function. | |
void | alcohol3_default_cfg (alcohol3_t *ctx) |
Click Default Configuration function. | |
void | alcohol3_generic_write (alcohol3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | alcohol3_generic_read (alcohol3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint16_t | alcohol3_get_adc_data (alcohol3_t *ctx) |
Function for read ADC data. | |
uint16_t | alcohol3_get_co_in_ppm (alcohol3_t *ctx) |
Function for read CO (Carbon monoxide) data in ppm. | |
float | alcohol3_get_co_in_mgl (alcohol3_t *ctx) |
Function for read CO (Carbon monoxide) data in mg/L. | |
uint16_t | alcohol3_ethanol_in_ppm (alcohol3_t *ctx) |
Function for read Ethanol (C2H5OH) data in ppm. | |
float | alcohol3_get_percentage_bac (alcohol3_t *ctx) |
Function for read percentage of alcohol in the blood (BAC). | |
This file contains API for Alcohol 3 Click driver.