thermo8 2.0.0.0
|
This file contains API for Thermo 8 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | thermo8_t |
Click ctx object definition. More... | |
struct | thermo8_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | THERMO8_MAP_MIKROBUS(cfg, mikrobus) |
#define | THERMO8_RETVAL uint8_t |
#define | THERMO8_OK 0x00 |
#define | THERMO8_INIT_ERROR 0xFF |
#define | THERMO8_ADDR0 0x18 |
#define | THERMO8_ADDR1 (0x18 | 0x01) |
#define | THERMO8_ADDR2 (0x18 | 0x02) |
#define | THERMO8_ADDR3 (0x18 | 0x03) |
#define | THERMO8_ADDR4 (0x18 | 0x04) |
#define | THERMO8_ADDR5 (0x18 | 0x05) |
#define | THERMO8_ADDR6 (0x18 | 0x06) |
#define | THERMO8_ADDR7 (0x18 | 0x07) |
#define | THERMO8_CONFIG 0x01 |
#define | THERMO8_TUPPER 0x02 |
#define | THERMO8_TLOWER 0x03 |
#define | THERMO8_TCRIT 0x04 |
#define | THERMO8_TUPPER_REACHED 0x03 |
#define | THERMO8_TLOWER_REACHED 0x0C |
#define | THERMO8_TCRIT_REACHED 0x30 |
#define | THERMO8_TCRIT_ONLY_ALERT 1 |
#define | THERMO8_ALERT_ON_ALL 0 |
#define | THERMO8_THYS_0C 0x00 |
#define | THERMO8_THYS_1C5 0x01 |
#define | THERMO8_THYS_3C 0x02 |
#define | THERMO8_THYS_6C 0x03 |
#define | THERMO8_TA 0x05 |
#define | THERMO8_MANID 0x06 |
#define | THERMO8_DEVID 0x07 |
#define | THERMO8_RESOLUTION_REG 0x08 |
#define | THERMO8_R05C_30MS 0x00 |
#define | THERMO8_R025C_65MS 0x01 |
#define | THERMO8_R0125C_130MS 0x02 |
#define | THERMO8_R00625C_250MS 0x03 |
Functions | |
void | thermo8_cfg_setup (thermo8_cfg_t *cfg) |
Config Object Initialization function. | |
THERMO8_RETVAL | thermo8_init (thermo8_t *ctx, thermo8_cfg_t *cfg) |
Initialization function. | |
void | thermo8_default_cfg (thermo8_t *ctx) |
Click Default Configuration function. | |
void | thermo8_generic_write (thermo8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | thermo8_generic_read (thermo8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | thermo8_ale_get (thermo8_t *ctx) |
Function for returning the state of the alert pin. | |
void | thermo8_write_reg (thermo8_t *ctx, uint8_t r_addr, uint16_t r_data) |
Function for writing to 16 bit registers. | |
uint16_t | thermo8_read_reg (thermo8_t *ctx, uint8_t r_addr) |
Function for reading from 16 bit registers. | |
void | thermo8_write_reg_8 (thermo8_t *ctx, uint8_t r_addr, uint8_t r_data) |
Function for single byte writes. | |
uint8_t | thermo8_read_reg_8 (thermo8_t *ctx, uint8_t r_addr) |
Function for single byte read's. | |
float | thermo8_get_temperature (thermo8_t *ctx) |
Function will return the temperature value in �C. | |
void | thermo8_set_resolution (thermo8_t *ctx, uint8_t r_cfg) |
Function will set the conversion resoult temperature step depending on the passed constant. | |
uint16_t | thermo8_get_dev_id (thermo8_t *ctx) |
Function will return the device ID. | |
uint16_t | thermo8_get_man_id (thermo8_t *ctx) |
Function will return the manufacturer ID. | |
void | thermo8_sleep (thermo8_t *ctx) |
Function will place Thermo 8 to the low power mode. | |
void | thermo8_wake_up (thermo8_t *ctx) |
Function for waking up the click board from the sleep mode. | |
void | thermo8_limit_set (thermo8_t *ctx, uint8_t limit_reg_addr, float limit) |
Function for setting the temperature alarm levels for the lower, upper and critical alert levels. | |
uint8_t | thermo8_get_alert_stat (thermo8_t *ctx) |
Function will return all alert states. | |
void | thermo8_alert_enable (thermo8_t *ctx, uint8_t thys, uint8_t alert_cfg) |
Function for setting the Tupper and Tlower hysterezis level as well as the alert mode. | |
void | thermo8_tcrit_lock (thermo8_t *ctx) |
Function for locking the critical temperature setting register. | |
void | thermo8_tcrit_unlock (thermo8_t *ctx) |
Function for unlocking the critical temperature setting register. | |
void | thermo8_win_lock (thermo8_t *ctx) |
Function for locking the Tupper and Tlower registers. | |
void | thermo8_win_unlock (thermo8_t *ctx) |
Function for unlocking the Tupper and Tlower registers. | |
This file contains API for Thermo 8 Click driver.