diff options
author | Paul Selkirk <paul@psgd.org> | 2015-04-08 16:01:31 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2015-04-08 16:03:15 -0400 |
commit | aeaf94f4e83826fe56f38fc670973a60a5010ef1 (patch) | |
tree | 6f3d3ba5d0caf5be29f2a4f873a97b8070d6adc9 /eim/sw/tc_eim.h | |
parent | 891a24d969181f02762c031b9cfe0fd96c116634 (diff) |
Unify and refactor eim and i2c software.
Unify memory maps.
Move tc_init, tc_next, tc_wait_* into tc_[eim|i2c].c.
Move eim_setup into tc_eim.c, move i2c_open into tc_i2c.c.
Diffstat (limited to 'eim/sw/tc_eim.h')
-rw-r--r-- | eim/sw/tc_eim.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/eim/sw/tc_eim.h b/eim/sw/tc_eim.h index 257822d..5da18e4 100644 --- a/eim/sw/tc_eim.h +++ b/eim/sw/tc_eim.h @@ -34,9 +34,17 @@ */ #include "novena-eim.h" +#define BASE_ADDR EIM_BASE_ADDR +#define SEGMENT_SIZE 0x10000 +#define ADDR(x) (x << 2) +#include "cryptech_memory_map.h" /* test case public functions */ -int tc_write(off_t offset, const uint8_t *buf, int len); -int tc_read(off_t offset, uint8_t *buf, int len); -int tc_expected(off_t offset, const uint8_t *expected, int len); +int tc_write(off_t offset, const uint8_t *buf, size_t len); +int tc_read(off_t offset, uint8_t *buf, size_t len); +int tc_expected(off_t offset, const uint8_t *expected, size_t len); +int tc_init(off_t offset); +int tc_next(off_t offset); int tc_wait(off_t offset, uint8_t status, int *count); +int tc_wait_ready(off_t offset); +int tc_wait_valid(off_t offset); |