ESP32s3: Migrate variants to new structure (#7343)

This commit is contained in:
Austin
2025-07-20 16:47:37 -05:00
committed by GitHub
co-authored by GitHub
parent b851b15a73
commit 475cfe4af2
127 changed files with 126 additions and 101 deletions
+21
View File
@@ -0,0 +1,21 @@
// meshtastic/firmware/variants/unphone/variant.cpp
#include "unPhone.h"
unPhone unphone = unPhone("meshtastic_unphone");
void initVariant()
{
unphone.begin(); // initialise hardware etc.
unphone.store(unphone.buildTime);
unphone.printWakeupReason(); // what woke us up? (stored, not printed :|)
unphone.checkPowerSwitch(); // if power switch is off, shutdown
unphone.backlight(false); // setup backlight and make sure its off
unphone.expanderPower(true); // enable power to expander / hat / sheild
for (int i = 0; i < 3; i++) { // buzz a bit
unphone.vibe(true);
delay(150);
unphone.vibe(false);
delay(150);
}
}