Shift some bus functions definitions out of the header

This commit is contained in:
Allen Hill
2026-07-05 19:37:40 -07:00
parent e878a61313
commit 950e1e8094
2 changed files with 18 additions and 14 deletions
+2 -14
View File
@@ -71,11 +71,11 @@ public:
};
class Bus::Handle {
Handle() { AVCLAN_stopEvent(); }
Handle();
friend Bus;
public:
~Handle() { AVCLAN_startEvent(); }
~Handle();
Handle(const Handle &) = delete;
Handle(Handle &&) = delete;
using Error = detail::Error;
@@ -159,16 +159,4 @@ private:
};
};
template <> inline avclan_bit_t Bus::Handle::sendbits<8>(uint8_t bits) {
return AVCLAN_sendbyte(&bits);
};
template <> inline avclan_bit_t Bus::Handle::sendbits<1>(uint8_t bits) {
const avclan_bit_t bit{static_cast<avclan_bit_t>(bits & 1U)};
AVCLAN_sendbit(bit);
return bit;
};
template <> inline avclan_bit_t Bus::Handle::readbits<8>(uint8_t *bits) {
return static_cast<avclan_bit_t>(AVCLAN_readbyte(bits));
};
} // namespace avclan