X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/9d18e10afb2439a6a9ba6978a799259746a837b7..1ab16aec62e20065faba56c469ddf75830860162:/drivers/sensors/lm75b/lm75b.c diff --git a/drivers/sensors/lm75b/lm75b.c b/drivers/sensors/lm75b/lm75b.c index d5633d9..ca4d742 100644 --- a/drivers/sensors/lm75b/lm75b.c +++ b/drivers/sensors/lm75b/lm75b.c @@ -87,8 +87,6 @@ extern volatile uint8_t I2CMasterBuffer[I2C_BUFSIZE]; extern volatile uint8_t I2CSlaveBuffer[I2C_BUFSIZE]; extern volatile uint32_t I2CReadLength, I2CWriteLength; -uint32_t i; - static bool _lm75bInitialised = false; /**************************************************************************/ @@ -99,6 +97,7 @@ static bool _lm75bInitialised = false; lm75bError_e lm75bWrite8 (uint8_t reg, uint32_t value) { // Clear write buffers + uint32_t i; for ( i = 0; i < I2C_BUFSIZE; i++ ) { I2CMasterBuffer[i] = 0x00; @@ -121,6 +120,7 @@ lm75bError_e lm75bWrite8 (uint8_t reg, uint32_t value) lm75bError_e lm75bRead16(uint8_t reg, int32_t *value) { // Clear write buffers + uint32_t i; for ( i = 0; i < I2C_BUFSIZE; i++ ) { I2CMasterBuffer[i] = 0x00;