summaryrefslogtreecommitdiff
path: root/tmk_core/common/test
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2019-11-06 08:04:50 +1100
committerNick Brassel <nick@tzarc.org>2020-01-24 12:45:58 +1100
commitd13ada11622977bcc0b530212b4405229805016d (patch)
tree3f8874ac3c9b5950b1fed6ac4d0081a268d9f487 /tmk_core/common/test
parent6ff093efbee21d3f64f5b4bfdbc66d4648490523 (diff)
downloadqmk_firmware-d13ada11622977bcc0b530212b4405229805016d.tar.gz
qmk_firmware-d13ada11622977bcc0b530212b4405229805016d.zip
Add customisable EEPROM driver selection (#7274)
- uprintf -> dprintf - Fix atsam "vendor" eeprom. - Bump Kinetis K20x to 64 bytes, too. - Rollback Kinetis to 32 bytes as partitioning can only be done once. Add warning about changing the value. - Change RAM-backed "fake" EEPROM implementations to match eeconfig's current usage. - Add 24LC128 by request.
Diffstat (limited to 'tmk_core/common/test')
-rw-r--r--tmk_core/common/test/eeprom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tmk_core/common/test/eeprom.c b/tmk_core/common/test/eeprom.c
index 44a0bf4d76..5c8e69dae3 100644
--- a/tmk_core/common/test/eeprom.c
+++ b/tmk_core/common/test/eeprom.c
@@ -40,7 +40,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) {
return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24);
}
-void eeprom_read_block(void *buf, const void *addr, uint32_t len) {
+void eeprom_read_block(void *buf, const void *addr, size_t len) {
const uint8_t *p = (const uint8_t *)addr;
uint8_t * dest = (uint8_t *)buf;
while (len--) {
@@ -62,7 +62,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) {
eeprom_write_byte(p, value >> 24);
}
-void eeprom_write_block(const void *buf, void *addr, uint32_t len) {
+void eeprom_write_block(const void *buf, void *addr, size_t len) {
uint8_t * p = (uint8_t *)addr;
const uint8_t *src = (const uint8_t *)buf;
while (len--) {
@@ -86,7 +86,7 @@ void eeprom_update_dword(uint32_t *addr, uint32_t value) {
eeprom_write_byte(p, value >> 24);
}
-void eeprom_update_block(const void *buf, void *addr, uint32_t len) {
+void eeprom_update_block(const void *buf, void *addr, size_t len) {
uint8_t * p = (uint8_t *)addr;
const uint8_t *src = (const uint8_t *)buf;
while (len--) {