summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Naik2020-08-03 12:22:24 -0400
committerAditya Naik2020-08-03 12:22:24 -0400
commit81b3f3d5336eab67e8eb21bb4011e552f3895a4e (patch)
tree93e1c56315824080b495cb9c99a156317677c287
parentc8c06aea5199e555235f71acc8547ed2ef0706cf (diff)
Reorg
-rw-r--r--src/master.c2
-rw-r--r--src/stream_i2c.h11
2 files changed, 1 insertions, 12 deletions
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 <stdint.h>
-#include <stddef.h>
-
-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);