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 HYDROPROBE_MAP_MIKROBUS( cfg, mikrobus ) \
53 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
54 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
61 #define HYDROPROBE_RETVAL uint8_t
63 #define HYDROPROBE_OK 0x00
64 #define HYDROPROBE_INIT_ERROR 0xFF
71 #define HYDROPROBE_SLAVE_ADR 0x4D
229 #endif // _HYDROPROBE_H_
Click configuration structure definition.
Definition: hydroprobe.h:99
uint8_t slave_address
Definition: hydroprobe.h:92
uint8_t i2c_address
Definition: hydroprobe.h:109
uint32_t i2c_speed
Definition: hydroprobe.h:108
void hydroprobe_generic_read(hydroprobe_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic read function.
pin_name_t sda
Definition: hydroprobe.h:104
#define HYDROPROBE_RETVAL
Definition: hydroprobe.h:61
Click ctx object definition.
Definition: hydroprobe.h:84
HYDROPROBE_RETVAL hydroprobe_init(hydroprobe_t *ctx, hydroprobe_cfg_t *cfg)
Initialization function.
pin_name_t scl
Definition: hydroprobe.h:103
uint16_t hydroprobe_min_val(hydroprobe_t *ctx)
Get minimum value function.
uint16_t hydroprobe_read_raw(hydroprobe_t *ctx)
Read raw data function.
void hydroprobe_cfg_setup(hydroprobe_cfg_t *cfg)
Config Object Initialization function.
uint16_t hydroprobe_max_val(hydroprobe_t *ctx)
Get maximum value function.
uint16_t hydroprobe_avg_val(hydroprobe_t *ctx)
Get average value function.
i2c_master_t i2c
Definition: hydroprobe.h:88
uint8_t hydroprobe_rel_env_hum(hydroprobe_t *ctx, uint16_t dry_val, uint16_t wet_val)
Get Relative humidity of the environment function.
void hydroprobe_generic_write(hydroprobe_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic write function.