Loading...
Searching...
No Matches

Interface definition for the ST HTS221 driver. More...

Detailed Description

Interface definition for the ST HTS221 driver.

Author
Sebastian Meiling s@mln.nosp@m.g.ne.nosp@m.t

Definition in file hts221.h.

#include <stdint.h>
#include "periph/i2c.h"
#include "hts221_regs.h"
+ Include dependency graph for hts221.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  hts221_params_t
 Parameters needed for device initialization. More...
 
struct  hts221_t
 Device descriptor for HTS221 sensors. More...
 

Macros

#define HTS221_I2C_ADDRESS   (0x5F)
 Default I2C bus address (7 Bit) of HTS221 devices.
 

Enumerations

enum  { HTS221_OK = 0 , HTS221_ERROR , HTS221_NOBUS , HTS221_NODEV }
 Return values and error codes. More...
 

Functions

int hts221_init (hts221_t *dev, const hts221_params_t *params)
 Initialize the given HTS221 device.
 
int hts221_reboot (const hts221_t *dev)
 Reboot device and reload base configuration.
 
int hts221_one_shot (const hts221_t *dev)
 Set device to one shot measurement.
 
int hts221_set_rate (const hts221_t *dev, const uint8_t rate)
 Set device to continuous measurements.
 
int hts221_power_on (const hts221_t *dev)
 Set device to active.
 
int hts221_power_off (const hts221_t *dev)
 Set device to power down.
 
int hts221_get_state (const hts221_t *dev)
 Set device to power down.
 
int hts221_read_humidity (const hts221_t *dev, uint16_t *val)
 Reading humidity and temperature.
 
int hts221_read_temperature (const hts221_t *dev, int16_t *val)
 Reading humidity and temperature.