Files @ 645e46f4898d
Branch filter:

Location: windsonde/Include/lps25h.h - annotation

ethanzonca
Update scale for bme280 to tenths of percent, disable lps25h
#ifndef LPS25H_H
#define LPS25H_H

#include "stm32f0xx_hal.h"


#define PIN_SENSORS_SDA GPIO_PIN_7
#define PIN_SENSORS_SCL GPIO_PIN_6
#define PORT_SENSORS GPIOB

#define PRESSURE_ADDRESS 0b10111000
#define PRESSURE_PRESS_REGH 0x2A
#define PRESSURE_PRESS_REGL 0x29
#define PRESSURE_PRESS_REGXL 0x28
#define PRESSURE_TEMP_REGH 0x2C
#define PRESSURE_TEMP_REGL 0x2B
#define PRESSURE_AUTOINC 0b10000000

#define PRESSURE_CTRL1_1HZ 	  0b00010000
#define PRESSURE_CTRL1_7HZ 	  0b00100000
#define PRESSURE_CTRL1_12_5HZ 0b00110000
#define PRESSURE_CTRL1_25HZ   0b01000000

#define PRESSURE_CTRL1_PWRUP 0b10000000

void lps25h_init(void);
void lps25h_read(void);
void lps25h_updatevalues(void);

int32_t lps25h_get_temperature(void);
int32_t lps25h_get_pressure(void);

I2C_HandleTypeDef* lps25h_get_i2c_handle(void);
#endif

// vim:softtabstop=4 shiftwidth=4 expandtab