Replace timing values with microsecond variants.

This commit is contained in:
2023-08-31 01:27:05 +02:00
parent cea4b0d52a
commit 8598e019d4
3 changed files with 125 additions and 114 deletions

View File

@@ -36,21 +36,21 @@ typedef enum
#define NIGHTMODE_END_HR 7
#define NIGHTMODE_END_MIN 0
// Timings in ms
#define PERIOD_ANIMATION 200
#define PERIOD_HEARTBEAT 1000
#define PERIOD_MATRIX_UPDATE 100
#define PERIOD_NIGHTMODE_CHECK 20000
#define PERIOD_NTP_UPDATE 30000
#define PERIOD_PONG 10
#define PERIOD_SNAKE 50
#define PERIOD_STATE_CHANGE 10000
#define PERIOD_TETRIS 50
#define PERIOD_TIME_VISU_UPDATE 1000
#define TIMEOUT_LEDDIRECT 5000
// Timings in us
#define PERIOD_ANIMATION_US (200 * 1000) // 200ms
#define PERIOD_HEARTBEAT_US (1 * 1000 * 1000) // 1s
#define PERIOD_MATRIX_UPDATE_US (100 * 1000) // 100ms
#define PERIOD_NIGHTMODE_CHECK_US (20 * 1000 * 1000) // 20s
#define PERIOD_NTP_UPDATE_US (30 * 1000 * 1000) // 30s
#define PERIOD_PONG_US (10 * 1000) // 10ms
#define PERIOD_SNAKE_US (50 * 1000) // 50ms
#define PERIOD_STATE_CHANGE_US (10 * 1000 * 1000) // 10s
#define PERIOD_TETRIS_US (50 * 1000) // 50ms
#define PERIOD_TIME_VISU_UPDATE_US (1 * 1000 * 1000) // 1s
#define TIMEOUT_LEDDIRECT_US (5 * 1000 * 1000) // 5s
#define SHORT_PRESS_MS 100
#define LONG_PRESS_MS 2000
#define SHORT_PRESS_US (100 * 1000) // 100ms
#define LONG_PRESS_US (2 * 1000 * 1000) // 2s
// Current limit
#define CURRENT_LIMIT_LED 2500 // limit the total current consumed by LEDs (mA)