From 5ced5ee4f7ae21f7151f6e10259ea6dba908bbab Mon Sep 17 00:00:00 2001 From: Tom <116762865+NomDeTom@users.noreply.github.com> Date: Tue, 6 Oct 2026 23:47:46 +0000 Subject: [PATCH] Nrf promicro hf (#11966) * define txen pin to allow sx128x testing * nrf52 promicro: gate the P1.06 TXEN pin, and add an optional SX1280 build P1.06 was wired to SX126X_TXEN unconditionally earlier in this series, to drive an external PA on a bench unit. That is not safe to ship: three envs share this variant.h, and P1.06 is PIN_WIRE_SCL on the EasyProMicro pinout and PIN_EINK_BUSY on the InkHUD one. The default builds go back to RADIOLIB_NC. Put it behind -D PROMICRO_SX126X_TXEN, refused wherever the pin is already claimed. The EasyProMicro arrangement has its own SX126X_TXEN on P1.00 in the #else branch and never reaches this, so only the e-ink exclusion is needed. The pin was wanted for SX1280 in the first place - every other SX128X line is already assigned on this board and TXEN was the one missing - so add that too, behind -D PROMICRO_SX1280 and a new nrf52_promicro_diy-sx1280 env. Both opt-ins claim P1.06, so asking for both is an #error rather than a silent pick. Costs about 10.7 KB: the image ends at 0xE5140, 19 KB clear of the warm region, against 0xE2710 and 30 KB for the base env. * nrf52 promicro: keep P1.06 off TXEN on a MESHTASTIC_USE_EINK_UI build configuration.h includes variant.h before it derives USE_EINK from MESHTASTIC_USE_EINK_UI, so a build enabling the e-ink UI that way passed the guard and could give the panel's BUSY line to TXEN. Test both. --------- Co-authored-by: Jonathan Bennett --- variants/nrf52840/diy/nrf52_promicro_diy_tcxo/variant.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/variants/nrf52840/diy/nrf52_promicro_diy_tcxo/variant.h b/variants/nrf52840/diy/nrf52_promicro_diy_tcxo/variant.h index cb16a13500..c449e0698f 100644 --- a/variants/nrf52840/diy/nrf52_promicro_diy_tcxo/variant.h +++ b/variants/nrf52840/diy/nrf52_promicro_diy_tcxo/variant.h @@ -183,7 +183,9 @@ https://github.com/brad112358/easy_E22 // P1.06 is the only free pin left for a TXEN line, but it is also the e-ink panel's BUSY line. // EasyProMicro, where it is SCL, takes the #else branch below and has its own TXEN on P1.00. -#if !defined(MESHTASTIC_INCLUDE_NICHE_GRAPHICS) && !defined(USE_EINK) +#if !defined(MESHTASTIC_INCLUDE_NICHE_GRAPHICS) && !defined(USE_EINK) && \ + !(defined(MESHTASTIC_USE_EINK_UI) && MESHTASTIC_USE_EINK_UI) + #define PROMICRO_P106_FREE_FOR_TXEN #endif