aboutsummaryrefslogtreecommitdiffstats
path: root/fw/eeprom.h
blob: ab701d751258579f2c5ecf4c0f6c7be5881c110a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Microchip 25LC160C 2KiB EEPROM
 *
 * Device: PIC16F1459
 * Compiler: XC8 v3.00
 *
 * Usage:
 *
 * #include <stdint.h>
 * #include "types.h"
 * #include "eeprom.h"
 */

// Pin mapping
#define EEPROM_CS_TRIS TRISCbits.TRISC5
#define EEPROM_CS LATCbits.LATC5

void eepromInit(void);
Status eepromWrite(U16 addr, U8 data[], U8 size);
Status eepromRead(U16 addr, U8 data[], U8 size);