alcohol3 2.0.0.0
|
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). | |
void alcohol3_cfg_setup | ( | alcohol3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void alcohol3_default_cfg | ( | alcohol3_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Alcohol3 click.
uint16_t alcohol3_ethanol_in_ppm | ( | alcohol3_t * | ctx | ) |
Function for read Ethanol (C2H5OH) data in ppm.
ctx | Click object. |
@description This function reads Ethanol (C2H5OH) data in ppm (1 ppm - 500 ppm).
void alcohol3_generic_read | ( | alcohol3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void alcohol3_generic_write | ( | alcohol3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint16_t alcohol3_get_adc_data | ( | alcohol3_t * | ctx | ) |
Function for read ADC data.
ctx | Click object. |
@description This function reads 12bit ADC value.
float alcohol3_get_co_in_mgl | ( | alcohol3_t * | ctx | ) |
Function for read CO (Carbon monoxide) data in mg/L.
ctx | Click object. |
@description This function reads CO (Carbon monoxide) data in mg/L.
uint16_t alcohol3_get_co_in_ppm | ( | alcohol3_t * | ctx | ) |
Function for read CO (Carbon monoxide) data in ppm.
ctx | Click object. |
@description This function reads CO (Carbon monoxide) data in ppm (1 ppm - 1000 ppm).
float alcohol3_get_percentage_bac | ( | alcohol3_t * | ctx | ) |
Function for read percentage of alcohol in the blood (BAC).
ctx | Click object. |
@description This function reads percentage of alcohol in the blood (BAC).
ALCOHOL3_RETVAL alcohol3_init | ( | alcohol3_t * | ctx, |
alcohol3_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.