ESPSomfy-RTS/tests/board-profile/extract-radio-setup.py
R. Sid Shaytay fdf840a236 feat: support headless LILYGO T-Embed CC1101 Plus
Configure the integrated radio power, shared SPI selects, RF path and fixed wiring without changing generic boards. Preload output latches for Arduino 3 and publish radio availability only after register and RX checks succeed. Reuse the existing partition table and protect integrated, USB and PSRAM pins across configuration and GPIO output paths.

Exercise production setup, RX and queue admission methods in a hardware-boundary host harness, run it in CI and document the opt-in build. Keep restore policy, security corrections and release tooling outside this board-only change.
2026-11-14 18:33:33 -08:00

29 lines
996 B
Python

"""Compile selected production methods without the unrelated RTOS/network code."""
from pathlib import Path
import sys
source = Path(sys.argv[1]).read_text()
names = [
'static bool checkBoardRadio(',
'void transceiver_config_t::applyBoardPins(',
'void transceiver_config_t::apply(',
'void Transceiver::setConfig(',
'bool Transceiver::usesPin(',
'void Transceiver::enableReceive(',
'bool Transceiver::startReceive(',
'void Transceiver::disableReceive(',
'uint32_t Transceiver::submitTx(',
]
methods = []
for name in names:
assert source.count(name) == 1, f'Production setup method changed: {name}'
start = source.index(name)
brace = source.index('{', start)
depth = 1
end = brace + 1
while depth:
assert end < len(source), f'Unterminated method: {name}'
depth += (source[end] == '{') - (source[end] == '}')
end += 1
methods.append(source[start:end])
Path(sys.argv[2]).write_text('\n\n'.join(methods) + '\n')