no2
2.0.0.0
|
Functions | |
void | no2_cfg_setup (no2_cfg_t *cfg) |
Config Object Initialization function. More... | |
NO2_RETVAL | no2_init (no2_t *ctx, no2_cfg_t *cfg) |
Initialization function. More... | |
void | no2_default_cfg (no2_t *ctx) |
Click Default Configuration function. More... | |
void | no2_generic_write (no2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. More... | |
void | no2_generic_read (no2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
void | no2_write_byte (no2_t *ctx, uint8_t reg, uint8_t dev_data) |
Function writes one byte to the register. More... | |
uint8_t | no2_read_byte (no2_t *ctx, uint8_t reg) |
Function reads one byte from the register. More... | |
void | no2_enable (no2_t *ctx, uint8_t state) |
Device Enable function. More... | |
uint16_t | no2_read_adc (no2_t *ctx) |
Function for read ADC sensor data. More... | |
float | no2_get_no_2_ppm (no2_t *ctx) |
Get NO2 Data function. More... | |
void | no2_wait_ready (no2_t *ctx) |
Function waits until I2C is ready for the next command. More... | |
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
@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 |