OpenBIC
OpenSource Bridge-IC
hdc1080.c File Reference
#include <stdio.h>
#include <logging/log.h>
#include "sensor.h"
#include "hal_i2c.h"
#include "hdc1080.h"
Include dependency graph for hdc1080.c:

Macros

#define RAW2TEMP(raw)   (raw * 165 / 65536 - 40)
 
#define RAW2HUM(raw)   (raw * 100 / 65536)
 
#define HDC1080_DELAY   10
 

Functions

 LOG_MODULE_REGISTER (dev_hdc1080)
 
uint8_t hdc1080_read (sensor_cfg *cfg, int *reading)
 
uint8_t hdc1080_init (sensor_cfg *cfg)
 

Macro Definition Documentation

◆ HDC1080_DELAY

#define HDC1080_DELAY   10

◆ RAW2HUM

#define RAW2HUM (   raw)    (raw * 100 / 65536)

◆ RAW2TEMP

#define RAW2TEMP (   raw)    (raw * 165 / 65536 - 40)

Function Documentation

◆ hdc1080_init()

uint8_t hdc1080_init ( sensor_cfg cfg)
Here is the call graph for this function:

◆ hdc1080_read()

uint8_t hdc1080_read ( sensor_cfg cfg,
int *  reading 
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( dev_hdc1080  )