From 81b3f3d5336eab67e8eb21bb4011e552f3895a4e Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Mon, 3 Aug 2020 12:22:24 -0400 Subject: Reorg --- src/master.c | 2 +- src/stream_i2c.h | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 src/stream_i2c.h diff --git a/src/master.c b/src/master.c index 6637ca5..aee297b 100644 --- a/src/master.c +++ b/src/master.c @@ -159,7 +159,7 @@ hs_status_t handshake(uint32_t i2c_addr) uint32_t dev_idx = GET_IDX_FROM_ADDR(i2c_addr); uint16_t MDR_len = 0; - void **vptr = malloc(sizeof(uint8_t*)); + void **vptr = malloc(sizeof(uint8_t*)*2); vptr[0] = malloc(sizeof(uint8_t*)); vptr[0] = &i2c_addr; diff --git a/src/stream_i2c.h b/src/stream_i2c.h deleted file mode 100644 index beba717..0000000 --- a/src/stream_i2c.h +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include - -typedef enum { - DEVICE, - TIMEOUT, - AF_LIMIT -} I2C_PROPS; - -int i2c_read(uint8_t* buf, size_t count, void **vptr, void *sptr); -int i2c_write(uint8_t* buf, size_t count, void **vptr, void *sptr); -- cgit v1.2.3