Pārlūkot izejas kodu

Clean up trailing spaces

Scott Lahteine 7 gadus atpakaļ
vecāks
revīzija
ada90f7335

+ 13
- 13
Marlin/src/HAL/HAL_LPC1768/HardwareSerial.cpp Parādīt failu

102
 
102
 
103
 	// Initialize eripheral with given to corresponding parameter
103
 	// Initialize eripheral with given to corresponding parameter
104
   UART_Init(UARTx, &UARTConfigStruct);
104
   UART_Init(UARTx, &UARTConfigStruct);
105
-  
105
+
106
   // Enable and reset the TX and RX FIFOs
106
   // Enable and reset the TX and RX FIFOs
107
   UART_FIFOConfigStructInit(&FIFOConfig);
107
   UART_FIFOConfigStructInit(&FIFOConfig);
108
   UART_FIFOConfig(UARTx, &FIFOConfig);
108
   UART_FIFOConfig(UARTx, &FIFOConfig);
113
   // Configure Interrupts
113
   // Configure Interrupts
114
   UART_IntConfig(UARTx, UART_INTCFG_RBR, ENABLE);
114
   UART_IntConfig(UARTx, UART_INTCFG_RBR, ENABLE);
115
   UART_IntConfig(UARTx, UART_INTCFG_RLS, ENABLE);
115
   UART_IntConfig(UARTx, UART_INTCFG_RLS, ENABLE);
116
-  
116
+
117
   if (UARTx == LPC_UART0)
117
   if (UARTx == LPC_UART0)
118
     NVIC_EnableIRQ(UART0_IRQn);
118
     NVIC_EnableIRQ(UART0_IRQn);
119
   else if ((LPC_UART1_TypeDef *) UARTx == LPC_UART1)
119
   else if ((LPC_UART1_TypeDef *) UARTx == LPC_UART1)
135
   /* Temporarily lock out UART receive interrupts during this read so the UART receive
135
   /* Temporarily lock out UART receive interrupts during this read so the UART receive
136
      interrupt won't cause problems with the index values */
136
      interrupt won't cause problems with the index values */
137
   UART_IntConfig(UARTx, UART_INTCFG_RBR, DISABLE);
137
   UART_IntConfig(UARTx, UART_INTCFG_RBR, DISABLE);
138
-  
138
+
139
   if (RxQueueReadPos != RxQueueWritePos)
139
   if (RxQueueReadPos != RxQueueWritePos)
140
     byte = RxBuffer[RxQueueReadPos];
140
     byte = RxBuffer[RxQueueReadPos];
141
 
141
 
142
   /* Re-enable UART interrupts */
142
   /* Re-enable UART interrupts */
143
   UART_IntConfig(UARTx, UART_INTCFG_RBR, ENABLE);
143
   UART_IntConfig(UARTx, UART_INTCFG_RBR, ENABLE);
144
-  
144
+
145
   return byte;
145
   return byte;
146
 }
146
 }
147
 
147
 
151
   /* Temporarily lock out UART receive interrupts during this read so the UART receive
151
   /* Temporarily lock out UART receive interrupts during this read so the UART receive
152
      interrupt won't cause problems with the index values */
152
      interrupt won't cause problems with the index values */
153
   UART_IntConfig(UARTx, UART_INTCFG_RBR, DISABLE);
153
   UART_IntConfig(UARTx, UART_INTCFG_RBR, DISABLE);
154
-  
154
+
155
   if (RxQueueReadPos != RxQueueWritePos) {
155
   if (RxQueueReadPos != RxQueueWritePos) {
156
     byte = RxBuffer[RxQueueReadPos];
156
     byte = RxBuffer[RxQueueReadPos];
157
     RxQueueReadPos = (RxQueueReadPos + 1) % RX_BUFFER_SIZE;
157
     RxQueueReadPos = (RxQueueReadPos + 1) % RX_BUFFER_SIZE;
159
 
159
 
160
   /* Re-enable UART interrupts */
160
   /* Re-enable UART interrupts */
161
   UART_IntConfig(UARTx, UART_INTCFG_RBR, ENABLE);
161
   UART_IntConfig(UARTx, UART_INTCFG_RBR, ENABLE);
162
-  
162
+
163
   return byte;
163
   return byte;
164
 }
164
 }
165
 
165
 
170
 
170
 
171
     /* If the Tx Buffer is full, wait for space to clear */
171
     /* If the Tx Buffer is full, wait for space to clear */
