mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-29 01:29:03 -04:00
Rework BitHistory, BitPattern, PacketBuilder.
Templatize PacketBuilder to optionally bit unstuff, and have flexible packet termination behavior.
This commit is contained in:
parent
0b522abbc1
commit
0789d50fdf
5 changed files with 59 additions and 69 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue