Skip to content

Group baton_config

Modules > baton_config

Build-time configuration for Baton. More...

Macros

Type Name
define BATON_MAX_MSGS_PER_FRAME 16U
Largest number of messages packed into one frame (1..64).
define BATON_MAX_NODES 8U
Number of nodes on the bus including the master (2..32).
define BATON_MAX_PAYLOAD 64U
Largest frame payload in bytes (16..250).
define BATON_QUEUE_HIGH_SIZE 256U
Size of the HIGH priority event queue in bytes (64..65532).
define BATON_QUEUE_NORMAL_SIZE 512U
Size of the NORMAL priority event queue in bytes (64..65532).
define BATON_RX_BUF_SIZE 128U
Receive ring buffer filled from the UART interrupt; power of two, 16..4096.

Detailed Description

The application provides baton_user_config.h on the include path (copy config/baton_user_config_template.h). It must define the two message lists BATON_STATE_LIST and BATON_EVENT_LIST and may override any size below; a size can also be set with a compiler definition (for example -DBATON_MAX_NODES=4U). Every node of a bus must be built with the same message lists.

** **

Macro Definition Documentation

define BATON_MAX_MSGS_PER_FRAME

Largest number of messages packed into one frame (1..64).

#define BATON_MAX_MSGS_PER_FRAME `16U`


define BATON_MAX_NODES

Number of nodes on the bus including the master (2..32).

#define BATON_MAX_NODES `8U`


define BATON_MAX_PAYLOAD

Largest frame payload in bytes (16..250).

#define BATON_MAX_PAYLOAD `64U`

One message needs its length + 2.


define BATON_QUEUE_HIGH_SIZE

Size of the HIGH priority event queue in bytes (64..65532).

#define BATON_QUEUE_HIGH_SIZE `256U`

Each queued event uses 16 + length bytes, rounded up to 4.


define BATON_QUEUE_NORMAL_SIZE

Size of the NORMAL priority event queue in bytes (64..65532).

#define BATON_QUEUE_NORMAL_SIZE `512U`


define BATON_RX_BUF_SIZE

Receive ring buffer filled from the UART interrupt; power of two, 16..4096.

#define BATON_RX_BUF_SIZE `128U`