Skip to content

Commit

Permalink
Update lm75bd.c
Browse files Browse the repository at this point in the history
  • Loading branch information
mariamelsahharr committed Jul 24, 2023
1 parent e244d4f commit c25c4e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lm75bd/lm75bd.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ error_code_t readTempLM75BD(uint8_t devAddr, float *temp) {
// Reading the temperature reg

i2cReceiveFrom(devAddr, tempDataRead, 2);
int16_t tempRaw = (uint16_t)(tempDataRead[0] << 3) | (unit16_t)tempDataRead[1]>>5;
int16_t tempRaw = (uint16_t)(tempDataRead[0] << 3) | (uint16_t)tempDataRead[1]>>5;


if ((tempDataRead[0] &( 1 << 7)) == 0) {
Expand Down

0 comments on commit c25c4e2

Please sign in to comment.