Skip to content

Commit 6ff8bf2

Browse files
authored
Merge pull request #21 from uutzinger/master
rename writeEEPROM to writeMLXEEPROM
2 parents 17be963 + 54a1b30 commit 6ff8bf2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: src/SparkFunMLX90614.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,15 @@ uint8_t IRTherm::setMax(float maxTemp)
173173
// Convert the unit-ed value to a raw ADC value:
174174
int16_t rawMax = calcRawTemp(maxTemp);
175175
// Write that value to the TOMAX EEPROM address:
176-
return writeEEPROM(MLX90614_REGISTER_TOMAX, rawMax);
176+
return writeMLXEEPROM(MLX90614_REGISTER_TOMAX, rawMax);
177177
}
178178

179179
uint8_t IRTherm::setMin(float minTemp)
180180
{
181181
// Convert the unit-ed value to a raw ADC value:
182182
int16_t rawMin = calcRawTemp(minTemp);
183183
// Write that value to the TOMIN EEPROM address:
184-
return writeEEPROM(MLX90614_REGISTER_TOMIN, rawMin);
184+
return writeMLXEEPROM(MLX90614_REGISTER_TOMIN, rawMin);
185185
}
186186

187187
uint8_t IRTherm::setEmissivity(float emis)
@@ -194,7 +194,7 @@ uint8_t IRTherm::setEmissivity(float emis)
194194
ke = constrain(ke, 0x2000, 0xFFFF);
195195

196196
// Write that value to the ke register
197-
return writeEEPROM(MLX90614_REGISTER_KE, (int16_t)ke);
197+
return writeMLXEEPROM(MLX90614_REGISTER_KE, (int16_t)ke);
198198
}
199199

200200
float IRTherm::readEmissivity()
@@ -234,7 +234,7 @@ bool IRTherm::setAddress(uint8_t newAdd)
234234
tempAdd |= newAdd; // Add the new address
235235

236236
// Write the new addres back to EEPROM:
237-
return writeEEPROM(MLX90614_REGISTER_ADDRESS, tempAdd);
237+
return writeMLXEEPROM(MLX90614_REGISTER_ADDRESS, tempAdd);
238238
}
239239
return 0;
240240
}
@@ -388,7 +388,7 @@ bool IRTherm::I2CReadWord(uint8_t reg, int16_t * dest)
388388
}
389389
}
390390

391-
bool IRTherm::writeEEPROM(uint8_t reg, int16_t data)
391+
bool IRTherm::writeMLXEEPROM(uint8_t reg, int16_t data)
392392
{
393393
// Clear out EEPROM first:
394394
if (I2CWriteWord(reg, 0) != 0)

Diff for: src/SparkFunMLX90614.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class IRTherm
188188

189189
// Abstract function to write 16-bits to an address in the MLX90614's
190190
// EEPROM
191-
bool writeEEPROM(uint8_t reg, int16_t data);
191+
bool writeMLXEEPROM(uint8_t reg, int16_t data);
192192

193193
// Abstract functions to read and write 16-bit values from a RAM
194194
// or EEPROM address in the MLX90614

0 commit comments

Comments
 (0)