mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-21 01:47:51 +00:00
Rework BitHistory, BitPattern, PacketBuilder.
Templatize PacketBuilder to optionally bit unstuff, and have flexible packet termination behavior.
This commit is contained in:
@@ -20,18 +20,3 @@
|
||||
*/
|
||||
|
||||
#include "packet_builder.hpp"
|
||||
|
||||
void PacketBuilder::configure(
|
||||
const BitPattern preamble,
|
||||
const BitPattern unstuff
|
||||
) {
|
||||
preamble_pattern = preamble;
|
||||
unstuff_pattern = unstuff;
|
||||
|
||||
reset_state();
|
||||
}
|
||||
|
||||
void PacketBuilder::reset_state() {
|
||||
bits_received = 0;
|
||||
state = State::Preamble;
|
||||
}
|
||||
|
Reference in New Issue
Block a user