37 lines
No EOL
614 B
C++
37 lines
No EOL
614 B
C++
#ifndef ATM_STATE_H
|
|
#define ATM_STATE_H
|
|
|
|
#include <Arduino.h>
|
|
#include <lnurl.h>
|
|
#include <cstring>
|
|
#include <string>
|
|
|
|
#include "button.h"
|
|
#include "coinacceptor.h"
|
|
#include "epaperdisplay.h"
|
|
|
|
extern EpaperDisplay epDisp;
|
|
extern AtmButton ok_button;
|
|
extern AtmButton cancel_button;
|
|
extern CoinAcceptor cacc;
|
|
|
|
namespace atm {
|
|
|
|
typedef enum {
|
|
INIT,
|
|
WAIT_FOR_COIN,
|
|
WAIT_FOR_BUTTON,
|
|
PROCESS_COIN,
|
|
GENERATE_QR,
|
|
CANCEL_PAYMENT,
|
|
CANCEL_CONFIRMED,
|
|
PAYMENT_CONFIRMED,
|
|
ERROR_STATE
|
|
} State;
|
|
|
|
void stateMachine(void);
|
|
void reset(void);
|
|
|
|
}
|
|
|
|
#endif |