fix formatting
This commit is contained in:
parent
fbdb24c6fe
commit
41830ce19a
1 changed files with 3 additions and 4 deletions
|
@ -72,7 +72,7 @@ struct max7318_drv_data {
|
|||
static int read_registers(const struct device *dev, uint8_t reg, uint16_t *buf) {
|
||||
const struct max7318_config *config = dev->config;
|
||||
|
||||
uint8_t data[2] = { 0 };
|
||||
uint8_t data[2] = {0};
|
||||
int ret = i2c_burst_read_dt(&config->i2c_bus, reg, &data[0], sizeof(data));
|
||||
if (ret) {
|
||||
LOG_DBG("i2c_burst_read FAIL %d\n", ret);
|
||||
|
@ -83,8 +83,7 @@ static int read_registers(const struct device *dev, uint8_t reg, uint16_t *buf)
|
|||
// since we only ever read the PORTA registers here, it's effectively little endian.
|
||||
*buf = sys_get_le16(data);
|
||||
|
||||
LOG_DBG("max7318: read: reg[0x%X] = 0x%X, reg[0x%X] = 0x%X", reg, data[0], (reg + 1),
|
||||
data[1]);
|
||||
LOG_DBG("max7318: read: reg[0x%X] = 0x%X, reg[0x%X] = 0x%X", reg, data[0], (reg + 1), data[1]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -107,7 +106,7 @@ static int write_registers(const struct device *dev, uint8_t reg, uint16_t value
|
|||
LOG_DBG("max7318: write: reg[0x%X] = 0x%X, reg[0x%X] = 0x%X", reg, (value & 0xFF), (reg + 1),
|
||||
(value >> 8));
|
||||
|
||||
uint8_t data[2] = { 0 };
|
||||
uint8_t data[2] = {0};
|
||||
|
||||
// bits 0..7 are port A, 8..15 are port B, so we should write bits 0..7 first
|
||||
// -- ie. this is little endian also.
|
||||
|
|
Loading…
Add table
Reference in a new issue