no2 2.0.0.0
|
Functions | |
void | no2_cfg_setup (no2_cfg_t *cfg) |
Config Object Initialization function. | |
NO2_RETVAL | no2_init (no2_t *ctx, no2_cfg_t *cfg) |
Initialization function. | |
void | no2_default_cfg (no2_t *ctx) |
Click Default Configuration function. | |
void | no2_generic_write (no2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | no2_generic_read (no2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | no2_write_byte (no2_t *ctx, uint8_t reg, uint8_t dev_data) |
Function writes one byte to the register. | |
uint8_t | no2_read_byte (no2_t *ctx, uint8_t reg) |
Function reads one byte from the register. | |
void | no2_enable (no2_t *ctx, uint8_t state) |
Device Enable function. | |
uint16_t | no2_read_adc (no2_t *ctx) |
Function for read ADC sensor data. | |
float | no2_get_no_2_ppm (no2_t *ctx) |
Get NO2 Data function. | |
void | no2_wait_ready (no2_t *ctx) |
Function waits until I2C is ready for the next command. | |
void no2_cfg_setup | ( | no2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void no2_default_cfg | ( | no2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
Set: NO2_MODECN_REG - NO2_DEEP_SLEEP_MODE Set: NO2_LOCK_REG - NO2_WRITE_MODE Set: NO2_TIACN_REG - NO2_EXT_TIA_RES | - NO2_100_OHM_LOAD_RES Set: NO2_REFCN_REG - NO2_VREF_INT | - NO2_50_PERCENTS_INT_ZERO | - NO2_BIAS_POL_NEGATIVE | - NO2_0_PERCENTS_BIAS
@description This function executes default configuration for No2 click.
void no2_enable | ( | no2_t * | ctx, |
uint8_t | state ) |
Device Enable function.
ctx | Click object. |
state | Value of pin RST |
void no2_generic_read | ( | no2_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 no2_generic_write | ( | no2_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.
float no2_get_no_2_ppm | ( | no2_t * | ctx | ) |
Get NO2 Data function.
ctx | Click object. |
@description NO2 data in ppm.
NO2_RETVAL no2_init | ( | no2_t * | ctx, |
no2_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.
uint16_t no2_read_adc | ( | no2_t * | ctx | ) |
Function for read ADC sensor data.
ctx | Click object. |
@description 12bit ADC value
uint8_t no2_read_byte | ( | no2_t * | ctx, |
uint8_t | reg ) |
Function reads one byte from the register.
ctx | Click object. |
reg | Address which from data be read |
@description data that is read from the registry
void no2_wait_ready | ( | no2_t * | ctx | ) |
Function waits until I2C is ready for the next command.
ctx | Click object. |
void no2_write_byte | ( | no2_t * | ctx, |
uint8_t | reg, | ||
uint8_t | dev_data ) |
Function writes one byte to the register.
ctx | Click object. |
reg | Address where data be written |
dev_data | Data to be written |