ISF15ACP4 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
isf15acp4::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(), Write() and GpioSet() (RES# and the VCC enable). More...

#include <isf15acp4_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(DataKind, const uint8_t*, std::size_t) noexcept>::Take(
&Port::Write);
}
Satisfied by a class that derives from SpiInterface<Port> and implements the required hooks with exac...
Definition isf15acp4_spi_interface.hpp:151
DataKind
What a transfer carries: it sets the D/C# pin (section 7.2).
Definition isf15acp4_spi_interface.hpp:99

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(), Write() and GpioSet() (RES# and the VCC 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) or without noexcept does not satisfy the concept, instead of truncating every transfer silently (KB-CPP20-006). DelayUs() is checked by the driver with a message that names it.

Template Parameters
PortThe port class.