Keyboard functional and first sending of PGN 127502
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
// NMEA2000 defaults
|
||||
#define N2K_DEFAULT_NODEID 124
|
||||
#define NMEA2000_HEARTBEAT_INTERVAL 5000 // milliseconds
|
||||
|
||||
// Keys
|
||||
#define KEY_1 GPIO_NUM_5 // D2
|
||||
@@ -54,3 +55,24 @@
|
||||
#define SPI_MISO GPIO_NUM_47 // D12
|
||||
#define SPI_SCK GPIO_NUM_48 // D13
|
||||
#define SPI_CS GPIO_NUM_46 // B0
|
||||
|
||||
// Button indices
|
||||
#define BUTTON_1 0
|
||||
#define BUTTON_2 1
|
||||
#define BUTTON_3 2
|
||||
#define BUTTON_4 3
|
||||
#define BUTTON_5 4
|
||||
#define BUTTON_6 5
|
||||
#define BUTTON_DST 6
|
||||
|
||||
enum class ButtonPressType : uint8_t
|
||||
{
|
||||
SHORT, // < 1 second
|
||||
MEDIUM, // >= 1 second and < 3 seconds
|
||||
LONG // >= 3 seconds
|
||||
};
|
||||
struct ButtonEvent
|
||||
{
|
||||
uint8_t buttonId;
|
||||
ButtonPressType pressType;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user