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
# Feature-based event subscriber declarations.
#
# When all `features` listed in an entry are enabled (checked via
# CARGO_FEATURE_* env vars at build time), each event's `subs` is
# bumped by the specified amount.
#
# This keeps event_default.toml at base counts and avoids wasting
# static memory when a feature is disabled.
#
# Format per event: { name = "event_name", count = N }
# `count` defaults to 1 if omitted.
# --- Display-gated internal subscribers ---
[[]]
= ["display"]
= [
# display/mod.rs: DisplayProcessor subscribes to these events
{ = "wpm_update" },
{ = "modifier" },
{ = "sleep_state" },
{ = "layer_change" },
{ = "battery_status" },
{ = "led_indicator" },
]
[[]]
= ["display", "_ble"]
= [
# display/mod.rs: DisplayProcessor subscribes when _ble is enabled
{ = "connection_status_change" },
]
[[]]
= ["display", "split"]
= [
# split/driver.rs: each PeripheralManager subscribes when display is enabled
# (gated on #[cfg(feature = "display")] in driver.rs)
# Covers up to 2 peripherals; for 3+ peripherals override subs in keyboard.toml
{ = "wpm_update", = 2 },
{ = "sleep_state", = 2 },
]
# --- BLE-gated internal subscribers ---
[[]]
= ["_ble"]
= [
# ble/battery_service.rs: BatteryStatusEvent::subscriber()
# processor/builtin/battery_led.rs: subscribe = [BatteryStatusEvent] (user-optional but _ble-gated)
{ = "battery_status", = 2 },
# ble/mod.rs: KeyboardEvent/PointingEvent wake subscribers, created when
# advertising times out. Without a reserved slot they panic on boards whose
# permanent subscribers already fill the base count.
{ = "keyboard" },
{ = "pointing" },
]
# Rynk sessions subscribe to these topics; USB+BLE boards need two slots.
[[]]
= ["rynk"]
= [
{ = "layer_change" },
{ = "wpm_update" },
{ = "connection_status_change" },
{ = "sleep_state" },
{ = "led_indicator" },
]
[[]]
= ["rynk", "_ble"]
= [
# battery_status is only subscribed under `_ble`; needs one slot per
# concurrent session (USB + BLE = 2).
{ = "battery_status", = 2 },
# Second session slot for the always-on topics on dual-transport boards.
{ = "layer_change" },
{ = "wpm_update" },
{ = "connection_status_change" },
{ = "sleep_state" },
{ = "led_indicator" },
]
# --- Dongle firmware internal subscribers ---
[[]]
= ["dongle"]
= [
# dongle/link.rs: LedIndicatorEvent::subscriber() on the one keyboard link.
{ = "led_indicator" },
]
# --- Split-gated internal subscribers ---
[[]]
= ["split"]
= [
# split/peripheral.rs: KeyboardEvent::subscriber()
{ = "keyboard" },
# split/peripheral.rs: PointingEvent::subscriber()
{ = "pointing" },
# split/driver.rs: LedIndicatorEvent::subscriber()
# Covers up to 2 peripherals; for 3+ peripherals override subs in keyboard.toml
{ = "led_indicator", = 2 },
# split/driver.rs: LayerChangeEvent::subscriber()
{ = "layer_change" },
# split/driver.rs: ConnectionStatusChangeEvent::subscriber()
# Covers up to 2 peripherals; for 3+ peripherals override subs in keyboard.toml
{ = "connection_status_change", = 2 },
]
# --- Split + BLE-gated internal subscribers ---
[[]]
= ["split", "_ble"]
= [
# split/ble/peripheral.rs: KeyboardEvent::subscriber() (temporary, on timeout)
{ = "keyboard" },
# split/peripheral.rs: ChargingStateEvent::subscriber() (cfg _ble)
{ = "charging_state" },
# split/peripheral.rs: BatteryStatusEvent::subscriber() (cfg _ble)
{ = "battery_status" },
# split/driver.rs: ClearPeerEvent::subscriber() (cfg _ble)
# Covers up to 2 peripherals; for 3+ peripherals override subs in keyboard.toml
{ = "clear_peer", = 2 },
# split/ble/central.rs: SleepStateEvent::subscriber() per connected link
# Covers up to 2 peripherals; for 3+ peripherals override subs in keyboard.toml
{ = "sleep_state", = 2 },
]