Browse Source

Update HAL and libs formatting

Scott Lahteine 5 years ago
parent
commit
4e0c935959

+ 2
- 2
Marlin/src/HAL/HAL_DUE/DebugMonitor_Due.cpp View File

@@ -145,8 +145,8 @@ static const UnwindCallbacks UnwCallbacks = {
145 145
   UnwReadW,
146 146
   UnwReadH,
147 147
   UnwReadB
148
-  #if defined(UNW_DEBUG)
149
-   ,UnwPrintf
148
+  #ifdef UNW_DEBUG
149
+   , UnwPrintf
150 150
   #endif
151 151
 };
152 152
 

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/DebugMonitor_LPC1768.cpp View File

@@ -118,7 +118,7 @@ static const UnwindCallbacks UnwCallbacks = {
118 118
   UnwReadW,
119 119
   UnwReadH,
120 120
   UnwReadB
121
-  #if defined(UNW_DEBUG)
121
+  #ifdef UNW_DEBUG
122 122
    ,UnwPrintf
123 123
   #endif
124 124
 };

+ 1
- 1
Marlin/src/HAL/HAL_TEENSY35_36/pinsDebug.h View File

@@ -45,7 +45,7 @@
45 45
 #define FTM3_CH5_PIN 36
46 46
 #define FTM3_CH6_PIN 37
47 47
 #define FTM3_CH7_PIN 38
48
-#if defined(__MK66FX1M0__) // Teensy3.6
48
+#ifdef __MK66FX1M0__ // Teensy3.6
49 49
   #define TPM1_CH0_PIN 16
50 50
   #define TPM1_CH1_PIN 17
51 51
 #endif

+ 1
- 1
Marlin/src/HAL/shared/backtrace/unwarm.cpp View File

@@ -23,7 +23,7 @@
23 23
 #include "unwarm.h"
24 24
 #include "unwarmmem.h"
25 25
 
26
-#if defined(UNW_DEBUG)
26
+#ifdef UNW_DEBUG
27 27
 
28 28
 /**
29 29
  * Printf wrapper.

+ 1
- 1
Marlin/src/HAL/shared/backtrace/unwarm.h View File

@@ -106,7 +106,7 @@ typedef struct {
106 106
 #define M_IsOriginValid(v) (((v) & 0x7F) ? true : false)
107 107
 #define M_Origin2Str(v)    ((v) ? "VALID" : "INVALID")
108 108
 
109
-#if defined(UNW_DEBUG)
109
+#ifdef UNW_DEBUG
110 110
 #define UnwPrintd1(a)               state->cb->printf(a)
111 111
 #define UnwPrintd2(a,b)             state->cb->printf(a,b)
112 112
 #define UnwPrintd3(a,b,c)           state->cb->printf(a,b,c)

+ 5
- 5
Marlin/src/HAL/shared/backtrace/unwarm_arm.cpp View File

@@ -142,7 +142,7 @@ UnwResult UnwStartArm(UnwState * const state) {
142 142
 
143 143
     /* MRS */
