mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2026-04-28 03:08:08 +00:00
common fsm
This commit is contained in:
21
IR_Encoder.h
21
IR_Encoder.h
@ -116,6 +116,27 @@ private:
|
||||
sync = 3
|
||||
};
|
||||
|
||||
struct TxFsmState
|
||||
{
|
||||
uint8_t sendLen = 0;
|
||||
uint8_t toggleCounter = 0;
|
||||
uint8_t dataBitCounter = 0;
|
||||
uint8_t dataByteCounter = 0;
|
||||
uint8_t preambFrontCounter = 0;
|
||||
uint8_t dataSequenceCounter = 0;
|
||||
uint8_t syncSequenceCounter = 0;
|
||||
bool syncLastBit = false;
|
||||
bool state = LOW;
|
||||
uint8_t *currentBitSequence = nullptr;
|
||||
SignalPart signal = noSignal;
|
||||
};
|
||||
|
||||
static bool txAdvanceBoundary(TxFsmState &st, const uint8_t *sendBufferLocal);
|
||||
static bool txAdvanceAfterOutput(TxFsmState &st, const uint8_t *sendBufferLocal);
|
||||
static bool txEmitTick(TxFsmState &st, const uint8_t *sendBufferLocal, bool &gateOut);
|
||||
void loadTxFsmFromMembers(TxFsmState &st) const;
|
||||
void storeTxFsmToMembers(const TxFsmState &st);
|
||||
|
||||
IR_DecoderRaw *decPair;
|
||||
IR_DecoderRaw **blindDecoders;
|
||||
uint8_t decodersCount;
|
||||
|
||||
Reference in New Issue
Block a user