19 lines
570 B
C
19 lines
570 B
C
|
#ifndef __LM75A_H
|
|||
|
#define __LM75A_H
|
|||
|
|
|||
|
#include "stdio.h"
|
|||
|
#include "stdlib.h"
|
|||
|
#include "string.h"
|
|||
|
#include "stm32f4xx_hal.h"
|
|||
|
|
|||
|
#define LM75A_ADDR 0x9f //LM75A <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
|
|||
|
#define TEMP_ADDR 0x00 //<2F>¶ȼĴ<C8BC><C4B4><EFBFBD><EFBFBD>ӵ<EFBFBD>ַ
|
|||
|
#define CONF_ADDR 0x01 //<2F><><EFBFBD>üĴ<C3BC><C4B4><EFBFBD><EFBFBD>ӵ<EFBFBD>ַ
|
|||
|
#define NORMOR_MODE 0x00 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ
|
|||
|
|
|||
|
void LM75SetMode(uint8_t ConfReg, uint8_t Mode); //<2F><><EFBFBD>ù<EFBFBD><C3B9><EFBFBD>ģʽ
|
|||
|
uint16_t LM75GetTempReg(void); //<2F><> LM75A <20><>ȡ<EFBFBD>¶<EFBFBD><C2B6><EFBFBD><EFBFBD>ݣ<EFBFBD>2<EFBFBD>ֽڣ<D6BD>
|
|||
|
double LM75GetTempValue(uint16_t tempreg); //<2F><><EFBFBD>¶<EFBFBD><C2B6><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>Ϊ<EFBFBD>¶<EFBFBD>ֵ
|
|||
|
|
|||
|
#endif
|