Fit Tiny Relay Companion while retaining GPIO and storage
This commit is contained in:
1 parent
dbe092f5d5
commit
d83a6a3ceb
4 files changed
+19
No files matched your search
@@ -233,6 +233,7 @@ int main(void) {
|
||||
profiles.append((ini.parent.name, section))
|
||||
self.assertEqual(sorted(profiles), [
|
||||
("rak3x72", "[env:RAK_3x72_companion_radio_usb]"),
|
||||
("tiny_relay", "[env:Tiny_Relay_companion_radio_usb]"),
|
||||
("wio-e5-dev", "[env:wio-e5_companion_radio_usb]"),
|
||||
("wio-e5-mini", "[env:wio-e5-mini_companion_radio_usb]"),
|
||||
])
|
||||
|
||||
@@ -139,6 +139,7 @@ int main(void) {
|
||||
profiles.append((ini.parent.name, section))
|
||||
self.assertEqual(sorted(profiles), [
|
||||
("rak3x72", "[env:RAK_3x72_companion_radio_usb]"),
|
||||
("tiny_relay", "[env:Tiny_Relay_companion_radio_usb]"),
|
||||
("wio-e5-dev", "[env:wio-e5_companion_radio_usb]"),
|
||||
("wio-e5-mini", "[env:wio-e5-mini_companion_radio_usb]"),
|
||||
])
|
||||
|
||||
@@ -61,6 +61,18 @@ class STM32CompanionProfileTest(unittest.TestCase):
|
||||
r"-D\s+ED25519_COMPACT_" + definition + r"=1\b")
|
||||
|
||||
|
||||
class TinyRelaySTM32CompanionProfileTest(STM32CompanionProfileTest):
|
||||
variant = "tiny_relay"
|
||||
target = "Tiny_Relay_companion_radio_usb"
|
||||
base = "Tiny_Relay"
|
||||
|
||||
def test_relay_gpio_and_adc_monitor_are_retained(self):
|
||||
header = (ROOT / "variants" / self.variant / "target.h").read_text()
|
||||
self.assertIn("digitalWrite(PA0, values & 1)", header)
|
||||
self.assertIn("digitalWrite(PA1, (values & 2) >> 1)", header)
|
||||
self.assertIn("analogRead(PIN_VBAT_READ)", header)
|
||||
|
||||
|
||||
class WioDevSTM32CompanionProfileTest(STM32CompanionProfileTest):
|
||||
variant = "wio-e5-dev"
|
||||
target = "wio-e5_companion_radio_usb"
|
||||
|
||||
@@ -72,7 +72,12 @@ extends = Tiny_Relay
|
||||
platform_packages = platformio/toolchain-gccarmnoneeabi@^1.140201.0
|
||||
build_unflags = -Os
|
||||
build_flags = ${Tiny_Relay.build_flags}
|
||||
; GPIO relay controls and ADC monitoring do not use PWM/tone timers.
|
||||
-D RADIOLIB_TONE_UNSUPPORTED
|
||||
-D HAL_TIM_MODULE_ONLY
|
||||
-D ED25519_COMPACT_SHA512=1 ; same hash rounds, compact loop preserves the filesystem boundary
|
||||
-D ED25519_COMPACT_SCALAR=1 ; equivalent fixed-loop arithmetic preserves Companion capacities
|
||||
-D ED25519_COMPACT_FIELD=1 ; share field products without moving the filesystem boundary
|
||||
-Oz
|
||||
-flto
|
||||
-fno-inline-small-functions
|
||||
|
||||
Reference in new issue
Block a user