summaryrefslogtreecommitdiff
path: root/src/storage.h
blob: 011406d387c07a1bea93e11bc94ba15577d2ec39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdlib.h>

#define I2C_EEPROM_ADDR 0x50

class Storage {
	private:
		void i2c_start_write(void);
		void i2c_start_read(void);
		void i2c_stop(void);
		int8_t i2c_send(uint8_t len, uint8_t *data);
		int8_t i2c_receive(uint8_t len, uint8_t *data);
		int8_t i2c_read(uint16_t addr, uint8_t len, uint8_t *data);
		int8_t i2c_write(uint16_t addr, uint8_t len, uint8_t *data);
		// TODO "file system" housekeeping (index of first free page)
	public:
		Storage() {};
		void enable();
		// TODO load / save methods for animations
};

extern Storage storage;