File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 24
24
# The board should automatically disconnect after copying is finished, and reboot into Espruino,
25
25
# which turns on the red led for a short time after starting up.
26
26
27
+ # If you accidentally put some stuff in .boot0 that prevents you from interacting with Espruino:
28
+ # Pull pin D1 to 3.3 V / high (important: make sure you use 3.3 V; higher voltages may cause damage) and reset the board,
29
+ # by either pressing the reset button or cutting the power and powering it up again.
30
+ # This behaviour is archived by configuring pin D1 as BTN1.
31
+
27
32
import pinutils
28
33
info = {
29
34
"name" : "Seeed Xiao BLE" ,
87
92
"LED1" : {"pin" : "D11" },
88
93
"LED2" : {"pin" : "D13" },
89
94
"LED3" : {"pin" : "D12" },
95
+ "BTN1" : {"pin" : "D1" , "pinstate" : "IN_PULLDOWN" },
90
96
"BAT" : {
91
97
"pin_charging" : "D23" ,
92
98
"pin_voltage" : "D32" ,
Original file line number Diff line number Diff line change @@ -1381,6 +1381,9 @@ bool jsfLoadBootCodeFromFlash(bool isReset) {
1381
1381
#else
1382
1382
if (!(jshPinGetValue (BTN1_PININDEX )== BTN1_ONSTATE ))
1383
1383
#endif
1384
+ #endif
1385
+ #if defined(XIAOBLE )
1386
+ if (!(jshPinGetValue (BTN1_PININDEX )== BTN1_ONSTATE ))
1384
1387
#endif
1385
1388
if (jsiStatus & JSIS_FIRST_BOOT ) {
1386
1389
JsVar * code = jsfReadFile (jsfNameFromString (".bootPowerOn" ),0 ,0 );
@@ -1398,6 +1401,10 @@ bool jsfLoadBootCodeFromFlash(bool isReset) {
1398
1401
if (!(jshPinGetValue (BTN1_PININDEX )== BTN1_ONSTATE &&
1399
1402
(jsiStatus & JSIS_FIRST_BOOT )))
1400
1403
#endif
1404
+ #endif
1405
+ #if defined(XIAOBLE )
1406
+ if (!(jshPinGetValue (BTN1_PININDEX )== BTN1_ONSTATE &&
1407
+ (jsiStatus & JSIS_FIRST_BOOT )))
1401
1408
#endif
1402
1409
{
1403
1410
char filename [7 ] = ".bootX" ;
You can’t perform that action at this time.
0 commit comments