2024A-SW/components/NVM/Key_Value.h
Joe Kearney e12ee17973 32ESPecial Version 1.00 (#9)
This release reworked the initialization code to provide more robust initialization, especially when no USB stick is present.

It incorporates [Version 1.0 of SystemK](Software/SystemK#9).

This is the first release for the [32ESPecial Blaster Kits](https://link.clubk.club/2025002).

Co-authored-by: Joe Kearney <joe@clubk.club>
Reviewed-on: #9
2025-11-30 21:46:46 +00:00

33 lines
1.5 KiB
C

/*
* This program source code file is part of the KTag project.
*
* 🛡️ <https://ktag.clubk.club> 🃞
*
* Copyright © 2024-2025 Joseph P. Kearney and the KTag developers.
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* There should be a copy of the GNU Affero General Public License in the LICENSE
* file in the root of this repository. If not, see <http://www.gnu.org/licenses/>.
*/
#define KV_MAX_LINE_LENGTH 140
#define KV_MAX_KEY_LENGTH 64
#define KV_MAX_VALUE_LENGTH 64
SystemKResult_T KV_Get_Value_string(const char *filename, const char *search_key, char *value);
SystemKResult_T KV_Set_Value_string(const char *filename, const char *set_key, const char *set_value);
SystemKResult_T KV_Get_Value_uint32(const char *filename, const char *search_key, uint32_t *value);
SystemKResult_T KV_Set_Value_uint32(const char *filename, const char *set_key, uint32_t *set_value);
SystemKResult_T KV_Get_Value_uint8(const char *filename, const char *search_key, uint8_t *value);
SystemKResult_T KV_Set_Value_uint8(const char *filename, const char *set_key, uint8_t *set_value);