-
Notifications
You must be signed in to change notification settings - Fork 2
/
eeprom.h
30 lines (24 loc) · 949 Bytes
/
eeprom.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef _EEPROM_H_
#define _EEPROM_H_
#include "global.h"
void ClearEEPROM();
#ifdef CONFIG
void DumpEEPROM(uint16_t addr, uint16_t size);
#endif
extern uint16_t Write16(uint16_t addr, uint16_t value);
extern uint16_t Read16(uint16_t addr, uint16_t *value);
extern void InitDevice(Device_t *device);
extern uint16_t WriteDeviceStart(uint16_t startAddr);
extern uint16_t ReadDeviceStart();
extern void WriteDeviceCount(uint8_t deviceCount);
extern uint8_t ReadDeviceCount();
extern uint16_t WriteDevice(uint16_t addr, Device_t *device, boolean calcOnly);
extern uint16_t ReadDevice(uint16_t addr, Device_t *device);
extern void InitKey(Key_t *key);
extern uint16_t WriteKeyStart(uint16_t startAddr);
extern uint16_t ReadKeyStart();
extern void WriteKeyCount(uint8_t keyCount);
extern uint8_t ReadKeyCount();
extern uint16_t WriteKey(uint16_t addr, const Key_t *key, boolean calcOnly);
extern uint16_t ReadKey(uint16_t addr, Key_t *key);
#endif