Solaris Software
Loading...
Searching...
No Matches
macros.h File Reference

Compile-time configuration flags and utility macros for SPP. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SPP_NO_MALLOC   0
 Disable dynamic memory allocation (malloc/free).
#define SPP_NO_STORAGE   0
 Disable SD card / filesystem storage support.
#define K_SPP_DATABANK_SIZE   (50U)
 Number of packets in the static databank pool.
#define K_SPP_PUBSUB_MAX_SUBSCRIBERS   (8U)
 Maximum number of pub/sub subscribers that can be registered.
#define K_SPP_MAX_SERVICES   (16U)
 Maximum number of services that can be registered.
#define K_SPP_APID_NONE   (0x0000U)
 APID bitmask meaning "no APID — module neither produces nor consumes".
#define K_SPP_PUBSUB_QUEUE_SIZE   (16U)
 Deferred dispatch ring-buffer size. Must be a power of 2.

Detailed Description

Compile-time configuration flags and utility macros for SPP.

Feature flags follow the pattern SPP_NO_<FEATURE> — define them to 1 (e.g. in your CMakeLists.txt) to disable the corresponding feature and reduce code size on constrained targets.

Naming conventions used in this file:

  • Feature-disable flags: SPP_NO_*
  • Capacity constants: K_SPP_*

Definition in file macros.h.

Macro Definition Documentation

◆ SPP_NO_MALLOC

#define SPP_NO_MALLOC   0

Disable dynamic memory allocation (malloc/free).

When set, the databank and service registry use only static storage. This is the default mode for bare-metal targets.

Definition at line 29 of file macros.h.

◆ SPP_NO_STORAGE

#define SPP_NO_STORAGE   0

Disable SD card / filesystem storage support.

When set, the storage HAL stubs return K_SPP_OK without doing anything.

Definition at line 38 of file macros.h.

◆ K_SPP_DATABANK_SIZE

#define K_SPP_DATABANK_SIZE   (50U)

Number of packets in the static databank pool.

Definition at line 47 of file macros.h.

Referenced by SPP_SERVICES_DATABANK_init(), and SPP_SERVICES_DATABANK_returnPacket().

◆ K_SPP_PUBSUB_MAX_SUBSCRIBERS

#define K_SPP_PUBSUB_MAX_SUBSCRIBERS   (8U)

Maximum number of pub/sub subscribers that can be registered.

Definition at line 52 of file macros.h.

◆ K_SPP_MAX_SERVICES

#define K_SPP_MAX_SERVICES   (16U)

Maximum number of services that can be registered.

Definition at line 57 of file macros.h.

◆ K_SPP_APID_NONE

#define K_SPP_APID_NONE   (0x0000U)

APID bitmask meaning "no APID — module neither produces nor consumes".

Definition at line 66 of file macros.h.

◆ K_SPP_PUBSUB_QUEUE_SIZE

#define K_SPP_PUBSUB_QUEUE_SIZE   (16U)

Deferred dispatch ring-buffer size. Must be a power of 2.

Definition at line 71 of file macros.h.