From 090c7d5457c4e963fa65d25a801f5449e891533e Mon Sep 17 00:00:00 2001 From: kraus Date: Sat, 3 Sep 2022 12:28:51 +0200 Subject: [PATCH] issue #1862 --- sys/linux-i2c/common/linux-i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/linux-i2c/common/linux-i2c.c b/sys/linux-i2c/common/linux-i2c.c index cd0ce42c..87abf0b1 100644 --- a/sys/linux-i2c/common/linux-i2c.c +++ b/sys/linux-i2c/common/linux-i2c.c @@ -37,7 +37,8 @@ u8x8_byte_linux_i2c(u8x8_t *u8x8, case U8X8_MSG_BYTE_SEND: //fprintf(stderr, "-- %d bytes:\n", arg_int); for(int i = 0; i < arg_int && idx < BUFSIZ_I2C; i++, idx++){ - data[idx] = *(uint8_t *)(arg_ptr+i); + //data[idx] = *(uint8_t *)(arg_ptr+i); + data[idx] = *((uint8_t *)(arg_ptr)+i); //fprintf(stderr, " %d %d: %0x\n", i, idx, data[idx]); } break;