mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-29 08:21:18 +01:00
drivers-lm75a: use sizeof array instead of reg_size
This commit is contained in:
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…
x
Reference in New Issue
Block a user