1
0
Fork 0

Wear-leveling EEPROM drivers: embedded_flash, spi_flash, legacy (#17376)

This commit is contained in:
Nick Brassel 2022-06-30 07:42:23 +10:00 committed by GitHub
parent 1204cbb7ea
commit 34e244cecf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 667 additions and 71 deletions

View file

@ -0,0 +1,23 @@
// Copyright 2022 Nick Brassel (@tzarc)
// SPDX-License-Identifier: GPL-2.0-or-later
#include <stdint.h>
#include <string.h>
#include "eeprom_driver.h"
#include "wear_leveling.h"
void eeprom_driver_init(void) {
wear_leveling_init();
}
void eeprom_driver_erase(void) {
wear_leveling_erase();
}
void eeprom_read_block(void *buf, const void *addr, size_t len) {
wear_leveling_read((uint32_t)addr, buf, len);
}
void eeprom_write_block(const void *buf, void *addr, size_t len) {
wear_leveling_write((uint32_t)addr, buf, len);
}