Browse Source

Update HAL and libs formatting

Scott Lahteine 6 years ago
parent
commit
4e0c935959

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

145
   UnwReadW,
145
   UnwReadW,
146
   UnwReadH,
146
   UnwReadH,
147
   UnwReadB
147
   UnwReadB
148
-  #if defined(UNW_DEBUG)
149
-   ,UnwPrintf
148
+  #ifdef UNW_DEBUG
149
+   , UnwPrintf
150
   #endif
150
   #endif
151
 };
151
 };
152
 
152
 

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

118
   UnwReadW,
118
   UnwReadW,
119
   UnwReadH,
119
   UnwReadH,
120
   UnwReadB
120
   UnwReadB
121
-  #if defined(UNW_DEBUG)
121
+  #ifdef UNW_DEBUG
122
    ,UnwPrintf
122
    ,UnwPrintf
123
   #endif
123
   #endif
124
 };
124
 };

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

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

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

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

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

106
 #define M_IsOriginValid(v) (((v) & 0x7F) ? true : false)
106
 #define M_IsOriginValid(v) (((v) & 0x7F) ? true : false)
107
 #define M_Origin2Str(v)    ((v) ? "VALID" : "INVALID")
107
 #define M_Origin2Str(v)    ((v) ? "VALID" : "INVALID")
108
 
108
 
109
-#if defined(UNW_DEBUG)
109
+#ifdef UNW_DEBUG
110
 #define UnwPrintd1(a)               state->cb->printf(a)
110
 #define UnwPrintd1(a)               state->cb->printf(a)
111
 #define UnwPrintd2(a,b)             state->cb->printf(a,b)
111
 #define UnwPrintd2(a,b)             state->cb->printf(a,b)
112
 #define UnwPrintd3(a,b,c)           state->cb->printf(a,b,c)
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
 
142
 
143
     /* MRS */
143
     /* MRS */
144
     else if ((instr & 0xFFBF0FFF) == 0xE10F0000) {
144
     else if ((instr & 0xFFBF0FFF) == 0xE10F0000) {
145
-#if defined(UNW_DEBUG)
145
+#ifdef UNW_DEBUG
146
       bool R     = (instr & 0x00400000) ? true : false;
146
       bool R     = (instr & 0x00400000) ? true : false;
147
 #endif
147
 #endif
148
       uint8_t rd = (instr & 0x0000F000) >> 12;
148
       uint8_t rd = (instr & 0x0000F000) >> 12;
154
     }
154
     }
155
     /* MSR */
155
     /* MSR */
156
     else if ((instr & 0xFFB0F000) == 0xE120F000) {
156
     else if ((instr & 0xFFB0F000) == 0xE120F000) {
157
-#if defined(UNW_DEBUG)
157
+#ifdef UNW_DEBUG
158
       bool R = (instr & 0x00400000) ? true : false;
158
       bool R = (instr & 0x00400000) ? true : false;
159
 
159
 
160
       UnwPrintd2("MSR %s_?, ???", R ? "SPSR" : "CPSR");
160
       UnwPrintd2("MSR %s_?, ???", R ? "SPSR" : "CPSR");
172
     else if (isDataProc(instr)) {
172
     else if (isDataProc(instr)) {
173
       bool            I = (instr & 0x02000000) ? true : false;
173
       bool            I = (instr & 0x02000000) ? true : false;
174
       uint8_t    opcode = (instr & 0x01E00000) >> 21;
174
       uint8_t    opcode = (instr & 0x01E00000) >> 21;
175
-#if defined(UNW_DEBUG)
175
+#ifdef UNW_DEBUG
176
       bool            S = (instr & 0x00100000) ? true : false;
176
       bool            S = (instr & 0x00100000) ? true : false;
177
 #endif
177
 #endif
178
       uint8_t        rn = (instr & 0x000F0000) >> 16;
178
       uint8_t        rn = (instr & 0x000F0000) >> 16;
220
         uint8_t  regShift  = (operand2 & 0x0010) ? true : false;
220
         uint8_t  regShift  = (operand2 & 0x0010) ? true : false;
221
         uint8_t  shiftType = (operand2 & 0x0060) >> 5;
221
         uint8_t  shiftType = (operand2 & 0x0060) >> 5;
222
         uint32_t shiftDist;
222
         uint32_t shiftDist;
223
-#if defined(UNW_DEBUG)
223
+#ifdef UNW_DEBUG
224
         const char * const shiftMnu[4] = { "LSL", "LSR", "ASR", "ROR" };
224
         const char * const shiftMnu[4] = { "LSL", "LSR", "ASR", "ROR" };
225
 #endif
225
 #endif
226
         UnwPrintd2("r%d ", rm);
226
         UnwPrintd2("r%d ", rm);
453
       bool     addrValid = M_IsOriginValid(state->regData[baseReg].o);
453
       bool     addrValid = M_IsOriginValid(state->regData[baseReg].o);
454
       int8_t r;
454
       int8_t r;
455
 
455
 
456
-#if defined(UNW_DEBUG)
456
+#ifdef UNW_DEBUG
457
       /* Display the instruction */
457
       /* Display the instruction */
458
       if (L) {
458
       if (L) {
459
         UnwPrintd6("LDM%c%c r%d%s, {reglist}%s\n", P ? 'E' : 'F', U ? 'D' : 'A', baseReg, W ? "!" : "", S ? "^" : "");
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
       uint8_t rs = (instr & 0x0038) >> 3;
680
       uint8_t rs = (instr & 0x0038) >> 3;
681
       uint8_t rd = (instr & 0x0007);
681
       uint8_t rd = (instr & 0x0007);
682
 
682
 
683
-#if defined(UNW_DEBUG)
683
+#ifdef UNW_DEBUG
684
       static const char * const mnu[16] = {
684
       static const char * const mnu[16] = {
685
         "AND", "EOR", "LSL", "LSR",
685
         "AND", "EOR", "LSL", "LSR",
686
         "ASR", "ADC", "SBC", "ROR",
686
         "ASR", "ADC", "SBC", "ROR",

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

90
       M_SetIdxUsed(memData->tracked, i);
90
       M_SetIdxUsed(memData->tracked, i);
91
     }
91
     }
92
     else {
92
     else {
93
-      #if defined(UNW_DEBUG)
93
+      #ifdef UNW_DEBUG
94
         memData->v[i] = 0xDEADBEEF;
94
         memData->v[i] = 0xDEADBEEF;
95
       #endif
95
       #endif
96
       M_ClrIdxUsed(memData->tracked, i);
96
       M_ClrIdxUsed(memData->tracked, i);

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

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

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

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

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


Loading…
Cancel
Save