MAX22200 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
max22200::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: EnsureInitialized(), Transfer() and GpioSet() (CMD and ENABLE). More...

#include <max22200_spi_interface.hpp>

Concept definition

template<typename Port>
std::derived_from<Port, SpiInterface<Port>> && detail::HasGpioSet<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 max22200_spi_interface.hpp:154

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: EnsureInitialized(), Transfer() and GpioSet() (CMD and ENABLE).

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), another pin type or without noexcept does not satisfy the concept, instead of truncating or misrouting silently (KB-CPP20-006). DelayUs() is checked by the driver with a message that names it.

Template Parameters
PortThe port class.