Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
fal_cfg.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2022 ML!PA Consulting GmbH
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
9
#pragma once
10
26
27
#include "board.h"
28
#include "
macros/units.h
"
29
#include "mtd_default.h"
30
31
#ifdef __cplusplus
32
extern
"C"
{
33
#endif
34
35
#if !defined(CONFIG_FLASHDB_MIN_SECTOR_SIZE_DEFAULT_KiB) || defined(DOXYGEN)
59
#define CONFIG_FLASHDB_MIN_SECTOR_SIZE_DEFAULT_KiB 4
60
#endif
61
65
#define FAL_PART_HAS_TABLE_CFG
66
70
extern
struct
fal_flash_dev
mtd_flash0
;
71
75
#define FAL_FLASH_DEV_TABLE \
76
{ \
77
&mtd_flash0, \
78
}
79
80
#if !defined(FAL_MTD) || defined(DOXYGEN)
84
#define FAL_MTD mtd_dev_get(0)
85
#endif
86
87
#if !defined(FAL_PART0_LABEL) || defined(DOXYGEN)
91
#define FAL_PART0_LABEL "part0"
92
#endif
93
94
#if !defined(FAL_PART0_LENGTH) || defined(DOXYGEN)
104
#define FAL_PART0_LENGTH (2 * (CONFIG_FLASHDB_MIN_SECTOR_SIZE_DEFAULT_KiB * KiB(1)))
105
#endif
106
110
#if defined(FAL_PART0_LABEL) || defined(DOXYGEN)
111
#if !defined(FAL_PART0_OFFSET) || defined(DOXYGEN)
115
#define FAL_PART0_OFFSET 0
116
#endif
120
#define FAL_ROW_PART0 { FAL_PART_MAGIC_WORD, FAL_PART0_LABEL, "fal_mtd", \
121
FAL_PART0_OFFSET, FAL_PART0_LENGTH, 0 },
122
#else
123
#define FAL_ROW_PART0
124
#endif
125
129
#if defined(FAL_PART1_LABEL) || defined(DOXYGEN)
130
#if !defined(FAL_PART1_OFFSET) || defined(DOXYGEN)
134
#define FAL_PART1_OFFSET (FAL_PART0_OFFSET + FAL_PART0_LENGTH)
135
#endif
139
#define FAL_ROW_PART1 { FAL_PART_MAGIC_WORD, FAL_PART1_LABEL, "fal_mtd", \
140
FAL_PART1_OFFSET, FAL_PART1_LENGTH, 0 },
141
#else
142
#define FAL_ROW_PART1
143
#endif
144
148
#if defined(FAL_PART2_LABEL) || defined(DOXYGEN)
149
#if !defined(FAL_PART2_OFFSET) || defined(DOXYGEN)
153
#define FAL_PART2_OFFSET (FAL_PART1_OFFSET + FAL_PART1_LENGTH)
154
#endif
158
#define FAL_ROW_PART2 { FAL_PART_MAGIC_WORD, FAL_PART2_LABEL, "fal_mtd", \
159
FAL_PART2_OFFSET, FAL_PART2_LENGTH, 0 },
160
#else
161
#define FAL_ROW_PART2
162
#endif
163
167
#if defined(FAL_PART3_LABEL) || defined(DOXYGEN)
168
#if !defined(FAL_PART3_OFFSET) || defined(DOXYGEN)
172
#define FAL_PART3_OFFSET (FAL_PART2_OFFSET + FAL_PART2_LENGTH)
173
#endif
177
#define FAL_ROW_PART3 { FAL_PART_MAGIC_WORD, FAL_PART3_LABEL, "fal_mtd", \
178
FAL_PART3_OFFSET, FAL_PART3_LENGTH, 0 },
179
#else
180
#define FAL_ROW_PART3
181
#endif
182
186
#define FAL_PART_TABLE \
187
{ \
188
FAL_ROW_PART0 \
189
FAL_ROW_PART1 \
190
FAL_ROW_PART2 \
191
FAL_ROW_PART3 \
192
}
193
194
#ifdef __cplusplus
195
}
196
#endif
mtd_flash0
struct fal_flash_dev mtd_flash0
FAL <-> MTD adapter.
units.h
Unit helper macros.
Generated on Thu Oct 30 2025 19:21:16 by
1.13.2