Skip to content

Commit a3e380a

Browse files
committed
2 parents 1a3d1a0 + 8c9f262 commit a3e380a

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/Platforms/API_I2C_Arduino.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
// I2C Driver for Arduino
22
#if defined(ARDUINO) && !AUDIO_DRIVER_FORCE_IDF
33

4-
#include "Platforms/API_I2C.h"
5-
64
#include <Wire.h>
75
#include <assert.h>
86
#include <stdio.h>
97

8+
#include "Platforms/API_I2C.h"
109

1110
error_t i2c_bus_create(struct I2CConfig *config) {
12-
assert(config!=nullptr);
11+
assert(config != nullptr);
1312
I2CConfig &pins = *config;
14-
TwoWire *p_wire = (TwoWire*) pins.p_wire;
13+
TwoWire *p_wire = (TwoWire *)pins.p_wire;
1514
assert(p_wire != nullptr);
1615

1716
// if no pins are defined, just call begin
@@ -51,10 +50,8 @@ void i2c_bus_delete(i2c_bus_handle_t bus) {
5150
// this method is used !
5251
error_t i2c_bus_write_bytes(i2c_bus_handle_t bus, int addr, uint8_t *reg,
5352
int reglen, uint8_t *data, int datalen) {
54-
AD_LOGD(
55-
"i2c_bus_write_bytes: addr=0x%X reglen=%d datalen=%d - reg=0x%0X "
56-
"value=0x%0X",
57-
addr, reglen, datalen, reg[0], data[0]);
53+
AD_LOGD("i2c_bus_write_bytes: addr=0x%X reglen=%d datalen=%d - reg=0x%0X ",
54+
addr, reglen, datalen, reg[0]);
5855
TwoWire *p_wire = (TwoWire *)bus;
5956
assert(p_wire != nullptr);
6057
int result = RESULT_OK;

0 commit comments

Comments
 (0)