Skip to content

Commit e7c3337

Browse files
ci(pre-commit): Apply automatic fixes
1 parent 5d8994c commit e7c3337

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

cores/esp32/esp32-hal-i2c-ng.c

+5-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include "driver/i2c_master.h"
3030
#include "esp32-hal-periman.h"
3131

32-
3332
typedef volatile struct {
3433
bool initialized;
3534
uint32_t frequency;
@@ -114,17 +113,17 @@ esp_err_t i2cInit(uint8_t i2c_num, int8_t sda, int8_t scl, uint32_t frequency) {
114113
#if SOC_LP_I2C_SUPPORTED
115114
if (i2c_num >= SOC_HP_I2C_NUM) {
116115
bus_config.lp_source_clk = LP_I2C_SCLK_DEFAULT;
117-
} else
116+
} else
118117
#endif
119118
{
120119
bus_config.clk_source = I2C_CLK_SRC_DEFAULT;
121120
}
122121
bus_config.glitch_ignore_cnt = 7;
123-
bus_config.intr_priority = 0; // auto
124-
bus_config.trans_queue_depth = 0; // only valid in asynchronous transaction, which Arduino does not use
122+
bus_config.intr_priority = 0; // auto
123+
bus_config.trans_queue_depth = 0; // only valid in asynchronous transaction, which Arduino does not use
125124
bus_config.flags.enable_internal_pullup = 1;
126125
#if SOC_I2C_SUPPORT_SLEEP_RETENTION
127-
bus_config.flags.allow_pd = 1; // backup/restore the I2C registers before/after entering/exist sleep mode
126+
bus_config.flags.allow_pd = 1; // backup/restore the I2C registers before/after entering/exist sleep mode
128127
#endif
129128

130129
ret = i2c_new_master_bus(&bus_config, &bus_handle);
@@ -208,7 +207,7 @@ static esp_err_t i2cAddDeviceIfNeeded(uint8_t i2c_num, uint16_t address) {
208207
i2c_master_dev_handle_t dev_handle = NULL;
209208
i2c_device_config_t dev_config;
210209
memset(&dev_config, 0, sizeof(i2c_device_config_t));
211-
dev_config.dev_addr_length = I2C_ADDR_BIT_LEN_7; // Arduino supports only 7bit addresses
210+
dev_config.dev_addr_length = I2C_ADDR_BIT_LEN_7; // Arduino supports only 7bit addresses
212211
dev_config.device_address = address;
213212
dev_config.scl_speed_hz = bus[i2c_num].frequency;
214213
dev_config.scl_wait_us = 0;

0 commit comments

Comments
 (0)