tone-generator/eeprom.hpp

21 lines
369 B
C++
Raw Normal View History

#pragma once
2024-08-31 01:53:25 +10:00
#include <inttypes.h>
#include "soft_twi.hpp"
namespace eeprom {
2024-08-31 01:53:25 +10:00
constexpr uint8_t PAGE_SIZE = 128;
constexpr uint32_t BLOCK_SIZE = 0x10000;
2024-09-29 18:07:58 +10:00
constexpr uint32_t LENGTH = 0x80000;
2024-08-31 01:53:25 +10:00
2024-09-27 22:46:51 +10:00
inline SoftTWI mem(A4, A5);
2024-08-31 01:53:25 +10:00
void jump(uint32_t addr);
void read(char* data, uint16_t len);
void page_write(uint32_t at, const char* data);
2024-09-29 18:07:58 +10:00
uint32_t get_addr();
};