28 lines
624 B
C
28 lines
624 B
C
|
#ifndef __TMP117_H_
|
|||
|
#define __TMP117_H_
|
|||
|
|
|||
|
#include "comm_types.h"
|
|||
|
#include "main.h"
|
|||
|
|
|||
|
#define TMP117_ADDR 0x48 //A0<41><30>GND
|
|||
|
//#define TMP117_ADDR 0x49 //A0<41><30>V+
|
|||
|
//#define TMP117_ADDR 0x4A //A0<41><30>SDA
|
|||
|
//#define TMP117_ADDR 0x4B //A0<41><30>SCL
|
|||
|
|
|||
|
#define TMP117_TEMP_REG 0x00 //<2F>¶ȼĴ<C8BC><C4B4><EFBFBD>
|
|||
|
#define TMP117_CONFIG_REG 0x01 //<2F><><EFBFBD>üĴ<C3BC><C4B4><EFBFBD>
|
|||
|
#define TMP117_TLOW_REG 0x02 //<2F>¶ȸ߱<C8B8><DFB1><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD>
|
|||
|
#define TMP117_THIGH_REG 0x03 //<2F>¶ȵͱ<C8B5><CDB1><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
HAL_StatusTypeDef TMP117_Init(void);
|
|||
|
HAL_StatusTypeDef TMP117_Read(uint8_t reg, uint8_t *buffer);
|
|||
|
HAL_StatusTypeDef TMP117_Get_Temp(float *temp);
|
|||
|
|
|||
|
#endif __TMP117_H_
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|