TMC9660 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
tmc9660::SpiPort Concept Reference

Satisfied by a class that derives from SpiInterface<Port> and implements the required hooks with exactly the types above, noexcept and returning bool. More...

#include <tmc9660_spi_interface.hpp>

Concept definition

template<typename Port>
concept tmc9660::SpiPort = std::derived_from<Port, SpiInterface<Port>> && requires {
detail::ExactHook<Port, bool() noexcept>::Take(&Port::EnsureInitialized);
detail::ExactHook<Port, bool(const uint8_t*, uint8_t*, std::size_t) noexcept>::Take(
&Port::Transfer);
}
Satisfied by a class that derives from SpiInterface<Port> and implements the required hooks with exac...
Definition tmc9660_spi_interface.hpp:105

Detailed Description

Satisfied by a class that derives from SpiInterface<Port> and implements the required hooks with exactly the types above, noexcept and returning bool.

Each hook's address is matched with detail::ExactHook, which takes a member function of exactly the signature and converts no value: a hook declared with a narrower length (uint16_t len) or without noexcept does not satisfy the concept, instead of truncating every transfer silently (KB-CPP20-006).

Template Parameters
PortThe port class.