|
TMC9660 Driver 0.1.0
API reference
|
A configuration proven valid at build time. More...
#include <tmc9660_types.hpp>
Public Member Functions | |
| consteval | CheckedConfig (const Config &config) noexcept |
Check config at build time. | |
| constexpr const Config & | Get () const &noexcept |
| void | Get () const &&=delete |
| Not on a temporary: the reference would dangle (KB-CPP20-044). | |
A configuration proven valid at build time.
constexpr CheckedConfig kBoard{Config{.device_address = 0}}; fails to compile, naming ConfigIsInvalid, when Validate() rejects the configuration. Pass kBoard.Get() to the driver; the driver still validates at start-up, for configurations built at run time.
|
inlineexplicitnoexcept |
Check config at build time.
| config | The configuration; it must pass Validate(). |
|
inlineconstexprnoexcept |