From: Jacob Alexander Date: Tue, 23 Jun 2015 14:58:31 +0000 (-0700) Subject: Fixing order of layer debug stack display X-Git-Url: https://git.donarmstrong.com/?p=kiibohd-controller.git;a=commitdiff_plain;h=216b1513026e45e44794f15cfa4d02ff1c9d49f4 Fixing order of layer debug stack display - Adding NL's for fault messages --- diff --git a/Lib/mk20dx.c b/Lib/mk20dx.c index 2b11943..47759a4 100644 --- a/Lib/mk20dx.c +++ b/Lib/mk20dx.c @@ -70,7 +70,7 @@ void ResetHandler(); // NVIC - Default ISR void fault_isr() { - print("Fault!"); + print("Fault!" NL ); while ( 1 ) { // keep polling some communication while in fault @@ -99,35 +99,35 @@ void systick_default_isr() // NVIC - Non-Maskable Interrupt ISR void nmi_default_isr() { - print("NMI!"); + print("NMI!" NL ); } // NVIC - Hard Fault ISR void hard_fault_default_isr() { - print("Hard Fault!"); + print("Hard Fault!" NL ); } // NVIC - Memory Manager Fault ISR void memmanage_fault_default_isr() { - print("Memory Manager Fault!"); + print("Memory Manager Fault!" NL ); } // NVIC - Bus Fault ISR void bus_fault_default_isr() { - print("Bus Fault!"); + print("Bus Fault!" NL ); } // NVIC - Usage Fault ISR void usage_fault_default_isr() { - print("Usage Fault!"); + print("Usage Fault!" NL ); } diff --git a/Macro/PartialMap/macro.c b/Macro/PartialMap/macro.c index 76d830e..bc2d7d6 100644 --- a/Macro/PartialMap/macro.c +++ b/Macro/PartialMap/macro.c @@ -226,10 +226,10 @@ void Macro_layerState( uint8_t state, uint8_t stateType, uint16_t layer, uint8_t print(" 0"); // Iterate over the layer stack starting from the bottom of the stack - for ( uint16_t index = 0; index < macroLayerIndexStackSize; index++ ) + for ( uint16_t index = macroLayerIndexStackSize; index > 0; index-- ) { print(":"); - printHex_op( macroLayerIndexStack[ index ], 0 ); + printHex_op( macroLayerIndexStack[ index - 1 ], 0 ); } print( NL );