-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.h
More file actions
58 lines (44 loc) · 2.13 KB
/
Copy pathConfig.h
File metadata and controls
58 lines (44 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#pragma once
#include <Arduino.h>
constexpr uint8_t kLedOutputCount = 8;
constexpr uint8_t kLedGpioByOutput[kLedOutputCount] = {
0, // GPOIO 0 output 0: T_OUT0 / LED0_DATA / J_LED0
1, // GPOIO 1 output 1: T_OUT1 / LED1_DATA / J_LED1
26, // GPOIO 26 output 2: T_OUT2 / LED2_DATA / J_LED2
28, // GPOIO 28 output 3: T_OUT3 / LED3_DATA / J_LED3
12, // GPOIO 12 output 4: T_OUT4 / LED4_DATA / J_LED4
13, // GPOIO 13 output 5: T_OUT5 / LED5_DATA / J_LED5
14, // GPOIO 14 output 6: T_OUT6 / LED6_DATA / J_LED6
15 // GPOIO 15 output 7: T_OUT7 / LED7_DATA / J_LED7
};
// - top row: outputs 0..3 drive 2,3,2,3 panels left-to-right
// - bottom row: outputs 4..7 drive 2,3,2,3 panels left-to-right
constexpr uint8_t kLiveLaneCount = 4;
constexpr uint8_t kLiveLaneOutputs[kLiveLaneCount] = {0, 1, 2, 3};
constexpr uint8_t kLiveLanePins[kLiveLaneCount] = {
kLedGpioByOutput[kLiveLaneOutputs[0]],
kLedGpioByOutput[kLiveLaneOutputs[1]],
kLedGpioByOutput[kLiveLaneOutputs[2]],
kLedGpioByOutput[kLiveLaneOutputs[3]],
};
constexpr uint8_t kLivePanelsPerLane[kLiveLaneCount] = {2, 3, 2, 3};
constexpr uint16_t kLivePanelWidth = 16;
constexpr uint16_t kLivePanelHeight = 16;
constexpr uint16_t kLiveLedsPerPanel = kLivePanelWidth * kLivePanelHeight; // 256
constexpr uint8_t kLivePanelCount = 10;
constexpr uint16_t kLiveMatrixWidth = kLivePanelWidth * 10; // 160
constexpr uint16_t kLiveMatrixHeight = kLivePanelHeight * 1; // 16
constexpr uint16_t kLiveLedCount = kLiveMatrixWidth * kLiveMatrixHeight; // 2560
constexpr size_t kLiveFrameBytes = static_cast<size_t>(kLiveLedCount) * 3U; // 7680
constexpr uint32_t kLiveSerialBaud = 500000UL;
constexpr uint32_t kLiveFrameTimeoutMs = 50UL;
// Brightness/power safety.
constexpr uint8_t kGeneralMaxBrightnessPercent = 5;
constexpr uint32_t kMaxCurrentMa = 2000UL;
constexpr uint32_t kLedMaPerChannel = 20UL;
constexpr bool kLiveInputColumnMajor = false;
constexpr uint8_t kPanelRotationQuarterTurnsCCW = 3;
constexpr bool kMatrixSerpentine = true;
constexpr bool kMatrixReverseOddRows = true;
constexpr bool kMatrixFlipX = false;
constexpr bool kMatrixFlipY = true;