File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
targets/TARGET_NORDIC/TARGET_NRF5 Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -261,16 +261,13 @@ static void twi_clear_bus(twi_info_t *twi_info)
261
261
configure_twi_pin (twi_info -> pselsda , NRF_GPIO_PIN_DIR_OUTPUT );
262
262
// In case SDA is low, make up to 9 cycles on SCL line to help the slave
263
263
// 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 )) {
266
265
nrf_gpio_pin_set (twi_info -> pselscl );
267
266
configure_twi_pin (twi_info -> pselscl , NRF_GPIO_PIN_DIR_OUTPUT );
268
267
nrf_delay_us (4 );
269
268
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 )) {
274
271
break ;
275
272
}
276
273
nrf_gpio_pin_clear (twi_info -> pselscl );
You can’t perform that action at this time.
0 commit comments