mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-08-23 14:02:52 +00:00
Shift some bus functions definitions out of the header
This commit is contained in:
+2
-14
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user