Introducing enum for handling the NFC state to improve code readability
This commit is contained in:
14
src/nfc.h
14
src/nfc.h
@@ -3,6 +3,16 @@
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
typedef enum{
|
||||
IDLE,
|
||||
READING,
|
||||
READ_SUCCESS,
|
||||
READ_ERROR,
|
||||
WRITING,
|
||||
WRITE_SUCCESS,
|
||||
WRITE_ERROR
|
||||
} nfcReaderStateType;
|
||||
|
||||
void startNfc();
|
||||
void scanRfidTask(void * parameter);
|
||||
void startWriteJsonToTag(const char* payload);
|
||||
@@ -10,7 +20,9 @@ void startWriteJsonToTag(const char* payload);
|
||||
extern TaskHandle_t RfidReaderTask;
|
||||
extern String nfcJsonData;
|
||||
extern String spoolId;
|
||||
extern volatile uint8_t hasReadRfidTag;
|
||||
extern volatile nfcReaderStateType nfcReaderState;
|
||||
extern volatile bool pauseBambuMqttTask;
|
||||
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user