Skip to content

Commit 6b0d93c

Browse files
committed
correct i2c max len
1 parent a4ee808 commit 6b0d93c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • ports/nrf/common-hal/busio

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
// all TWI instances have the same max size
4141
// 16 bits for 840, 10 bits for 810, 8 bits for 832
42-
#define I2C_MAX_XFER_LEN ( 1UL << TWIM0_EASYDMA_MAXCNT_SIZE)
42+
#define I2C_MAX_XFER_LEN ((1UL << TWIM0_EASYDMA_MAXCNT_SIZE) - 1)
4343

4444
STATIC twim_peripheral_t twim_peripherals[] = {
4545
#if NRFX_CHECK(NRFX_TWIM0_ENABLED)

0 commit comments

Comments
 (0)