Skip to content

Commit da73716

Browse files
committed
TARGET_NRF5: corrected code style in i2c_api.c.
1 parent de2114f commit da73716

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

targets/TARGET_NORDIC/TARGET_NRF5/i2c_api.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,16 +261,13 @@ static void twi_clear_bus(twi_info_t *twi_info)
261261
configure_twi_pin(twi_info->pselsda, NRF_GPIO_PIN_DIR_OUTPUT);
262262
// In case SDA is low, make up to 9 cycles on SCL line to help the slave
263263
// that pulls SDA low release it.
264-
if (!nrf_gpio_pin_read(twi_info->pselsda))
265-
{
264+
if (!nrf_gpio_pin_read(twi_info->pselsda)) {
266265
nrf_gpio_pin_set(twi_info->pselscl);
267266
configure_twi_pin(twi_info->pselscl, NRF_GPIO_PIN_DIR_OUTPUT);
268267
nrf_delay_us(4);
269268

270-
for (int i = 0; i < 9; i++)
271-
{
272-
if (nrf_gpio_pin_read(twi_info->pselsda))
273-
{
269+
for (int i = 0; i < 9; i++) {
270+
if (nrf_gpio_pin_read(twi_info->pselsda)) {
274271
break;
275272
}
276273
nrf_gpio_pin_clear(twi_info->pselscl);

0 commit comments

Comments
 (0)