DYNAMIXEL Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
dynamixel_kconfig.hpp File Reference

Optional ESP-IDF layer: a Config built from the CONFIG_DYNAMIXEL_* Kconfig options. More...

#include "dynamixel_types.hpp"

Go to the source code of this file.

Namespaces

namespace  dynamixel
 The DYNAMIXEL driver: everything it declares lives here; internals in detail.
 

Macros

#define CONFIG_DYNAMIXEL_BAUD   57600
 
#define CONFIG_DYNAMIXEL_REPLY_TIMEOUT_US   20000
 
#define CONFIG_DYNAMIXEL_RETRIES   1
 

Functions

constexpr Config dynamixel::KconfigDefaults () noexcept
 The configuration menuconfig selected, on top of the defaults.
 

Detailed Description

Optional ESP-IDF layer: a Config built from the CONFIG_DYNAMIXEL_* Kconfig options.

Include this header only where you want menuconfig to choose the defaults; the driver never includes it and no driver signature depends on it. Under ESP-IDF the values come from sdkconfig.h. Without Kconfig every option falls back to the datasheet default, so KconfigDefaults() equals Config{}.

Kconfig writes a bool option set to "n" as an absent macro, so an absent CONFIG_DYNAMIXEL_ECHO_LOOPBACK means off in both cases.

One configuration per program: the inline function below depends on the CONFIG_ macros, so every translation unit of one program must see the same values (ESP-IDF has one sdkconfig.h per build; each host test is its own program). No driver or library header includes this one (handbook KB-CPP20-018).

Macro Definition Documentation

◆ CONFIG_DYNAMIXEL_BAUD

#define CONFIG_DYNAMIXEL_BAUD   57600

Bit rate when Kconfig does not set it: 57 600, the factory rate of the X series.

◆ CONFIG_DYNAMIXEL_REPLY_TIMEOUT_US

#define CONFIG_DYNAMIXEL_REPLY_TIMEOUT_US   20000

Reply timeout in microseconds when Kconfig does not set it: Config{}.reply_timeout_us.

◆ CONFIG_DYNAMIXEL_RETRIES

#define CONFIG_DYNAMIXEL_RETRIES   1

Repeats of an idempotent instruction when Kconfig does not set it: Config{}.retries.