21 lines
369 B
C++
21 lines
369 B
C++
|
|
#pragma once
|
|
|
|
#include <inttypes.h>
|
|
#include "soft_twi.hpp"
|
|
|
|
namespace eeprom {
|
|
|
|
constexpr uint8_t PAGE_SIZE = 128;
|
|
constexpr uint32_t BLOCK_SIZE = 0x10000;
|
|
constexpr uint32_t LENGTH = 0x80000;
|
|
|
|
inline SoftTWI mem(A4, A5);
|
|
|
|
void jump(uint32_t addr);
|
|
void read(char* data, uint16_t len);
|
|
void page_write(uint32_t at, const char* data);
|
|
uint32_t get_addr();
|
|
};
|
|
|