code to access the AT30TSE75x temperature and E-prom device
Dependents: AT30TSE752TST AT30TSE752TST2
Diff: AT30TSE75x.cpp
- Revision:
- 3:5944e2454e42
- Parent:
- 2:91836ad02096
- Child:
- 4:8189e5cb4459
diff -r 91836ad02096 -r 5944e2454e42 AT30TSE75x.cpp --- a/AT30TSE75x.cpp Wed Jan 18 17:52:08 2017 +0000 +++ b/AT30TSE75x.cpp Tue Jan 31 11:31:22 2017 +0000 @@ -134,8 +134,12 @@ return temperature; } + float AT30TSE75x::get_temperature(int &error) { - + return convert_temperature( get_temperature_register(error)); +} + +uint16_t AT30TSE75x::get_temperature_register(int &error){ uint16_t data; int locerr=-200; @@ -146,7 +150,7 @@ data = (buffer[0] << 8) | buffer[1]; error=locerr; // pointer !=0 - return convert_temperature( data); + return data; }