thermo20 2.0.0.0
|
This file contains API for Thermo 20 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 | thermo20_t |
Thermo 20 Click context object. More... | |
struct | thermo20_cfg_t |
Thermo 20 Click configuration object. More... | |
Macros | |
#define | THERMO20_CMD_RESET 0x1E |
Thermo 20 description register. | |
#define | THERMO20_CMD_READ_SERIAL_NUMBER 0x0A |
#define | THERMO20_CMD_CONVERSION 0x46 |
#define | THERMO20_CMD_READ_ADC 0x00 |
#define | THERMO20_SET_DEV_ADDR 0x40 |
Thermo 20 device address setting. | |
#define | THERMO20_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | thermo20_return_value_t { THERMO20_OK = 0 , THERMO20_ERROR = -1 } |
Thermo 20 Click return value data. More... | |
Functions | |
void | thermo20_cfg_setup (thermo20_cfg_t *cfg) |
Thermo 20 configuration object setup function. | |
err_t | thermo20_init (thermo20_t *ctx, thermo20_cfg_t *cfg) |
Thermo 20 initialization function. | |
err_t | thermo20_default_cfg (thermo20_t *ctx) |
Thermo 20 default configuration function. | |
err_t | thermo20_generic_write (thermo20_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Thermo 20 I2C writing function. | |
err_t | thermo20_generic_read (thermo20_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Thermo 20 I2C reading function. | |
err_t | thermo20_set_cmd (thermo20_t *ctx, uint8_t cmd) |
Send command function. | |
void | thermo20_soft_reset (thermo20_t *ctx) |
Soft reset function. | |
void | thermo20_start_conversion (thermo20_t *ctx) |
Start conversion function. | |
uint16_t | thermo20_read_adc (thermo20_t *ctx) |
Read ADC data function. | |
float | thermo20_get_temperature (thermo20_t *ctx) |
Get temperature data function. | |
uint32_t | thermo20_get_serial_number (thermo20_t *ctx) |
Get serial number function. | |
This file contains API for Thermo 20 Click Driver.