172
     if ((TxQueueWritePos+1) % TX_BUFFER_SIZE == TxQueueReadPos) flushTX();
172
     if ((TxQueueWritePos+1) % TX_BUFFER_SIZE == TxQueueReadPos) flushTX();
173
-  
173
+
174
     /* Temporarily lock out UART transmit interrupts during this read so the UART transmit interrupt won't
174
     /* Temporarily lock out UART transmit interrupts during this read so the UART transmit interrupt won't
175
        cause problems with the index values */
175
        cause problems with the index values */
176
     UART_IntConfig(UARTx, UART_INTCFG_THRE, DISABLE);
176
     UART_IntConfig(UARTx, UART_INTCFG_THRE, DISABLE);
180
       fifolvl = *(reinterpret_cast<volatile uint32_t *>(&((LPC_UART1_TypeDef *) UARTx)->FIFOLVL));
180
       fifolvl = *(reinterpret_cast<volatile uint32_t *>(&((LPC_UART1_TypeDef *) UARTx)->FIFOLVL));
181
     else
181
     else
182
       fifolvl = *(reinterpret_cast<volatile uint32_t *>(&UARTx->FIFOLVL));
182
       fifolvl = *(reinterpret_cast<volatile uint32_t *>(&UARTx->FIFOLVL));
183
-  
183
+
184
     /* If the queue is empty and there's space in the FIFO, immediately send the byte */
184
     /* If the queue is empty and there's space in the FIFO, immediately send the byte */
185
     if (TxQueueWritePos == TxQueueReadPos && fifolvl < UART_TX_FIFO_SIZE) {
185
     if (TxQueueWritePos == TxQueueReadPos && fifolvl < UART_TX_FIFO_SIZE) {
186
       bytes = UART_Send(UARTx, &send, 1, BLOCKING);
186
       bytes = UART_Send(UARTx, &send, 1, BLOCKING);
191
       TxQueueWritePos = (TxQueueWritePos+1) % TX_BUFFER_SIZE;
191
       TxQueueWritePos = (TxQueueWritePos+1) % TX_BUFFER_SIZE;
192
       bytes++;
192
       bytes++;
193
     }
193
     }
194
-  
194
+
195
     /* Re-enable the TX Interrupt */
195
     /* Re-enable the TX Interrupt */
196
     UART_IntConfig(UARTx, UART_INTCFG_THRE, ENABLE);
196
     UART_IntConfig(UARTx, UART_INTCFG_THRE, ENABLE);
197
-  
197
+
198
     return bytes;
198
     return bytes;
199
   #else
199
   #else
200
     return UART_Send(UARTx, &send, 1, BLOCKING);
200
     return UART_Send(UARTx, &send, 1, BLOCKING);
251
       return;
251
       return;
252
     }
252
     }
253
   }
253
   }
254
-  
254
+
255
   if ( IIRValue == UART_IIR_INTID_RDA )	/* Receive Data Available */
255
   if ( IIRValue == UART_IIR_INTID_RDA )	/* Receive Data Available */
