Configuration¶
This is the default configuration of the middleware.
When any of the settings shall be modified, it shall be done in dedicated application config lwmem_opts.h
file.
Note
Check Getting started for guidelines on how to create and use configuration file.
- group LWMEM_OPT
LwMEM options.
Defines
-
LWMEM_CFG_OS¶
Enables
1
or disables0
operating system support in the library.Note
When
LWMEM_CFG_OS
is enabled, user must implement functions in System functions group.
-
LWMEM_CFG_OS_MUTEX_HANDLE¶
Mutex handle type.
Note
This value must be set in case LWMEM_CFG_OS is set to
1
. If data type is not known to compiler, include header file with definition before you define handle type
-
LWMEM_CFG_ALIGN_NUM¶
Number of bits to align memory address and memory size.
Some CPUs do not offer unaligned memory access (Cortex-M0 as an example) therefore it is important to have alignment of data addresses and potentialy length of data
Note
This value must be a power of
2
for number of bytes. Usually alignment of4
bytes fits to all processors.
-
LWMEM_CFG_CLEAN_MEMORY¶
Enables
1
or disables0
memory cleanup on free operation (or realloc).It resets unused memory to
0x00
and prevents other applications seeing old data. It is disabled by default since it has performance penalties.
-
LWMEM_CFG_ENABLE_STATS¶
Enables
1
or disables0
statistics in the library.
-
LWMEM_CFG_OS¶