diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-08-08 15:45:32 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-08-08 15:45:32 +0200 |
commit | f4b31b88508892ca781ebb14716dc322e868b6db (patch) | |
tree | 11ffb6fa4d8ce8c8821ea10fa62b17cd0d7f0024 /include/driver | |
parent | e7f1024732ee9bac13fbf2e2439106f9f3577db7 (diff) |
Add 24LC64 EEPROM driver
Diffstat (limited to 'include/driver')
-rw-r--r-- | include/driver/eeprom24lc64.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/driver/eeprom24lc64.h b/include/driver/eeprom24lc64.h new file mode 100644 index 0000000..66e7666 --- /dev/null +++ b/include/driver/eeprom24lc64.h @@ -0,0 +1,19 @@ +#ifndef EEPROM24LC64_H +#define EEPROM24LC64_H + +class EEPROM24LC64 { + private: + EEPROM24LC64(const EEPROM24LC64 ©); + unsigned char const address; + unsigned char txbuf[34]; + + public: + EEPROM24LC64(unsigned char const addr) : address(addr) {} + + void writePage(unsigned short addr, char *buf); + void readPage(unsigned short addr, char *buf); +}; + +extern EEPROM24LC64 eeprom24lc64; + +#endif |