256
   {
256
   {
257
     /* Clear the FIFO */
257
     /* Clear the FIFO */
278
 
278
 
279
       /* Wait for FIFO buffer empty */
279
       /* Wait for FIFO buffer empty */
280
       while (UART_CheckBusy(UARTx) == SET);
280
       while (UART_CheckBusy(UARTx) == SET);
281
-    
281
+
282
       /* Transfer up to UART_TX_FIFO_SIZE bytes of data */
282
       /* Transfer up to UART_TX_FIFO_SIZE bytes of data */
283
       for (int i = 0; i < UART_TX_FIFO_SIZE && TxQueueWritePos != TxQueueReadPos; i++) {
283
       for (int i = 0; i < UART_TX_FIFO_SIZE && TxQueueWritePos != TxQueueReadPos; i++) {
284
         /* Move a piece of data into the transmit FIFO */
284
         /* Move a piece of data into the transmit FIFO */
287
         else
287
         else
288
           break;
288
           break;
289
       }
289
       }
290
-    
290
+
291
       /* If there is no more data to send, disable the transmit interrupt - else enable it or keep it enabled */
291
       /* If there is no more data to send, disable the transmit interrupt - else enable it or keep it enabled */
292
       if (TxQueueWritePos == TxQueueReadPos)
292
       if (TxQueueWritePos == TxQueueReadPos)
293
         UART_IntConfig(UARTx, UART_INTCFG_THRE, DISABLE);
293
         UART_IntConfig(UARTx, UART_INTCFG_THRE, DISABLE);

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/pinmapping.h Parādīt failu

163
   #define NUM_ANALOG_INPUTS 8
163
   #define NUM_ANALOG_INPUTS 8
164
 #endif
164
 #endif
165
 
165
 
166
-constexpr pin_t adc_pin_table[] = { 
166
+constexpr pin_t adc_pin_table[] = {
167
   P0_23, P0_24, P0_25, P0_26, P1_30, P1_31,
167
   P0_23, P0_24, P0_25, P0_26, P1_30, P1_31,
168
   #if SERIAL_PORT != 0
168
   #if SERIAL_PORT != 0
169
     P0_3, P0_2
169
     P0_3, P0_2
214
 
214
 
215
 int16_t GET_PIN_MAP_INDEX(pin_t pin);
215
 int16_t GET_PIN_MAP_INDEX(pin_t pin);
216
 int16_t PARSED_PIN_INDEX(char code, int16_t dval = 0);
216
 int16_t PARSED_PIN_INDEX(char code, int16_t dval = 0);
217
-                           
217
+
218
 #endif // __HAL_PINMAPPING_H__
218
 #endif // __HAL_PINMAPPING_H__

+ 9
- 10
Marlin/src/feature/Max7219_Debug_LEDs.cpp Parādīt failu

329
 
329
 
330
   #if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
330
   #if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
331
     static millis_t next_blink = 0;
331
     static millis_t next_blink = 0;
332
-
333
     if (ELAPSED(millis(), next_blink)) {
332
     if (ELAPSED(millis(), next_blink)) {
334
-        Max7219_LED_Toggle(7, 7);
335
-        next_blink = millis() + 750;
333
+      Max7219_LED_Toggle(7, 7);
334
+      next_blink = millis() + 750;
336
     }
335
     }
337
   #endif
336
   #endif
338
 
337
 
339
   #ifdef MAX7219_DEBUG_STEPPER_HEAD
338
   #ifdef MAX7219_DEBUG_STEPPER_HEAD
340
     static int16_t last_head_cnt=0;
339
     static int16_t last_head_cnt=0;
341
     if (last_head_cnt != head) {
340
     if (last_head_cnt != head) {
342
-      if ( last_head_cnt < 8)
341
+      if (last_head_cnt < 8)
343
         Max7219_LED_Off( last_head_cnt, MAX7219_DEBUG_STEPPER_HEAD);
342
         Max7219_LED_Off( last_head_cnt, MAX7219_DEBUG_STEPPER_HEAD);
344
       else
343
       else
345
         Max7219_LED_Off( last_head_cnt-8, MAX7219_DEBUG_STEPPER_HEAD+1);
344
         Max7219_LED_Off( last_head_cnt-8, MAX7219_DEBUG_STEPPER_HEAD+1);
346
 
345
 
347
       last_head_cnt = head;
346
       last_head_cnt = head;
348
-      if ( head < 8)
347
+      if (head < 8)
349
         Max7219_LED_On(head, MAX7219_DEBUG_STEPPER_HEAD);
348
         Max7219_LED_On(head, MAX7219_DEBUG_STEPPER_HEAD);
350
       else
349
       else
351
         Max7219_LED_On(head-8, MAX7219_DEBUG_STEPPER_HEAD+1);
350
         Max7219_LED_On(head-8, MAX7219_DEBUG_STEPPER_HEAD+1);
355
   #ifdef MAX7219_DEBUG_STEPPER_TAIL
354
   #ifdef MAX7219_DEBUG_STEPPER_TAIL
356
     static int16_t last_tail_cnt=0;
355
     static int16_t last_tail_cnt=0;
357
     if (last_tail_cnt != tail) {
356
     if (last_tail_cnt != tail) {
358
-      if ( last_tail_cnt < 8)
357
+      if (last_tail_cnt < 8)
359
         Max7219_LED_Off( last_tail_cnt, MAX7219_DEBUG_STEPPER_TAIL);
358
         Max7219_LED_Off( last_tail_cnt, MAX7219_DEBUG_STEPPER_TAIL);
360
       else
359
       else
361
         Max7219_LED_Off( last_tail_cnt-8, MAX7219_DEBUG_STEPPER_TAIL+1);
360
         Max7219_LED_Off( last_tail_cnt-8, MAX7219_DEBUG_STEPPER_TAIL+1);
362
 
361
 
363
       last_tail_cnt = tail;
362
       last_tail_cnt = tail;
364
-      if ( tail < 8)
363
+      if (tail < 8)
365
         Max7219_LED_On(tail, MAX7219_DEBUG_STEPPER_TAIL);
364
         Max7219_LED_On(tail, MAX7219_DEBUG_STEPPER_TAIL);
366
       else
365
       else
367
         Max7219_LED_On(tail-8, MAX7219_DEBUG_STEPPER_TAIL+1);
366
         Max7219_LED_On(tail-8, MAX7219_DEBUG_STEPPER_TAIL+1);
381
                     en = max(current_depth, last_depth);
380
                     en = max(current_depth, last_depth);
382
       if (current_depth < last_depth)
381
       if (current_depth < last_depth)
383
         for (uint8_t i = st; i <= en; i++)   // clear the highest order LEDs
382
         for (uint8_t i = st; i <= en; i++)   // clear the highest order LEDs
384
-            Max7219_LED_Off(i/2, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
383
+          Max7219_LED_Off(i/2, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
385
       else
384
       else
386
-          for (uint8_t i = st; i <= en; i++)   // set the LEDs to current depth
387
-            Max7219_LED_On(i/2, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
385
+        for (uint8_t i = st; i <= en; i++)   // set the LEDs to current depth
386
+          Max7219_LED_On(i/2, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
388
 
387
 
389
       last_depth = current_depth;
388
       last_depth = current_depth;
390
     }
389
     }

+ 4
- 4
Marlin/src/lcd/ultralcd.cpp Parādīt failu

3749
 
3749
 
3750
     void lcd_sdcard_menu() {
3750
     void lcd_sdcard_menu() {
3751
       ENCODER_DIRECTION_MENUS();
3751
       ENCODER_DIRECTION_MENUS();
3752
-  
3752
+
3753
       #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
3753
       #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
3754
-        if (ELAPSED(millis(), assume_print_finished)) { // if the printer has been busy printing, lcd_sdcard_menu() should not 
3754
+        if (ELAPSED(millis(), assume_print_finished)) { // if the printer has been busy printing, lcd_sdcard_menu() should not
3755
           lcdDrawUpdate = LCDVIEW_REDRAW_NOW;           // have been active for 5 seconds.  In this case, restore the previous
3755
           lcdDrawUpdate = LCDVIEW_REDRAW_NOW;           // have been active for 5 seconds.  In this case, restore the previous
3756
           encoderPosition = saved_encoderPosition;      // encoderPosition to the last selected item.
3756
           encoderPosition = saved_encoderPosition;      // encoderPosition to the last selected item.
3757
           assume_print_finished = millis() + 5000;
3757
           assume_print_finished = millis() + 5000;
3759
         saved_encoderPosition = encoderPosition;
3759
         saved_encoderPosition = encoderPosition;
3760
         defer_return_to_status = true;
3760
         defer_return_to_status = true;
3761
       #endif
3761
       #endif
3762
-      
3762
+
3763
       const uint16_t fileCnt = card.getnrfilenames();
3763
       const uint16_t fileCnt = card.getnrfilenames();
3764
       START_MENU();
3764
       START_MENU();
3765
       MENU_BACK(MSG_MAIN);
3765
       MENU_BACK(MSG_MAIN);
4780
       if (currentScreen == lcd_status_screen || defer_return_to_status)
4780
       if (currentScreen == lcd_status_screen || defer_return_to_status)
4781
         #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
4781
         #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
4782
           if (currentScreen != lcd_sdcard_menu)                // lcd_sdcard_menu() does not time out if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
4782
           if (currentScreen != lcd_sdcard_menu)                // lcd_sdcard_menu() does not time out if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
4783
-            return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS;  // When the printer finishes a file, it will wait with the file selected for 
4783
+            return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS;  // When the printer finishes a file, it will wait with the file selected for
4784
         #else                                                  // a re-print.
4784
         #else                                                  // a re-print.
4785
         return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS;
4785
         return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS;
4786
         #endif
4786
         #endif

+ 1
- 1
Marlin/src/pins/pins_AZSMZ_MINI.h Parādīt failu

39
 // Servos
39
 // Servos
40
 //
40
 //
41
 #define SERVO0_PIN         53
41
 #define SERVO0_PIN         53
42
-    
42
+
43
 //
43
 //
44
 // Limit Switches
44
 // Limit Switches
45
 //
45
 //

Notiek ielāde…
Atcelt
Saglabāt