ether2ser 0.1.0
Ethernet <-> synchronous V.24 bridge firmware for RP2040 + W5500
Loading...
Searching...
No Matches
persistent_config.h
Go to the documentation of this file.
1
2/*
3 * ether2ser - Ethernet <-> synchronous V.24 (RS-232/V.28) bridge
4 *
5 * File: src/system/persistent_config.h
6 * Purpose: Persistent configuration data model and flash persistence API.
7 *
8 * SPDX-License-Identifier: Apache-2.0
9 *
10 * Copyright (c) 2026 Florian <f.leuze@outlook.de>
11 */
12
13#ifndef PERSISTENT_CONFIG_H
14#define PERSISTENT_CONFIG_H
15
16// Related headers
17// Standard library headers
18#include <stddef.h>
19#include <string.h>
20
21// Library Headers
22#include "hardware/flash.h"
23#include "hardware/sync.h"
24
25// Project Headers
26#include "drivers/gpio_driver.h"
29#include "system/common.h"
30
31// Generated headers
32
53
59bool config_read(config_t* cfg);
60
65void config_write(const config_t* cfg);
66
71bool config_is_valid(void);
72
76void dump_config(void);
77
81void config_wipe(void);
82
86void print_memory_usage(void);
87
91void print_flash_usage(void);
92
93#endif /* PERSISTENT_CONFIG_H */
log_level_t
Log verbosity levels.
Definition common.h:87
void print_flash_usage(void)
Print flash usage statistics.
void dump_config(void)
Print current configuration to console/log output.
bool config_read(config_t *cfg)
Read configuration from flash.
void config_write(const config_t *cfg)
Write configuration to flash.
void print_memory_usage(void)
Print RAM usage statistics.
void config_wipe(void)
Erase persistent configuration sector.
bool config_is_valid(void)
Check if flash configuration magic marker is valid.
Network configuration wrapper used by the W5500 driver.
UDP endpoint configuration.
Runtime V.24 configuration and TX holdoff state.
Definition v24_config.h:87
Persistent configuration blob stored in flash.
UDP_CONFIG_T local_config
uint32_t version
NETWORK_CONFIG_T net_config
uint32_t magic
V24_CONFIG_T v24_config
log_level_t log_level
UDP_CONFIG_T remote_config