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 lwpkt_opts.h file.

Note

Check Getting started for guidelines on how to create and use configuration file.

group LWPKT_OPT

Default configuration setup.

Defines

LWPKT_MEMSET(dst, val, len)

Memory set function.

Note

Function footprint is the same as memset

LWPKT_MEMCPY(dst, src, len)

Memory copy function.

Note

Function footprint is the same as memcpy

LWPKT_CFG_MAX_DATA_LEN

Maximum length of data part of the packet in units of bytes.

LWPKT_CFG_ADDR_BROADCAST

Address identifying broadcast message to all devices.

LWPKT_CFG_USE_ADDR

Enables 1 or disables 0 from and to fields in the protocol.

This features is useful if communication is between 2 devices exclusively, without addressing requirements

Configuration options:

  • 0: Feature is globally disabled in the library

  • 1: Feature is globally enabled in the library

  • 2: Feature is dynamically enabled/disabled in the library, according to the LwPKT object instance. If set to 2, feature is by default enabled, but it can be disabled with appropriate API function.

LWPKT_CFG_ADDR_EXTENDED

Enables 1 or disables 0 extended address length.

When enabled, multi-byte addresses are supported with MSB codification. Maximum address is limited to 32-bits.

When disabled, simple 8-bit address is fixed with single byte.

Feature is disabled by default to keep architecture compatibility

Configuration options:

  • 0: Feature is globally disabled in the library

  • 1: Feature is globally enabled in the library

  • 2: Feature is dynamically enabled/disabled in the library, according to the LwPKT object instance. If set to 2, feature is by default enabled, but it can be disabled with appropriate API function.

LWPKT_CFG_USE_CMD

Enables 1 or disables 0 cmd field in the protocol.

When disabled, command part is not used

Configuration options:

  • 0: Feature is globally disabled in the library

  • 1: Feature is globally enabled in the library

  • 2: Feature is dynamically enabled/disabled in the library, according to the LwPKT object instance. If set to 2, feature is by default enabled, but it can be disabled with appropriate API function.

LWPKT_CFG_USE_CRC

Enables 1 or disables 0 CRC check in the protocol.

Configuration options:

  • 0: Feature is globally disabled in the library

  • 1: Feature is globally enabled in the library

  • 2: Feature is dynamically enabled/disabled in the library, according to the LwPKT object instance. If set to 2, feature is by default enabled, but it can be disabled with appropriate API function.

LWPKT_CFG_USE_FLAGS

Enables 1 or disables 0 flags field in the protocol.

When enabled, multi-byte addresses are supported with MSB codification. Maximum address is limited to 32-bits.

Feature is disabled by default to keep architecture compatibility

Configuration options:

  • 0: Feature is globally disabled in the library

  • 1: Feature is globally enabled in the library

  • 2: Feature is dynamically enabled/disabled in the library, according to the LwPKT object instance. If set to 2, feature is by default enabled, but it can be disabled with appropriate API function.

LWPKT_CFG_PROCESS_INPROG_TIMEOUT

Defines timeout time before packet is considered as not valid when too long time in data-read mode.

Used with lwpkt_process function

LWPKT_CFG_USE_EVT

Enables 1 or disables 0 event functions for read and write operations.