aboutsummaryrefslogtreecommitdiffstats
path: root/fw/eeprom.h
diff options
context:
space:
mode:
Diffstat (limited to 'fw/eeprom.h')
-rw-r--r--fw/eeprom.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/fw/eeprom.h b/fw/eeprom.h
index ab701d7..47f02e6 100644
--- a/fw/eeprom.h
+++ b/fw/eeprom.h
@@ -5,8 +5,10 @@
*
* Usage:
*
+ * #include <stdbool>
* #include <stdint.h>
* #include "types.h"
+ * #include "can.h"
* #include "eeprom.h"
*/
@@ -14,6 +16,10 @@
#define EEPROM_CS_TRIS TRISCbits.TRISC5
#define EEPROM_CS LATCbits.LATC5
+typedef U16 EepromAddr;
+
void eepromInit(void);
-Status eepromWrite(U16 addr, U8 data[], U8 size);
-Status eepromRead(U16 addr, U8 data[], U8 size);
+Status eepromWrite(EepromAddr addr, U8 data[], U8 size);
+Status eepromRead(EepromAddr addr, U8 data[], U8 size);
+Status eepromWriteCanId(EepromAddr addr, const CanId *id);
+Status eepromReadCanId(EepromAddr addr, CanId *id);