makes GPIO_PIN_RST optional for the sx1276
[ExpressLRS.git] / src / lib / StubbornReceiver / stubborn_receiver.h
blob097be5d1c28e949b66d3f9eccca71e3058840729
1 #pragma once
3 #include <cstdint>
5 class StubbornReceiver
7 public:
8 StubbornReceiver(uint8_t maxPackageIndex);
9 void ResetState();
10 void SetDataToReceive(uint8_t maxLength, uint8_t* dataToReceive, uint8_t bytesPerCall);
11 void ReceiveData(uint8_t packageIndex, volatile uint8_t* data);
12 bool HasFinishedData();
13 void Unlock();
14 bool GetCurrentConfirm();
15 private:
16 uint8_t *data;
17 volatile bool finishedData;
18 volatile uint8_t length;
19 volatile uint8_t bytesPerCall;
20 volatile uint8_t currentOffset;
21 volatile uint8_t currentPackage;
22 volatile bool telemetryConfirm;
23 volatile uint8_t maxPackageIndex;