mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-08-07 01:13:18 +00:00
fixup fixup bus send/read parity & acking
This commit is contained in:
+6
-6
@@ -94,9 +94,9 @@ public:
|
|||||||
bool sendstartbit();
|
bool sendstartbit();
|
||||||
Error::Read readstartbit();
|
Error::Read readstartbit();
|
||||||
|
|
||||||
template <auto N, std::unsigned_integral T, class Trailer>
|
template <auto N, std::unsigned_integral T,
|
||||||
requires(sizeof(T) < 3 && N < 16) &&
|
std::derived_from<trailer_bits_t> Trailer>
|
||||||
requires { std::is_base_of_v<trailer_bits_t, Trailer>; }
|
requires(sizeof(T) < 3 && N < 16 && !std::same_as<Trailer, with_ack_t>)
|
||||||
Error::Send send(T bits, Trailer /*tag*/) {
|
Error::Send send(T bits, Trailer /*tag*/) {
|
||||||
const auto parity = sendbits<N>(bits);
|
const auto parity = sendbits<N>(bits);
|
||||||
|
|
||||||
@@ -117,9 +117,9 @@ public:
|
|||||||
return Send{0};
|
return Send{0};
|
||||||
};
|
};
|
||||||
|
|
||||||
template <auto N, std::unsigned_integral T, class Trailer>
|
template <auto N, std::unsigned_integral T,
|
||||||
requires(sizeof(T) < 3 && N < 16) &&
|
std::derived_from<trailer_bits_t> Trailer>
|
||||||
requires { std::is_base_of_v<trailer_bits_t, Trailer>; }
|
requires(sizeof(T) < 3 && N < 16 && !std::same_as<Trailer, with_ack_t>)
|
||||||
Error::Read read(T *bits, Trailer /*tag*/) {
|
Error::Read read(T *bits, Trailer /*tag*/) {
|
||||||
const auto calc_parity = readbits<N>(bits);
|
const auto calc_parity = readbits<N>(bits);
|
||||||
if constexpr (std::is_same_v<Trailer, with_parity_t>) {
|
if constexpr (std::is_same_v<Trailer, with_parity_t>) {
|
||||||
|
|||||||
Reference in New Issue
Block a user