144 144
     else if ((instr & 0xFFBF0FFF) == 0xE10F0000) {
145
-#if defined(UNW_DEBUG)
145
+#ifdef UNW_DEBUG
146 146
       bool R     = (instr & 0x00400000) ? true : false;
147 147
 #endif
148 148
       uint8_t rd = (instr & 0x0000F000) >> 12;
@@ -154,7 +154,7 @@ UnwResult UnwStartArm(UnwState * const state) {
154 154
     }
155 155
     /* MSR */
156 156
     else if ((instr & 0xFFB0F000) == 0xE120F000) {
157
-#if defined(UNW_DEBUG)
157
+#ifdef UNW_DEBUG
158 158
       bool R = (instr & 0x00400000) ? true : false;
159 159
 
160 160
       UnwPrintd2("MSR %s_?, ???", R ? "SPSR" : "CPSR");
@@ -172,7 +172,7 @@ UnwResult UnwStartArm(UnwState * const state) {
172 172
     else if (isDataProc(instr)) {
173 173
       bool            I = (instr & 0x02000000) ? true : false;
174 174
       uint8_t    opcode = (instr & 0x01E00000) >> 21;
175
-#if defined(UNW_DEBUG)
175
+#ifdef UNW_DEBUG
176 176
       bool            S = (instr & 0x00100000) ? true : false;
177 177
 #endif
178 178
       uint8_t        rn = (instr & 0x000F0000) >> 16;
@@ -220,7 +220,7 @@ UnwResult UnwStartArm(UnwState * const state) {
220 220
         uint8_t  regShift  = (operand2 & 0x0010) ? true : false;
221 221
         uint8_t  shiftType = (operand2 & 0x0060) >> 5;
222 222
         uint32_t shiftDist;
223
-#if defined(UNW_DEBUG)
223
+#ifdef UNW_DEBUG
224 224
         const char * const shiftMnu[4] = { "LSL", "LSR", "ASR", "ROR" };
225 225
 #endif
226 226
         UnwPrintd2("r%d ", rm);
@@ -453,7 +453,7 @@ UnwResult UnwStartArm(UnwState * const state) {
453 453
       bool     addrValid = M_IsOriginValid(state->regData[baseReg].o);
454 454
       int8_t r;
455 455
 
456
-#if defined(UNW_DEBUG)
456
+#ifdef UNW_DEBUG
457 457
       /* Display the instruction */
458 458
       if (L) {
459 459
         UnwPrintd6("LDM%c%c r%d%s, {reglist}%s\n", P ? 'E' : 'F', U ? 'D' : 'A', baseReg, W ? "!" : "", S ? "^" : "");

+ 1
- 1
Marlin/src/HAL/shared/backtrace/unwarm_thumb.cpp View File

@@ -680,7 +680,7 @@ UnwResult UnwStartThumb(UnwState * const state) {
680 680
       uint8_t rs = (instr & 0x0038) >> 3;
681 681
       uint8_t rd = (instr & 0x0007);
682 682
 
683
-#if defined(UNW_DEBUG)
683
+#ifdef UNW_DEBUG
684 684
       static const char * const mnu[16] = {
685 685
         "AND", "EOR", "LSL", "LSR",
686 686
         "ASR", "ADC", "SBC", "ROR",

+ 1
- 1
Marlin/src/HAL/shared/backtrace/unwarmmem.cpp View File

@@ -90,7 +90,7 @@ bool UnwMemHashWrite(MemData * const memData, uint32_t addr, uint32_t val, bool
90 90
       M_SetIdxUsed(memData->tracked, i);
91 91
     }
92 92
     else {
93
-      #if defined(UNW_DEBUG)
93
+      #ifdef UNW_DEBUG
94 94
         memData->v[i] = 0xDEADBEEF;
95 95
       #endif
96 96
       M_ClrIdxUsed(memData->tracked, i);

+ 2
- 2
Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp View File

@@ -1,5 +1,5 @@
1 1
 /**
2
- * @file    lcdprint_hd44780.c
2
+ * @file    lcdprint_hd44780.cpp
3 3
  * @brief   LCD print api for HD44780
4 4
  * @author  Yunhui Fu (yhfudev@gmail.com)
5 5
  * @version 1.0
@@ -39,7 +39,7 @@ typedef struct _hd44780_charmap_t {
39 39
   uint8_t idx2;  // the char used to be combined with the idx to simulate a single char
40 40
 } hd44780_charmap_t;
41 41
 
42
-#if defined(__AVR__)
42
+#ifdef __AVR__
43 43
   #define IV(a) U##a
44 44
 #else
45 45
   #define IV(a) L##a

+ 1
- 1
Marlin/src/lcd/dogm/lcdprint_u8g.cpp View File

@@ -1,5 +1,5 @@
1 1
 /**
2
- * @file    lcdprint_u8g.c
2
+ * @file    lcdprint_u8g.cpp
3 3
  * @brief   LCD print api for u8glib
4 4
  * @author  Yunhui Fu (yhfudev@gmail.com)
5 5
  * @version 1.0

+ 602
- 638
Marlin/src/libs/softspi.h
File diff suppressed because it is too large
View File


Loading…
Cancel
Save