2024A-SW/components/NVM/Key_Value.h
Joe Kearney 7a7ce06d66 Pulled in the latest SystemK (with new BLE). (#2)
The new spec is here: [KTag Beacon Specification v0.11](https://ktag.clubk.club/Technology/BLE/KTag%20Beacon%20Specification%20v0.11.pdf)

Co-authored-by: Joe Kearney <joe@clubk.club>
Reviewed-on: #2
2025-06-08 22:05:06 +00:00

33 lines
No EOL
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);