diff options
author | Nick Brassel <[email protected]> | 2023-11-28 16:39:48 +1100 |
---|---|---|
committer | Nick Brassel <[email protected]> | 2023-11-28 16:40:47 +1100 |
commit | 0115951de12bd4c798a43a380651c34552552e85 (patch) | |
tree | 62999011ae782d93aa6dc9c889615db2a840cafc /users/drashna/eeconfig_users.c | |
parent | 0379d1f59e58cefa18cdb72ba1b77507d1108ae6 (diff) | |
parent | 4d99e0a23cff02f4c6e55e093b5de08a9be0df7c (diff) | |
download | qmk_firmware-0.23.0.tar.gz qmk_firmware-0.23.0.zip |
`develop` -> `master`, 2023q4 edition0.23.0
Diffstat (limited to 'users/drashna/eeconfig_users.c')
-rw-r--r-- | users/drashna/eeconfig_users.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/users/drashna/eeconfig_users.c b/users/drashna/eeconfig_users.c deleted file mode 100644 index 8e0f1f10b6..0000000000 --- a/users/drashna/eeconfig_users.c +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 Christopher Courtney, aka Drashna Jael're (@drashna) <[email protected]> -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "eeconfig_users.h" -#include "eeprom.h" -#include "eeconfig.h" -#include <string.h> - -#if (TOTAL_EEPROM_BYTE_COUNT - 1) < EECONFIG_SIZE && !defined(KEYBOARD_input_club_ergodox_infinity) -# error "More eeprom configured than is available." -#endif -#if (EECONFIG_USER_DATA_SIZE) != 0 && (EECONFIG_USER_DATA_SIZE) < 4 -# error "Not enough EEPROM configured for user config." -#endif - -#if (EECONFIG_USER_DATA_SIZE) == 0 -# define EECONFIG_USER_TEMP EECONFIG_USER -#else -# define EECONFIG_USER_TEMP (uint32_t *)(EECONFIG_USER_DATABLOCK) -#endif - -void eeconfig_read_user_config(uint32_t *data) { -#if (EECONFIG_USER_DATA_SIZE) > 0 - if (!eeconfig_is_user_datablock_valid()) { - memset(data, 0, 4); - } else -#endif - eeprom_read_block(data, EECONFIG_USER_TEMP, 4); -} - -void eeconfig_update_user_config(const uint32_t *data) { - eeprom_update_block(data, EECONFIG_USER_TEMP, 4); -#if (EECONFIG_USER_DATA_SIZE) > 0 - eeprom_update_dword(EECONFIG_USER, (EECONFIG_USER_DATA_VERSION)); -#endif -} - -void eeconfig_read_user_data(void *data) { -#if (EECONFIG_USER_DATA_SIZE) > 4 - if (eeconfig_is_user_datablock_valid()) { - eeprom_read_block(data, EECONFIG_USER_DATABLOCK + 4, (EECONFIG_USER_DATA_SIZE)-4); - } else { - memset(data, 0, (EECONFIG_USER_DATA_SIZE)); - } -#endif -} - -void eeconfig_update_user_data(const void *data) { -#if (EECONFIG_USER_DATA_SIZE) > 4 - eeprom_update_dword(EECONFIG_USER, (EECONFIG_USER_DATA_VERSION)); - eeprom_update_block(data, EECONFIG_USER_DATABLOCK + 4, (EECONFIG_USER_DATA_SIZE)-4); -#endif -} |