Configuration and code improvements
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
||||
#define STRINGIFY_IMPL(x) #x
|
||||
#define STRINGIFY(x) STRINGIFY_IMPL(x)
|
||||
@@ -87,14 +88,24 @@
|
||||
#define BUTTON_6 5
|
||||
#define BUTTON_DST 6
|
||||
|
||||
enum class ButtonPressType : uint8_t
|
||||
{
|
||||
enum class ButtonPressType : uint8_t {
|
||||
SHORT, // < 1 second
|
||||
MEDIUM, // >= 1 second and < 3 seconds
|
||||
LONG // >= 3 seconds
|
||||
};
|
||||
struct ButtonEvent
|
||||
{
|
||||
|
||||
struct ButtonEvent {
|
||||
uint8_t buttonId;
|
||||
ButtonPressType pressType;
|
||||
};
|
||||
|
||||
extern uint64_t chipid;
|
||||
extern uint8_t led_brightness;
|
||||
extern uint8_t rgb_brightness;
|
||||
extern uint8_t keycode[6];
|
||||
extern uint8_t longcode[6];
|
||||
|
||||
extern float temp;
|
||||
extern float hum;
|
||||
|
||||
String uptime_with_unit();
|
||||
|
||||
Reference in New Issue
Block a user