Repository navigation
Expand file tree
/
Copy pathProjectConfig.h
More file actions
163 lines (137 loc) · 6.44 KB
/
Copy pathProjectConfig.h
File metadata and controls
163 lines (137 loc) · 6.44 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
#pragma once
#include "Project/FeatureProfiles.h"
// Explicit temporary verification profile. The ordinary source/default build
// retains RF administration; this test image keeps learned RF execution while
// freeing flash for the combined MCU recorder and 100-pixel strip exercise.
#ifndef PCCONTROLLER_MACRO_STRIP_TEST
#define PCCONTROLLER_MACRO_STRIP_TEST 0
#endif
#ifndef PCCONTROLLER_ENABLE_RF_LEARNING
#define PCCONTROLLER_ENABLE_RF_LEARNING (!PCCONTROLLER_MACRO_STRIP_TEST)
#endif
#if (PCCONTROLLER_MACRO_STRIP_TEST != 0) && (PCCONTROLLER_MACRO_STRIP_TEST != 1)
#error "PCCONTROLLER_MACRO_STRIP_TEST must be 0 or 1"
#endif
#if (PCCONTROLLER_ENABLE_RF_LEARNING != 0) && (PCCONTROLLER_ENABLE_RF_LEARNING != 1)
#error "PCCONTROLLER_ENABLE_RF_LEARNING must be 0 or 1"
#endif
// The UART is the primary COBS/opcode application link, not a debug console.
#ifndef PCCONTROLLER_UART_BAUD
#define PCCONTROLLER_UART_BAUD 115200UL
#endif
// The configured board uses up to 100 WS2811 pixels in BRG order on D6. Set this to 1
// for a WS2812B/GRB strip when the final hardware is confirmed.
#ifndef PCCONTROLLER_USE_WS2812B
#define PCCONTROLLER_USE_WS2812B 0
#endif
// Logical PWM 0 is off and 4095 is fully on. The MOSFET modules are active
// high; change this only if a later output stage is electrically inverted.
#ifndef PCCONTROLLER_PWM_ACTIVE_LOW
#define PCCONTROLLER_PWM_ACTIVE_LOW 0
#endif
// Raw 74HC165 levels for the two monitored inputs. A conventional reed switch
// wired to ground is low while the door magnet is present/closed, so an open
// door is normally read high. BT audio modules commonly sink the indicator
// LED cathode while it is illuminated, so that input defaults active-low.
// Flip either value after electrical verification if the board buffers it
// differently.
#ifndef PCCONTROLLER_DOOR_OPEN_RAW_HIGH
#define PCCONTROLLER_DOOR_OPEN_RAW_HIGH 1
#endif
#ifndef PCCONTROLLER_BT_LED_ON_RAW_HIGH
#define PCCONTROLLER_BT_LED_ON_RAW_HIGH 0
#endif
// The host owns the 16x2 PCF8574 LCD through the generic I2C opcode. Keeping
// the full HD44780 renderer off the 328P recovers flash for the timed macro
// queue; the host still scans 0x27/0x3F and mirrors all text/front-panel state.
#ifndef PCCONTROLLER_ENABLE_I2C_LCD
#define PCCONTROLLER_ENABLE_I2C_LCD 0
#endif
// Optional cooperative callback scheduler. No production task is registered
// on the ATmega328P profile, so keeping the engine off recovers its dormant
// object/code while preserving a build gate for larger-MCU profiles.
#ifndef PCCONTROLLER_ENABLE_TASK_SCHEDULER
#define PCCONTROLLER_ENABLE_TASK_SCHEDULER 0
#endif
// TonePlayer remains the board-wide playback engine in every profile. This
// gate owns only unsolicited/local cue policy: door and motion/output feedback
// can be omitted by a host-only or larger-MCU profile without removing direct
// BUZZER commands, macro playback, or the Silent setting.
#ifndef PCCONTROLLER_ENABLE_LOCAL_AUDIO_CUES
#define PCCONTROLLER_ENABLE_LOCAL_AUDIO_CUES 1
#endif
// The compact core-cue controller may load four frequency/duration triples
// from the CRC-backed startup region. Disabling this keeps the exact immutable
// fallbacks and avoids an EEPROM dependency; it does not disable local cues.
#ifndef PCCONTROLLER_ENABLE_EEPROM_AUDIO_CUES
#define PCCONTROLLER_ENABLE_EEPROM_AUDIO_CUES 0
#endif
#if (PCCONTROLLER_ENABLE_LOCAL_AUDIO_CUES != 0) && \
(PCCONTROLLER_ENABLE_LOCAL_AUDIO_CUES != 1)
#error "PCCONTROLLER_ENABLE_LOCAL_AUDIO_CUES must be 0 or 1"
#endif
#if (PCCONTROLLER_ENABLE_EEPROM_AUDIO_CUES != 0) && \
(PCCONTROLLER_ENABLE_EEPROM_AUDIO_CUES != 1)
#error "PCCONTROLLER_ENABLE_EEPROM_AUDIO_CUES must be 0 or 1"
#endif
// Rich catalog/layout presentation is host-owned. Stable page IDs and the
// fixed EEPROM bytes remain, but the AVR does not carry duplicate directory,
// ordering, hierarchy, or layout-protocol implementations in release builds.
#ifndef PCCONTROLLER_ENABLE_MENU_DIRECTORY
#define PCCONTROLLER_ENABLE_MENU_DIRECTORY 0
#endif
#ifndef PCCONTROLLER_MENU_LAYOUT_STORAGE
#define PCCONTROLLER_MENU_LAYOUT_STORAGE 1
#endif
// Keep the fixed 4-character front-panel menu labels in the factory EEPROM
// image instead of program flash. The feature is deliberately opt-in because
// an unprovisioned/corrupt EEPROM must fall back to the built-in labels.
#ifndef PCCONTROLLER_ENABLE_EEPROM_MENU_LABELS
#define PCCONTROLLER_ENABLE_EEPROM_MENU_LABELS 0
#endif
// AVR-owned persistent front-panel catalog. Stable page IDs remain protocol
// identities while EEPROM stores a separate visibility mask and packed rank.
#ifndef PCCONTROLLER_MENU_VISIBILITY
#define PCCONTROLLER_MENU_VISIBILITY 0
#endif
#ifndef PCCONTROLLER_MENU_ORDERING
#define PCCONTROLLER_MENU_ORDERING 0
#endif
#ifndef PCCONTROLLER_MENU_HIERARCHY
#define PCCONTROLLER_MENU_HIERARCHY 0
#endif
#ifndef PCCONTROLLER_MENU_LAYOUT_PROTOCOL
#define PCCONTROLLER_MENU_LAYOUT_PROTOCOL 0
#endif
// Optional AVR profile: execute a compact, CRC-validated EEPROM boot script
// after safety initialization. It is disabled in the byte-tight base image;
// the reviewed host feature profile pairs it with immutable local-audio
// fallbacks instead of the optional EEPROM cue loader so the exact AVR size
// gate still passes.
#ifndef PCCONTROLLER_ENABLE_EEPROM_BOOT_OPCODES
#define PCCONTROLLER_ENABLE_EEPROM_BOOT_OPCODES 0
#endif
#if PCCONTROLLER_ENABLE_EEPROM_BOOT_OPCODES != 0 && \
PCCONTROLLER_ENABLE_EEPROM_BOOT_OPCODES != 1
#error "PCCONTROLLER_ENABLE_EEPROM_BOOT_OPCODES must be 0 or 1"
#endif
// The complete board-owned automation core is retained and native-tested, but
// the current accepted ATmega328P image has only 136 application bytes free.
// Enabling this implementation currently exceeds the immutable 0x7DF4
// application ceiling; keep it off until an explicit product choice frees
// flash or selects a larger MCU. Host/offline tooling remains available.
#ifndef PCCONTROLLER_ENABLE_BOARD_AUTOMATIONS
#define PCCONTROLLER_ENABLE_BOARD_AUTOMATIONS 0
#endif
#if PCCONTROLLER_ENABLE_BOARD_AUTOMATIONS && PCCONTROLLER_ENABLE_EEPROM_MENU_LABELS
#error "Board automations and EEPROM menu labels cannot share the constrained ATmega328P tail"
#endif
#if PCCONTROLLER_MENU_ORDERING && !PCCONTROLLER_MENU_VISIBILITY
#error "Menu ordering requires persistent visibility"
#endif
#if PCCONTROLLER_MENU_HIERARCHY && !PCCONTROLLER_MENU_ORDERING
#error "Nested menus require persistent ordering"
#endif
#if PCCONTROLLER_MENU_LAYOUT_PROTOCOL && !PCCONTROLLER_MENU_ORDERING
#error "Menu-layout protocol requires persistent ordering"
#endif