drivers-lm75a: use sizeof array instead of reg_size

dev/timer
Hinnerk van Bruinehsen 9 years ago committed by René Kijewski
parent 218635027c
commit 26d3a94dff

@ -133,10 +133,9 @@ static uint16_t lm75A_get_register_value(uint8_t i2c_interface,
bool status = false;
uint8_t rx_buff[reg_size];
i2c_clear_buffer(rx_buff, reg_size);
i2c_clear_buffer(rx_buff, sizeof(rx_buff));
if ((reg_size > 0) && (reg_size < 3)) {
status = i2c_read(i2c_interface, LM75A_ADDR, reg_addr, rx_buff,
reg_size);
status = i2c_read(i2c_interface, LM75A_ADDR, reg_addr, rx_buff, sizeof(rx_buff));
if (!status) { //Slave is not ready
puts(
"[lm75a_tempSensorI2C/lm75A_getConfigReg]: Slave is not\

Loading…
Cancel
Save