Solaris Software
Loading...
Searching...
No Matches
macros.h
Go to the documentation of this file.
1/**
2 * @file macros.h
3 * @brief Compile-time configuration flags and utility macros for SPP.
4 *
5 * Feature flags follow the pattern @c SPP_NO_<FEATURE> — define them to 1
6 * (e.g. in your CMakeLists.txt) to disable the corresponding feature and
7 * reduce code size on constrained targets.
8 *
9 * Naming conventions used in this file:
10 * - Feature-disable flags: SPP_NO_*
11 * - Capacity constants: K_SPP_*
12 */
13
14#ifndef SPP_MACROS_H
15#define SPP_MACROS_H
16
17/* ----------------------------------------------------------------
18 * Feature-disable flags
19 * (Define to 1 in CMake to disable the feature)
20 * ---------------------------------------------------------------- */
21
22/**
23 * @brief Disable dynamic memory allocation (malloc/free).
24 *
25 * When set, the databank and service registry use only static storage.
26 * This is the default mode for bare-metal targets.
27 * Currently unused.
28 */
29#ifndef SPP_NO_MALLOC
30#define SPP_NO_MALLOC 0
31#endif
32
33/**
34 * @brief Disable SD card / filesystem storage support.
35 *
36 * When set, the storage HAL stubs return K_SPP_OK without doing anything.
37 * Currently unused.
38 */
39#ifndef SPP_NO_STORAGE
40#define SPP_NO_STORAGE 0
41#endif
42
43/* ----------------------------------------------------------------
44 * Capacity constants
45 * ---------------------------------------------------------------- */
46
47/** @brief Number of packets in the static databank pool. */
48#ifndef K_SPP_DATABANK_SIZE
49#define K_SPP_DATABANK_SIZE (50U)
50#endif
51
52/* Subscriber dispatch priorities — defined in pubsub.h */
53
54#endif /* SPP_MACROS_H */