Skip to content

Commit b5326d7

Browse files
committed
tidying
1 parent 0a3b9b6 commit b5326d7

File tree

1 file changed

+4
-4
lines changed
  • ports/nrf/common-hal/busio

1 file changed

+4
-4
lines changed

ports/nrf/common-hal/busio/I2C.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
// all TWI instances have the same max size
4242
// 16 bits for 840, 10 bits for 810, 8 bits for 832
4343
#define I2C_MAX_XFER_LEN MIN(((1UL << TWIM0_EASYDMA_MAXCNT_SIZE) - 1), 1024)
44-
#define I2C_TIMEOUT 1000 //1 second timeout
44+
#define I2C_TIMEOUT 1000 // 1 second timeout
4545

4646
STATIC twim_peripheral_t twim_peripherals[] = {
4747
#if NRFX_CHECK(NRFX_TWIM0_ENABLED)
@@ -103,9 +103,9 @@ static uint8_t twi_error_to_mp(const nrfx_err_t err) {
103103
return 0;
104104
}
105105

106-
static void twim_event_handler(nrfx_twim_evt_t const * p_event, void *p_context) {
106+
static void twim_event_handler(nrfx_twim_evt_t const *p_event, void *p_context) {
107107
// this is the callback handler - sets transferring to false and records the most recent event.
108-
twim_peripheral_t *peripheral = (twim_peripheral_t *) p_context;
108+
twim_peripheral_t *peripheral = (twim_peripheral_t *) p_context;
109109
peripheral->last_event_type = p_event->type;
110110
peripheral->transferring = false;
111111
}
@@ -254,7 +254,7 @@ void common_hal_busio_i2c_unlock(busio_i2c_obj_t *self) {
254254
self->has_lock = false;
255255
}
256256

257-
STATIC nrfx_err_t _twim_xfer_with_timeout(busio_i2c_obj_t *self, nrfx_twim_xfer_desc_t const * p_xfer_desc, uint32_t flags) {
257+
STATIC nrfx_err_t _twim_xfer_with_timeout(busio_i2c_obj_t *self, nrfx_twim_xfer_desc_t const *p_xfer_desc, uint32_t flags) {
258258
// does non-blocking transfer and raises and exception if it takes longer than I2C_TIMEOUT ms to complete
259259
uint64_t deadline = supervisor_ticks_ms64() + I2C_TIMEOUT;
260260
nrfx_err_t err = NRFX_SUCCESS;

0 commit comments

Comments
 (0)