i2c_api.c: fix style

pull/12436/head
Przemyslaw Stekiel 2020-02-17 10:25:36 +01:00
parent e18a800e7c
commit 32311b7ca5
1 changed files with 38 additions and 40 deletions

View File

@ -297,8 +297,7 @@ void i2c_configure_twi_instance(i2c_t *obj)
nrfx_prs_release(nordic_nrf5_twi_register[instance]); nrfx_prs_release(nordic_nrf5_twi_register[instance]);
if (nrfx_prs_acquire(nordic_nrf5_twi_register[instance], if (nrfx_prs_acquire(nordic_nrf5_twi_register[instance],
irq_handlers[instance]) != NRFX_SUCCESS) irq_handlers[instance]) != NRFX_SUCCESS) {
{
DEBUG_PRINTF("Function: %s, nrfx_prs_acquire error code: %s.", DEBUG_PRINTF("Function: %s, nrfx_prs_acquire error code: %s.",
__func__, __func__,
err_code); err_code);
@ -792,8 +791,7 @@ static void nordic_nrf5_twi_event_handler(nrfx_twi_evt_t const *p_event, void *p
struct i2c_s *config = &obj->i2c; struct i2c_s *config = &obj->i2c;
/* Translate event type from NRF driver values to mbed HAL values. */ /* Translate event type from NRF driver values to mbed HAL values. */
switch (p_event->type) switch (p_event->type) {
{
/* Transfer completed event. */ /* Transfer completed event. */
case NRFX_TWI_EVT_DONE: case NRFX_TWI_EVT_DONE:
config->event = I2C_EVENT_TRANSFER_COMPLETE; config->event = I2C_EVENT_TRANSFER_COMPLETE;