|
@@ -1,5 +1,7 @@
|
|
|
#include "all-headers.h"
|
|
|
|
|
|
+#define LED_DELAY 1000
|
|
|
+
|
|
|
|
|
|
static void configureFaultRegisters (BOOT_MODE) {
|
|
|
// ACTLR register (reset value: 0)
|
|
@@ -30,13 +32,15 @@ static void endlessLoop (FAULT_MODE) {
|
|
|
pinMode (L2_LED, DigitalMode::OUTPUT) ;
|
|
|
pinMode (L3_LED, DigitalMode::OUTPUT) ;
|
|
|
pinMode (L4_LED, DigitalMode::OUTPUT) ;
|
|
|
+
|
|
|
+ digitalWrite (L0_LED, true) ;
|
|
|
+ digitalWrite (L1_LED, true) ;
|
|
|
while (1) {
|
|
|
digitalToggle (L0_LED) ;
|
|
|
digitalToggle (L1_LED) ;
|
|
|
- digitalToggle (L2_LED) ;
|
|
|
digitalToggle (L3_LED) ;
|
|
|
digitalToggle (L4_LED) ;
|
|
|
- busyWaitDuring_faultMode (MODE_ 200);
|
|
|
+ busyWaitDuring_faultMode (MODE_ LED_DELAY);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -61,6 +65,9 @@ static void handleFault (FAULT_MODE_ const char * inTitle, const uint32_t inLin
|
|
|
pinMode (L2_LED, DigitalMode::OUTPUT) ;
|
|
|
pinMode (L3_LED, DigitalMode::OUTPUT) ;
|
|
|
pinMode (L4_LED, DigitalMode::OUTPUT) ;
|
|
|
+
|
|
|
+ digitalWrite (L0_LED, true) ;
|
|
|
+ digitalWrite (L1_LED, true) ;
|
|
|
uint32_t displayedPage = 0 ;
|
|
|
uint32_t displayCounter = 0 ;
|
|
|
bool encoderA = false ;
|
|
@@ -85,10 +92,9 @@ static void handleFault (FAULT_MODE_ const char * inTitle, const uint32_t inLin
|
|
|
if (displayCounter > 0) {
|
|
|
displayCounter -= 1 ;
|
|
|
}else{
|
|
|
- displayCounter = 200 ;
|
|
|
+ displayCounter = LED_DELAY;
|
|
|
digitalToggle (L0_LED) ;
|
|
|
digitalToggle (L1_LED) ;
|
|
|
- digitalToggle (L2_LED) ;
|
|
|
digitalToggle (L3_LED) ;
|
|
|
digitalToggle (L4_LED) ;
|
|
|
if (display) {
|