blob: 75998bb588e3415113cb52e70d9cea73cbd79377 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include <avr/io.h>
#include <avr/interrupt.h>
#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;
|