Go to the documentation of this file.
38 #include "drv_digital_out.h"
39 #include "drv_digital_in.h"
40 #include "drv_i2c_master.h"
52 #define HDC1000_MAP_MIKROBUS( cfg, mikrobus ) \
53 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
54 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
55 cfg.rdy = MIKROBUS( mikrobus, MIKROBUS_INT )
62 #define HDC1000_RETVAL uint8_t
64 #define HDC1000_OK 0x00
65 #define HDC1000_INIT_ERROR 0xFF
71 #define HDC1000_SLAVE_ADDRESS 0x40
78 #define HDC1000_REG_TEMP 0x00
79 #define HDC1000_REG_HUMI 0x01
80 #define HDC1000_REG_CONFIG 0x02
81 #define HDC1000_REG_SERID_1 0xFB
82 #define HDC1000_REG_SERID_2 0xFC
83 #define HDC1000_REG_SERID_3 0xFD
84 #define HDC1000_REG_MFID 0xFE
85 #define HDC1000_REG_DEVID 0xFF
92 #define HDC1000_RST 0x80
93 #define HDC1000_HEAT_ON 0x20
94 #define HDC1000_HEAT_OFF 0x00
95 #define HDC1000_BOTH_TEMP_HUMI 0x10
96 #define HDC1000_SINGLE_MEASUR 0x00
97 #define HDC1000_TEMP_HUMI_14BIT 0x00
98 #define HDC1000_TEMP_11BIT 0x04
99 #define HDC1000_HUMI_11BIT 0x01
100 #define HDC1000_HUMI_8BIT 0x02
272 #endif // _HDC1000_H_
uint8_t i2c_address
Definition: hdc1000.h:146
void hdc1000_default_cfg(hdc1000_t *ctx)
Click Default Configuration function.
uint8_t slave_address
Definition: hdc1000.h:125
float hdc1000_get_temperature_data(hdc1000_t *ctx)
Get temperature value.
uint32_t i2c_speed
Definition: hdc1000.h:145
void hdc1000_generic_write(hdc1000_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic write function.
pin_name_t rdy
Definition: hdc1000.h:141
uint8_t hdc1000_get_interrupt(hdc1000_t *ctx)
Get interrupt state.
pin_name_t sda
Definition: hdc1000.h:137
pin_name_t scl
Definition: hdc1000.h:136
void hdc1000_generic_read(hdc1000_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic read function.
float hdc1000_get_humidity_data(hdc1000_t *ctx)
Get humidity value.
void hdc1000_cfg_setup(hdc1000_cfg_t *cfg)
Config Object Initialization function.
#define HDC1000_RETVAL
Definition: hdc1000.h:62
Click configuration structure definition.
Definition: hdc1000.h:133
i2c_master_t i2c
Definition: hdc1000.h:121
Click ctx object definition.
Definition: hdc1000.h:114
digital_in_t rdy
Definition: hdc1000.h:117
HDC1000_RETVAL hdc1000_init(hdc1000_t *ctx, hdc1000_cfg_t *cfg)
Initialization function.