Files
eye_trainer/Defines.h
2025-01-20 19:13:29 -08:00

39 lines
962 B
C

#ifndef EYE_TRAINER_CONSTANTS
#define EYE_TRAINER_CONSTANTS 0
#define PIN_LED_GND_BUS 6
#define MAX_LED_INDEX 15
#define MAX_BRIGHTNESS 255.0
#define MIN_BRIGHTNESS 25.5
#define PIN_BTN_MAIN 9
#define PIN_BTN_UP 10
#define PIN_BTN_DOWN 11
#define PIN_DISPLAY_CLK 7
#define PIN_DISPLAY_DIO 8
#define PIN_LED_SHIFT_REGISTER_DATA 5
#define PIN_LED_SHIFT_REGISTER_LATCH 4
#define PIN_LED_SHIFT_REGISTER_CLOCK 3
#define REGISTER_SIZE 2
#define LONG_CLICK_TIME_MS 500
#define BTN_UP_SHORT_CLICKED 1
#define BTN_DOWN_SHORT_CLICKED -1
#define BTN_DOWN_UP_NO_SHORT_CLICKED 0
#define BTN_UP_HOLDED 1
#define BTN_DOWN_HOLDED -1
#define BTN_DOWN_UP_NOT_HOLDED 0
#define LED_MAX_DISTANCE 1312
#define LED_DISTANCE_ARRAY LedDistances [MAX_LED_INDEX + 1] = { 0.0, 0.013, 0.029, 0.049, 0.073, 0.101, 0.135, 0.176, 0.225, 0.285, 0.356, 0.442, 0.546, 0.670, 0.820, 1.0 }
#define MAX_SWITCH_TIME 15000
#define MIN_SWITCH_TIME 500
#define DEFAULT_SWITCH_TIME 5000
#endif