thermok 2.0.0.0
|
Functions | |
void | thermok_cfg_setup (thermok_cfg_t *cfg) |
Config Object Initialization function. | |
THERMOK_RETVAL | thermok_init (thermok_t *ctx, thermok_cfg_t *cfg) |
Initialization function. | |
void | thermok_generic_write (thermok_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | thermok_generic_read (thermok_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint16_t | thermok_get_device_info (thermok_t *ctx) |
Functions for read device info. | |
void | thermok_get_status (thermok_t *ctx, thermok_alert_t *status) |
Get status. | |
float | thermok_get_temperature (thermok_t *ctx, uint8_t reg, uint8_t temp_format) |
Temperature data. | |
void | thermok_set_register_cfg (thermok_t *ctx, uint8_t reg_cfg, uint8_t cfg_data) |
Set register config. | |
uint8_t | thermok_get_alert_state_1 (thermok_t *ctx) |
Alert 1 pin state. | |
uint8_t | thermok_get_alert_state_2 (thermok_t *ctx) |
Alert 2 pin state. | |
uint8_t | thermok_get_alert_state_3 (thermok_t *ctx) |
Alert 3 pin state. | |
uint8_t | thermok_get_alert_state_4 (thermok_t *ctx) |
Alert 4 pin state. | |
void thermok_cfg_setup | ( | thermok_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void thermok_generic_read | ( | thermok_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 thermok_generic_write | ( | thermok_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.
uint8_t thermok_get_alert_state_1 | ( | thermok_t * | ctx | ) |
Alert 1 pin state.
ctx | Click object. |
uint8_t thermok_get_alert_state_2 | ( | thermok_t * | ctx | ) |
Alert 2 pin state.
ctx | Click object. |
uint8_t thermok_get_alert_state_3 | ( | thermok_t * | ctx | ) |
Alert 3 pin state.
ctx | Click object. |
uint8_t thermok_get_alert_state_4 | ( | thermok_t * | ctx | ) |
Alert 4 pin state.
ctx | Click object. |
uint16_t thermok_get_device_info | ( | thermok_t * | ctx | ) |
Functions for read device info.
ctx | Click object. |
void thermok_get_status | ( | thermok_t * | ctx, |
thermok_alert_t * | status ) |
Get status.
ctx | Click object. |
status | Status structure |
float thermok_get_temperature | ( | thermok_t * | ctx, |
uint8_t | reg, | ||
uint8_t | temp_format ) |
Temperature data.
ctx | Click object. |
reg | Temperature Register |
temp_format | Temperature in ... (FAHRENHEIT, KELVIN or CELSIUS) |
THERMOK_RETVAL thermok_init | ( | thermok_t * | ctx, |
thermok_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.
void thermok_set_register_cfg | ( | thermok_t * | ctx, |
uint8_t | reg_cfg, | ||
uint8_t | cfg_data ) |
Set register config.
ctx | Click object. |
reg_cfg | Register type: Sensor config / Device config / Alert config |
cfg_data | Data which will be set in one of three configuration registers |