PCAL9555 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
pcal9555::I2cPort Concept Reference

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

#include <pcal9555_i2c_interface.hpp>

Concept definition

template<typename Port>
concept pcal9555::I2cPort = std::derived_from<Port, I2cInterface<Port>> && requires {
detail::ExactHook<Port, bool() noexcept>::Take(&Port::EnsureInitialized);
detail::ExactHook<Port, bool(uint8_t, const uint8_t*, std::size_t) noexcept>::Take(&Port::Write);
detail::ExactHook<Port, bool(uint8_t, const uint8_t*, std::size_t, uint8_t*,
std::size_t) noexcept>::Take(&Port::WriteRead);
}
Satisfied by a class that derives from I2cInterface<Port> and implements the required hooks with exac...
Definition pcal9555_i2c_interface.hpp:107

Detailed Description

Satisfied by a class that derives from I2cInterface<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 or without noexcept does not satisfy the concept (handbook KB-CPP20-006).

Template Parameters
PortThe port class.