LM75 temperature sensor routines. More...
Go to the source code of this file.
Defines | |
#define | LM75_NORMAL 0 |
#define | LM75_SHUTDOWN 1 |
Functions | |
uns8 | lm75_get_config (uns8 addr) |
Get LM75 config register. | |
uns16 | lm75_get_temp (uns8 addr) |
Request temperature from LM75. | |
void | lm75_set_config (uns8 addr, uns8 config) |
Set LM75 config register. | |
void | lm75_setup (void) |
Setup lm75 ports and pins. |
A library to communicate with the LM75 sensor
#define LM75_NORMAL 0 |
config define for normal mode
#define LM75_SHUTDOWN 1 |
Config define for low power mode
uns8 lm75_get_config | ( | uns8 | addr | ) |
Gets the LM75 config register (memory location 0x01)
00049 { 00050 return i2c_read_eeprom(0x90 + addr, 0x01); 00051 }
uns16 lm75_get_temp | ( | uns8 | addr | ) |
Returns 16bit raw temperature register from LM75
00055 { 00056 00057 return i2c_read_eeprom_16bit(0x90 + addr, 0x00); 00058 00059 }
void lm75_set_config | ( | uns8 | addr, | |
uns8 | config | |||
) |
Sets the LM75 config register (memory location 0x01)
00044 { 00045 i2c_write_eeprom(0x90 + addr, 0x01, config); 00046 }
void lm75_setup | ( | void | ) |
00039 { 00040 i2c_setup(); 00041 }