makes GPIO_PIN_RST optional for the sx1276
[ExpressLRS.git] / src / lib / THERMAL / lm75a.h
blob86bc7b2a0be2a97675717023d14fab95a9767a0f
1 #pragma once
3 #include "targets.h"
4 #include "Wire.h"
6 class LM75A
8 private:
9 void ReadAccRegister(uint8_t reg, uint8_t *data, int size);
10 void WriteAccRegister(uint8_t reg, uint8_t *data, int size);
11 public:
12 int init();
13 uint8_t read_lm75a();
14 void update_lm75a_threshold(uint8_t tos, uint8_t thyst);
17 #define LM75A_I2C_ADDRESS 0x48
19 #define LM75A_REG_TEMP 0x00
20 #define LM75A_REG_CONF 0x01
22 #define LM75A_REG_THYST 0x02
23 #define LM75A_REG_TOS 0x03
24 #define LM75A_TOS_DEFAULT_VALUE 0x50