소스 검색

Merge pull request #7722 from tcm0116/2.0.x-warnings

Cleanup 2.0.x compiler warnings
Scott Lahteine 7 년 전
부모
커밋
ac41eb5871

+ 3
- 3
.travis.yml 파일 보기

@@ -352,8 +352,8 @@ script:
352 352
   - opt_enable FILAMENT_WIDTH_SENSOR FILAMENT_LCD_DISPLAY
353 353
   - opt_enable FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE
354 354
   - opt_enable BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BABYSTEP_ZPROBE_GFX_OVERLAY
355
-  - opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT M100_FREE_MEMORY_WATCHER
356
-  - opt_enable_adv ADVANCED_PAUSE_FEATURE LCD_INFO_MENU ARC_SUPPORT BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES SDCARD_SORT_ALPHA
355
+  - opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT M100_FREE_MEMORY_WATCHER
356
+  - opt_enable_adv ADVANCED_PAUSE_FEATURE LCD_INFO_MENU ARC_SUPPORT BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES SDCARD_SORT_ALPHA PARK_HEAD_ON_PAUSE
357 357
   - opt_set_adv I2C_SLAVE_ADDRESS 63
358 358
   - opt_set ABL_GRID_POINTS_X 16
359 359
   - opt_set ABL_GRID_POINTS_Y 16
@@ -388,7 +388,7 @@ script:
388 388
   # Mixing Extruder
389 389
   #
390 390
   - restore_configs
391
-  - opt_enable MIXING_EXTRUDER
391
+  - opt_enable MIXING_EXTRUDER DIRECT_MIXING_IN_G1
392 392
   - opt_set MIXING_STEPPERS 2
393 393
   - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
394 394
   #

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp 파일 보기

@@ -171,7 +171,7 @@
171 171
     UNUSED(response);
172 172
   }
173 173
 
174
-  static void spiSend(const uint8_t* buf, size_t n) {
174
+  void spiSend(const uint8_t* buf, size_t n) {
175 175
     uint8_t response;
176 176
     if (n == 0) return;
177 177
     for (uint16_t i = 0; i < n; i++) {

+ 151
- 156
Marlin/src/HAL/HAL_LPC1768/HardwareSerial.cpp 파일 보기

@@ -346,7 +346,6 @@ extern "C" {
346 346
 void UART0_IRQHandler (void)
347 347
 {
348 348
   uint8_t IIRValue, LSRValue;
349
-  uint8_t Dummy = Dummy;
350 349
 
351 350
   IIRValue = LPC_UART0->IIR;
352 351
 
@@ -354,59 +353,59 @@ void UART0_IRQHandler (void)
354 353
   IIRValue &= 0x07;			/* check bit 1~3, interrupt identification */
355 354
   if ( IIRValue == IIR_RLS )		/* Receive Line Status */
356 355
   {
357
-	LSRValue = LPC_UART0->LSR;
358
-	/* Receive Line Status */
359
-	if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) )
360
-	{
361
-	  /* There are errors or break interrupt */
362
-	  /* Read LSR will clear the interrupt */
363
-	  UART0Status = LSRValue;
364
-	  Dummy = LPC_UART0->RBR;		/* Dummy read on RX to clear
365
-							interrupt, then bail out */
366
-	  return;
367
-	}
368
-	if ( LSRValue & LSR_RDR )	/* Receive Data Ready */
369
-	{
370
-	  /* If no error on RLS, normal ready, save into the data buffer. */
371
-	  /* Note: read RBR will clear the interrupt */
372
-		  if ((UART0RxQueueWritePos+1) % UARTRXQUEUESIZE != UART0RxQueueReadPos)
373
-		  {
374
-			  UART0Buffer[UART0RxQueueWritePos] = LPC_UART0->RBR;
375
-			  UART0RxQueueWritePos = (UART0RxQueueWritePos+1) % UARTRXQUEUESIZE;
376
-		  }
377
-		  else
378
-			  dummy = LPC_UART0->RBR;;
379
-	}
356
+    LSRValue = LPC_UART0->LSR;
357
+    /* Receive Line Status */
358
+    if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) )
359
+    {
360
+      /* There are errors or break interrupt */
361
+      /* Read LSR will clear the interrupt */
362
+      UART0Status = LSRValue;
363
+      dummy = LPC_UART0->RBR;		/* Dummy read on RX to clear
364
+                                   interrupt, then bail out */
365
+      return;
366
+    }
367
+    if ( LSRValue & LSR_RDR )	/* Receive Data Ready */
368
+    {
369
+      /* If no error on RLS, normal ready, save into the data buffer. */
370
+      /* Note: read RBR will clear the interrupt */
371
+      if ((UART0RxQueueWritePos+1) % UARTRXQUEUESIZE != UART0RxQueueReadPos)
372
+      {
373
+        UART0Buffer[UART0RxQueueWritePos] = LPC_UART0->RBR;
374
+        UART0RxQueueWritePos = (UART0RxQueueWritePos+1) % UARTRXQUEUESIZE;
375
+      }
376
+      else
377
+        dummy = LPC_UART0->RBR;
378
+    }
380 379
   }
381 380
   else if ( IIRValue == IIR_RDA )	/* Receive Data Available */
382 381
   {
383
-	/* Receive Data Available */
382
+	  /* Receive Data Available */
384 383
 	  if ((UART0RxQueueWritePos+1) % UARTRXQUEUESIZE != UART0RxQueueReadPos)
385 384
 	  {
386 385
 		  UART0Buffer[UART0RxQueueWritePos] = LPC_UART0->RBR;
387 386
 		  UART0RxQueueWritePos = (UART0RxQueueWritePos+1) % UARTRXQUEUESIZE;
388 387
 	  }
389 388
 	  else
390
-		  dummy = LPC_UART1->RBR;;
389
+		  dummy = LPC_UART1->RBR;
391 390
   }
392 391
   else if ( IIRValue == IIR_CTI )	/* Character timeout indicator */
393 392
   {
394
-	/* Character Time-out indicator */
395
-	UART0Status |= 0x100;		/* Bit 9 as the CTI error */
393
+    /* Character Time-out indicator */
394
+    UART0Status |= 0x100;		/* Bit 9 as the CTI error */
396 395
   }
397 396
   else if ( IIRValue == IIR_THRE )	/* THRE, transmit holding register empty */
398 397
   {
399
-	/* THRE interrupt */
400
-	LSRValue = LPC_UART0->LSR;		/* Check status in the LSR to see if
401
-									valid data in U0THR or not */
402
-	if ( LSRValue & LSR_THRE )
403
-	{
404
-	  UART0TxEmpty = 1;
405
-	}
406
-	else
407
-	{
408
-	  UART0TxEmpty = 0;
409
-	}
398
+    /* THRE interrupt */
399
+    LSRValue = LPC_UART0->LSR;		/* Check status in the LSR to see if
400
+                                     valid data in U0THR or not */
401
+    if ( LSRValue & LSR_THRE )
402
+    {
403
+      UART0TxEmpty = 1;
404
+    }
405
+    else
406
+    {
407
+      UART0TxEmpty = 0;
408
+    }
410 409
   }
411 410
 }
412 411
 
@@ -422,7 +421,6 @@ void UART0_IRQHandler (void)
422 421
 void UART1_IRQHandler (void)
423 422
 {
424 423
   uint8_t IIRValue, LSRValue;
425
-  uint8_t Dummy = Dummy;
426 424
 
427 425
   IIRValue = LPC_UART1->IIR;
428 426
 
@@ -430,61 +428,60 @@ void UART1_IRQHandler (void)
430 428
   IIRValue &= 0x07;			/* check bit 1~3, interrupt identification */
431 429
   if ( IIRValue == IIR_RLS )		/* Receive Line Status */
432 430
   {
433
-	LSRValue = LPC_UART1->LSR;
434
-	/* Receive Line Status */
435
-	if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) )
436
-	{
437
-	  /* There are errors or break interrupt */
438
-	  /* Read LSR will clear the interrupt */
439
-	  UART1Status = LSRValue;
440
-	  Dummy = LPC_UART1->RBR;		/* Dummy read on RX to clear
441
-								interrupt, then bail out */
442
-	  return;
443
-	}
444
-	if ( LSRValue & LSR_RDR )	/* Receive Data Ready */
445
-	{
446
-	  /* If no error on RLS, normal ready, save into the data buffer. */
447
-	  /* Note: read RBR will clear the interrupt */
448
-	  if ((UART1RxQueueWritePos+1) % UARTRXQUEUESIZE != UART1RxQueueReadPos)
449
-	  {
450
-		  UART1Buffer[UART1RxQueueWritePos] = LPC_UART1->RBR;
451
-		  UART1RxQueueWritePos =(UART1RxQueueWritePos+1) % UARTRXQUEUESIZE;
452
-	  }
453
-	  else
454
-		  dummy = LPC_UART1->RBR;;
455
-	}
431
+    LSRValue = LPC_UART1->LSR;
432
+    /* Receive Line Status */
433
+    if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) )
434
+    {
435
+      /* There are errors or break interrupt */
436
+      /* Read LSR will clear the interrupt */
437
+      UART1Status = LSRValue;
438
+      dummy = LPC_UART1->RBR;		/* Dummy read on RX to clear
439
+                                   interrupt, then bail out */
440
+      return;
441
+    }
442
+    if ( LSRValue & LSR_RDR )	/* Receive Data Ready */
443
+    {
444
+      /* If no error on RLS, normal ready, save into the data buffer. */
445
+      /* Note: read RBR will clear the interrupt */
446
+      if ((UART1RxQueueWritePos+1) % UARTRXQUEUESIZE != UART1RxQueueReadPos)
447
+      {
448
+        UART1Buffer[UART1RxQueueWritePos] = LPC_UART1->RBR;
449
+        UART1RxQueueWritePos =(UART1RxQueueWritePos+1) % UARTRXQUEUESIZE;
450
+      }
451
+      else
452
+        dummy = LPC_UART1->RBR;
453
+    }
456 454
   }
457 455
   else if ( IIRValue == IIR_RDA )	/* Receive Data Available */
458 456
   {
459
-	/* Receive Data Available */
457
+	  /* Receive Data Available */
460 458
 	  if ((UART1RxQueueWritePos+1) % UARTRXQUEUESIZE != UART1RxQueueReadPos)
461 459
 	  {
462 460
 		  UART1Buffer[UART1RxQueueWritePos] = LPC_UART1->RBR;
463 461
 		  UART1RxQueueWritePos = (UART1RxQueueWritePos+1) % UARTRXQUEUESIZE;
464 462
 	  }
465 463
 	  else
466
-		  dummy = LPC_UART1->RBR;;
464
+		  dummy = LPC_UART1->RBR;
467 465
   }
468 466
   else if ( IIRValue == IIR_CTI )	/* Character timeout indicator */
469 467
   {
470
-	/* Character Time-out indicator */
471
-	UART1Status |= 0x100;		/* Bit 9 as the CTI error */
472
-  }
473
-  else if ( IIRValue == IIR_THRE )	/* THRE, transmit holding register empty */
474
-  {
475
-	/* THRE interrupt */
476
-	LSRValue = LPC_UART1->LSR;		/* Check status in the LSR to see if
477
-								valid data in U0THR or not */
478
-	if ( LSRValue & LSR_THRE )
479
-	{
480
-	  UART1TxEmpty = 1;
481
-	}
482
-	else
483
-	{
484
-	  UART1TxEmpty = 0;
485
-	}
468
+    /* Character Time-out indicator */
469
+    UART1Status |= 0x100;		/* Bit 9 as the CTI error */
470
+    }
471
+    else if ( IIRValue == IIR_THRE )	/* THRE, transmit holding register empty */
472
+    {
473
+    /* THRE interrupt */
474
+    LSRValue = LPC_UART1->LSR;		/* Check status in the LSR to see if
475
+                                     valid data in U0THR or not */
476
+    if ( LSRValue & LSR_THRE )
477
+    {
478
+      UART1TxEmpty = 1;
479
+    }
480
+    else
481
+    {
482
+      UART1TxEmpty = 0;
483
+    }
486 484
   }
487
-
488 485
 }
489 486
 /*****************************************************************************
490 487
 ** Function name:		UART2_IRQHandler
@@ -498,7 +495,6 @@ void UART1_IRQHandler (void)
498 495
 void UART2_IRQHandler (void)
499 496
 {
500 497
   uint8_t IIRValue, LSRValue;
501
-  uint8_t Dummy = Dummy;
502 498
 
503 499
   IIRValue = LPC_UART2->IIR;
504 500
 
@@ -506,57 +502,57 @@ void UART2_IRQHandler (void)
506 502
   IIRValue &= 0x07;			/* check bit 1~3, interrupt identification */
507 503
   if ( IIRValue == IIR_RLS )		/* Receive Line Status */
508 504
   {
509
-	LSRValue = LPC_UART2->LSR;
510
-	/* Receive Line Status */
511
-	if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) )
512
-	{
513
-	  /* There are errors or break interrupt */
514
-	  /* Read LSR will clear the interrupt */
515
-	  UART2Status = LSRValue;
516
-	  Dummy = LPC_UART2->RBR;		/* Dummy read on RX to clear
517
-							interrupt, then bail out */
518
-	  return;
519
-	}
520
-	if ( LSRValue & LSR_RDR )	/* Receive Data Ready */
521
-	{
522
-	  /* If no error on RLS, normal ready, save into the data buffer. */
523
-	  /* Note: read RBR will clear the interrupt */
524
-		 if ((UART2RxQueueWritePos+1) % UARTRXQUEUESIZE != UART2RxQueueReadPos)
525
-		  {
526
-			  UART2Buffer[UART2RxQueueWritePos] = LPC_UART2->RBR;
527
-			  UART2RxQueueWritePos = (UART2RxQueueWritePos+1) % UARTRXQUEUESIZE;
528
-		  }
529
-	}
505
+    LSRValue = LPC_UART2->LSR;
506
+    /* Receive Line Status */
507
+    if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) )
508
+    {
509
+      /* There are errors or break interrupt */
510
+      /* Read LSR will clear the interrupt */
511
+      UART2Status = LSRValue;
512
+      dummy = LPC_UART2->RBR;		/* Dummy read on RX to clear
513
+                                   interrupt, then bail out */
514
+      return;
515
+    }
516
+    if ( LSRValue & LSR_RDR )	/* Receive Data Ready */
517
+    {
518
+      /* If no error on RLS, normal ready, save into the data buffer. */
519
+      /* Note: read RBR will clear the interrupt */
520
+      if ((UART2RxQueueWritePos+1) % UARTRXQUEUESIZE != UART2RxQueueReadPos)
521
+      {
522
+        UART2Buffer[UART2RxQueueWritePos] = LPC_UART2->RBR;
523
+        UART2RxQueueWritePos = (UART2RxQueueWritePos+1) % UARTRXQUEUESIZE;
524
+      }
525
+    }
530 526
   }
531 527
   else if ( IIRValue == IIR_RDA )	/* Receive Data Available */
532 528
   {
533
-	/* Receive Data Available */
529
+	  /* Receive Data Available */
534 530
 	  if ((UART2RxQueueWritePos+1) % UARTRXQUEUESIZE != UART2RxQueueReadPos)
535 531
 	  {
536 532
 		  UART2Buffer[UART2RxQueueWritePos] = LPC_UART2->RBR;
537 533
 		  UART2RxQueueWritePos = (UART2RxQueueWritePos+1) % UARTRXQUEUESIZE;
538 534
 	  }
539 535
 	  else
540
-		  dummy = LPC_UART2->RBR;;
536
+		  dummy = LPC_UART2->RBR;
541 537
   }
542 538
   else if ( IIRValue == IIR_CTI )	/* Character timeout indicator */
543 539
   {
544
-	/* Character Time-out indicator */
545
-	UART2Status |= 0x100;		/* Bit 9 as the CTI error */
540
+    /* Character Time-out indicator */
541
+    UART2Status |= 0x100;		/* Bit 9 as the CTI error */
546 542
   }
547 543
   else if ( IIRValue == IIR_THRE )	/* THRE, transmit holding register empty */
548 544
   {
549
-	/* THRE interrupt */
550
-	LSRValue = LPC_UART2->LSR;		/* Check status in the LSR to see if
551
-									valid data in U0THR or not */
552
-	if ( LSRValue & LSR_THRE )
553
-	{
554
-	  UART2TxEmpty = 1;
555
-	}
556
-	else
557
-	{
558
-	  UART2TxEmpty = 0;
559
-	}
545
+    /* THRE interrupt */
546
+    LSRValue = LPC_UART2->LSR;		/* Check status in the LSR to see if
547
+                                     valid data in U0THR or not */
548
+    if ( LSRValue & LSR_THRE )
549
+    {
550
+      UART2TxEmpty = 1;
551
+    }
552
+    else
553
+    {
554
+      UART2TxEmpty = 0;
555
+    }
560 556
   }
561 557
 }
562 558
 /*****************************************************************************
@@ -571,7 +567,6 @@ void UART2_IRQHandler (void)
571 567
 void UART3_IRQHandler (void)
572 568
 {
573 569
   uint8_t IIRValue, LSRValue;
574
-  uint8_t Dummy = Dummy;
575 570
 
576 571
   IIRValue = LPC_UART3->IIR;
577 572
 
@@ -579,57 +574,57 @@ void UART3_IRQHandler (void)
579 574
   IIRValue &= 0x07;			/* check bit 1~3, interrupt identification */
580 575
   if ( IIRValue == IIR_RLS )		/* Receive Line Status */
581 576
   {
582
-	LSRValue = LPC_UART3->LSR;
583
-	/* Receive Line Status */
584
-	if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) )
585
-	{
586
-	  /* There are errors or break interrupt */
587
-	  /* Read LSR will clear the interrupt */
588
-	  UART3Status = LSRValue;
589
-	  Dummy = LPC_UART3->RBR;		/* Dummy read on RX to clear
590
-							interrupt, then bail out */
591
-	  return;
592
-	}
593
-	if ( LSRValue & LSR_RDR )	/* Receive Data Ready */
594
-	{
595
-	  /* If no error on RLS, normal ready, save into the data buffer. */
596
-	  /* Note: read RBR will clear the interrupt */
597
-		 if ((UART3RxQueueWritePos+1) % UARTRXQUEUESIZE != UART3RxQueueReadPos)
598
-		  {
599
-			  UART3Buffer[UART3RxQueueWritePos] = LPC_UART3->RBR;
600
-			  UART3RxQueueWritePos = (UART3RxQueueWritePos+1) % UARTRXQUEUESIZE;
601
-		  }
602
-	}
577
+    LSRValue = LPC_UART3->LSR;
578
+    /* Receive Line Status */
579
+    if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) )
580
+    {
581
+      /* There are errors or break interrupt */
582
+      /* Read LSR will clear the interrupt */
583
+      UART3Status = LSRValue;
584
+      dummy = LPC_UART3->RBR;		/* Dummy read on RX to clear
585
+                                  interrupt, then bail out */
586
+      return;
587
+    }
588
+    if ( LSRValue & LSR_RDR )	/* Receive Data Ready */
589
+    {
590
+      /* If no error on RLS, normal ready, save into the data buffer. */
591
+      /* Note: read RBR will clear the interrupt */
592
+      if ((UART3RxQueueWritePos+1) % UARTRXQUEUESIZE != UART3RxQueueReadPos)
593
+        {
594
+          UART3Buffer[UART3RxQueueWritePos] = LPC_UART3->RBR;
595
+          UART3RxQueueWritePos = (UART3RxQueueWritePos+1) % UARTRXQUEUESIZE;
596
+        }
597
+    }
603 598
   }
604 599
   else if ( IIRValue == IIR_RDA )	/* Receive Data Available */
605 600
   {
606
-	/* Receive Data Available */
601
+	  /* Receive Data Available */
607 602
 	  if ((UART3RxQueueWritePos+1) % UARTRXQUEUESIZE != UART3RxQueueReadPos)
608 603
 	  {
609 604
 		  UART3Buffer[UART3RxQueueWritePos] = LPC_UART3->RBR;
610 605
 		  UART3RxQueueWritePos = (UART3RxQueueWritePos+1) % UARTRXQUEUESIZE;
611 606
 	  }
612 607
 	  else
613
-		  dummy = LPC_UART3->RBR;;
608
+		  dummy = LPC_UART3->RBR;
614 609
   }
615 610
   else if ( IIRValue == IIR_CTI )	/* Character timeout indicator */
616 611
   {
617
-	/* Character Time-out indicator */
618
-	UART3Status |= 0x100;		/* Bit 9 as the CTI error */
612
+    /* Character Time-out indicator */
613
+    UART3Status |= 0x100;		/* Bit 9 as the CTI error */
619 614
   }
620 615
   else if ( IIRValue == IIR_THRE )	/* THRE, transmit holding register empty */
621 616
   {
622
-	/* THRE interrupt */
623
-	LSRValue = LPC_UART3->LSR;		/* Check status in the LSR to see if
624
-									valid data in U0THR or not */
625
-	if ( LSRValue & LSR_THRE )
626
-	{
627
-	  UART3TxEmpty = 1;
628
-	}
629
-	else
630
-	{
631
-	  UART3TxEmpty = 0;
632
-	}
617
+    /* THRE interrupt */
618
+    LSRValue = LPC_UART3->LSR;		/* Check status in the LSR to see if
619
+                                     valid data in U0THR or not */
620
+    if ( LSRValue & LSR_THRE )
621
+    {
622
+      UART3TxEmpty = 1;
623
+    }
624
+    else
625
+    {
626
+      UART3TxEmpty = 0;
627
+    }
633 628
   }
634 629
 }
635 630
 

+ 3
- 1
Marlin/src/HAL/HAL_LPC1768/LPC1768_Servo.cpp 파일 보기

@@ -147,9 +147,11 @@
147 147
   bool Servo::attached() { return servo_info[this->servoIndex].Pin.isActive; }
148 148
 
149 149
   void Servo::move(const int value) {
150
+    constexpr uint16_t servo_delay[] = SERVO_DELAY;
151
+    static_assert(COUNT(servo_delay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long.");
150 152
     if (this->attach(0) >= 0) {    // notice the pin number is zero here
151 153
       this->write(value);
152
-      delay(SERVO_DELAY);
154
+      delay(servo_delay[this->servoIndex]);
153 155
       #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
154 156
         this->detach();
155 157
         LPC1768_PWM_detach_pin(servo_info[this->servoIndex].Pin.nbr);  // shut down the PWM signal

+ 4
- 4
Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.cpp 파일 보기

@@ -292,10 +292,10 @@ void SoftwareSerial::begin(long speed)
292 292
 
293 293
 void SoftwareSerial::setRxIntMsk(bool enable)
294 294
 {
295
-    if (enable)
296
-        GpioEnableInt(_receivePort,_receivePin,CHANGE);
297
-    else
298
-        GpioDisableInt(_receivePort,_receivePin);
295
+  if (enable)
296
+    GpioEnableInt(_receivePort,_receivePin,CHANGE);
297
+  else
298
+    GpioDisableInt(_receivePort,_receivePin);
299 299
 }
300 300
 
301 301
 void SoftwareSerial::end()

+ 3
- 3
Marlin/src/HAL/HAL_LPC1768/SoftwareSerial.h 파일 보기

@@ -71,12 +71,12 @@ private:
71 71
   static SoftwareSerial *active_object;
72 72
 
73 73
   // private methods
74
-  void recv() __attribute__((__always_inline__));
74
+  void recv();
75 75
   uint32_t rx_pin_read();
76
-  void tx_pin_write(uint8_t pin_state) __attribute__((__always_inline__));
76
+  void tx_pin_write(uint8_t pin_state);
77 77
   void setTX(uint8_t transmitPin);
78 78
   void setRX(uint8_t receivePin);
79
-  void setRxIntMsk(bool enable) __attribute__((__always_inline__));
79
+  void setRxIntMsk(bool enable);
80 80
 
81 81
   // private static method for timing
82 82
   static inline void tunedDelay(uint32_t delay);

+ 3
- 3
Marlin/src/HAL/HAL_LPC1768/arduino.cpp 파일 보기

@@ -62,9 +62,9 @@ void delayMicroseconds(uint32_t us) {
62 62
     while (loops > 0) --loops;
63 63
   }
64 64
   else { // poll systick, more accurate through interrupts
65
-    int32_t start = SysTick->VAL;
66
-    int32_t load = SysTick->LOAD;
67
-    int32_t end = start - (load / 1000) * us;
65
+    uint32_t start = SysTick->VAL;
66
+    uint32_t load = SysTick->LOAD;
67
+    uint32_t end = start - (load / 1000) * us;
68 68
 
69 69
     if (end >> 31)
70 70
       while (!(SysTick->VAL > start && SysTick->VAL < (load + end))) __NOP();

+ 4
- 0
Marlin/src/feature/mixing.cpp 파일 보기

@@ -24,6 +24,10 @@
24 24
 
25 25
 #if ENABLED(MIXING_EXTRUDER)
26 26
 
27
+#if ENABLED(DIRECT_MIXING_IN_G1)
28
+  #include "../gcode/parser.h"
29
+#endif
30
+
27 31
 float mixing_factor[MIXING_STEPPERS]; // Reciprocal of mix proportion. 0.0 = off, otherwise >= 1.0.
28 32
 
29 33
 #if MIXING_VIRTUAL_TOOLS > 1

+ 15
- 13
Marlin/src/feature/pause.cpp 파일 보기

@@ -52,21 +52,23 @@ static float resume_position[XYZE];
52 52
   static bool sd_print_paused = false;
53 53
 #endif
54 54
 
55
-static void filament_change_beep(const int8_t max_beep_count, const bool init=false) {
56
-  static millis_t next_buzz = 0;
57
-  static int8_t runout_beep = 0;
58
-
59
-  if (init) next_buzz = runout_beep = 0;
60
-
61
-  const millis_t ms = millis();
62
-  if (ELAPSED(ms, next_buzz)) {
63
-    if (max_beep_count < 0 || runout_beep < max_beep_count + 5) { // Only beep as long as we're supposed to
64
-      next_buzz = ms + ((max_beep_count < 0 || runout_beep < max_beep_count) ? 2500 : 400);
65
-      BUZZ(300, 2000);
66
-      runout_beep++;
55
+#if HAS_BUZZER
56
+  static void filament_change_beep(const int8_t max_beep_count, const bool init=false) {
57
+    static millis_t next_buzz = 0;
58
+    static int8_t runout_beep = 0;
59
+
60
+    if (init) next_buzz = runout_beep = 0;
61
+
62
+    const millis_t ms = millis();
63
+    if (ELAPSED(ms, next_buzz)) {
64
+      if (max_beep_count < 0 || runout_beep < max_beep_count + 5) { // Only beep as long as we're supposed to
65
+        next_buzz = ms + ((max_beep_count < 0 || runout_beep < max_beep_count) ? 2500 : 400);
66
+        BUZZ(300, 2000);
67
+        runout_beep++;
68
+      }
67 69
     }
68 70
   }
69
-}
71
+#endif
70 72
 
71 73
 static void ensure_safe_temperature() {
72 74
   bool heaters_heating = true;

+ 12
- 12
Marlin/src/gcode/calibrate/M100.cpp 파일 보기

@@ -79,8 +79,8 @@ char* top_of_stack() {
79 79
 }
80 80
 
81 81
 // Count the number of test bytes at the specified location.
82
-inline int16_t count_test_bytes(const char * const ptr) {
83
-  for (uint16_t i = 0; i < 32000; i++)
82
+inline int32_t count_test_bytes(const char * const ptr) {
83
+  for (uint32_t i = 0; i < 32000; i++)
84 84
     if (((char) ptr[i]) != TEST_BYTE)
85 85
       return i - 1;
86 86
 
@@ -180,7 +180,7 @@ inline int check_for_free_memory_corruption(const char * const title) {
180 180
   int block_cnt = 0;
181 181
   for (int i = 0; i < n; i++) {
182 182
     if (ptr[i] == TEST_BYTE) {
183
-      int16_t j = count_test_bytes(ptr + i);
183
+      int32_t j = count_test_bytes(ptr + i);
184 184
       if (j > 8) {
185 185
         // SERIAL_ECHOPAIR("Found ", j);
186 186
         // SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(ptr + i));
@@ -215,14 +215,14 @@ inline int check_for_free_memory_corruption(const char * const title) {
215 215
  *  Return the number of free bytes in the memory pool,
216 216
  *  with other vital statistics defining the pool.
217 217
  */
218
-inline void free_memory_pool_report(char * const ptr, const int16_t size) {
219
-  int16_t max_cnt = -1, block_cnt = 0;
218
+inline void free_memory_pool_report(char * const ptr, const int32_t size) {
219
+  int32_t max_cnt = -1, block_cnt = 0;
220 220
   char *max_addr = NULL;
221 221
   // Find the longest block of test bytes in the buffer
222
-  for (int16_t i = 0; i < size; i++) {
222
+  for (int32_t i = 0; i < size; i++) {
223 223
     char *addr = ptr + i;
224 224
     if (*addr == TEST_BYTE) {
225
-      const int16_t j = count_test_bytes(addr);
225
+      const int32_t j = count_test_bytes(addr);
226 226
       if (j > 8) {
227 227
         SERIAL_ECHOPAIR("Found ", j);
228 228
         SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(addr));
@@ -249,13 +249,13 @@ inline void free_memory_pool_report(char * const ptr, const int16_t size) {
249 249
    *  Corrupt <num> locations in the free memory pool and report the corrupt addresses.
250 250
    *  This is useful to check the correctness of the M100 D and the M100 F commands.
251 251
    */
252
-  inline void corrupt_free_memory(char *ptr, const uint16_t size) {
252
+  inline void corrupt_free_memory(char *ptr, const uint32_t size) {
253 253
     ptr += 8;
254
-    const uint16_t near_top = top_of_stack() - ptr - 250, // -250 to avoid interrupt activity that's altered the stack.
254
+    const uint32_t near_top = top_of_stack() - ptr - 250, // -250 to avoid interrupt activity that's altered the stack.
255 255
                    j = near_top / (size + 1);
256 256
 
257 257
     SERIAL_ECHOLNPGM("Corrupting free memory block.\n");
258
-    for (uint16_t i = 1; i <= size; i++) {
258
+    for (uint32_t i = 1; i <= size; i++) {
259 259
       char * const addr = ptr + i * j;
260 260
       *addr = i;
261 261
       SERIAL_ECHOPAIR("\nCorrupting address: ", hex_address(addr));
@@ -268,7 +268,7 @@ inline void free_memory_pool_report(char * const ptr, const int16_t size) {
268 268
  * M100 I
269 269
  *  Init memory for the M100 tests. (Automatically applied on the first M100.)
270 270
  */
271
-inline void init_free_memory(char *ptr, int16_t size) {
271
+inline void init_free_memory(char *ptr, int32_t size) {
272 272
   SERIAL_ECHOLNPGM("Initializing free memory block.\n\n");
273 273
 
274 274
   size -= 250;    // -250 to avoid interrupt activity that's altered the stack.
@@ -284,7 +284,7 @@ inline void init_free_memory(char *ptr, int16_t size) {
284 284
   SERIAL_ECHO(size);
285 285
   SERIAL_ECHOLNPGM(" bytes of memory initialized.\n");
286 286
 
287
-  for (int16_t i = 0; i < size; i++) {
287
+  for (int32_t i = 0; i < size; i++) {
288 288
     if (ptr[i] != TEST_BYTE) {
289 289
       SERIAL_ECHOPAIR("? address : ", hex_address(ptr + i));
290 290
       SERIAL_ECHOLNPAIR("=", hex_byte(ptr[i]));

+ 3
- 3
Marlin/src/gcode/config/M43.cpp 파일 보기

@@ -141,15 +141,16 @@ inline void servo_probe_test() {
141 141
 
142 142
     SERIAL_PROTOCOLLNPGM(". deploy & stow 4 times");
143 143
     SET_INPUT_PULLUP(PROBE_TEST_PIN);
144
+    uint8_t i = 0;
144 145
     bool deploy_state, stow_state;
145
-    for (uint8_t i = 0; i < 4; i++) {
146
+    do {
146 147
       MOVE_SERVO(probe_index, z_servo_angle[0]); //deploy
147 148
       safe_delay(500);
148 149
       deploy_state = READ(PROBE_TEST_PIN);
149 150
       MOVE_SERVO(probe_index, z_servo_angle[1]); //stow
150 151
       safe_delay(500);
151 152
       stow_state = READ(PROBE_TEST_PIN);
152
-    }
153
+    } while (++i < 4);
153 154
     if (probe_inverting != deploy_state) SERIAL_PROTOCOLLNPGM("WARNING - INVERTING setting probably backwards");
154 155
 
155 156
     gcode.refresh_cmd_timeout();
@@ -167,7 +168,6 @@ inline void servo_probe_test() {
167 168
       #if ENABLED(BLTOUCH)
168 169
         SERIAL_PROTOCOLLNPGM("ERROR: BLTOUCH enabled - set this device up as a Z Servo Probe with inverting as true.");
169 170
       #endif
170
-
171 171
     }
172 172
     else {                                           // measure active signal length
173 173
       MOVE_SERVO(probe_index, z_servo_angle[0]);     // deploy

+ 1
- 0
Marlin/src/gcode/feature/pause/M125.cpp 파일 보기

@@ -27,6 +27,7 @@
27 27
 #include "../../gcode.h"
28 28
 #include "../../parser.h"
29 29
 #include "../../../feature/pause.h"
30
+#include "../../../module/motion.h"
30 31
 
31 32
 /**
32 33
  * M125: Store current position and move to filament change position.

+ 4
- 0
Marlin/src/gcode/gcode.cpp 파일 보기

@@ -36,6 +36,10 @@ GcodeSuite gcode;
36 36
   #include "../module/printcounter.h"
37 37
 #endif
38 38
 
39
+#if ENABLED(DIRECT_MIXING_IN_G1)
40
+  #include "../feature/mixing.h"
41
+#endif
42
+
39 43
 #include "../Marlin.h" // for idle()
40 44
 
41 45
 uint8_t GcodeSuite::target_extruder;

+ 1
- 1
Marlin/src/gcode/parser.cpp 파일 보기

@@ -29,7 +29,7 @@
29 29
 #include "../Marlin.h"
30 30
 
31 31
 #if ENABLED(DEBUG_GCODE_PARSER)
32
-  #include "../../libs/hex_print_routines.h"
32
+  #include "../libs/hex_print_routines.h"
33 33
 #endif
34 34
 
35 35
 // Must be declared for allocation and to satisfy the linker

+ 0
- 1
Marlin/src/lcd/ultralcd.cpp 파일 보기

@@ -2693,7 +2693,6 @@ void kill_screen(const char* lcd_msg) {
2693 2693
     void lcd_delta_settings() {
2694 2694
       START_MENU();
2695 2695
       MENU_BACK(MSG_DELTA_CALIBRATE);
2696
-      float Tz = 0.00;
2697 2696
       MENU_ITEM_EDIT(float52, MSG_DELTA_DIAG_ROG, &delta_diagonal_rod, DELTA_DIAGONAL_ROD - 5.0, DELTA_DIAGONAL_ROD + 5.0);
2698 2697
       _delta_height = DELTA_HEIGHT + home_offset[Z_AXIS];
2699 2698
       MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float52, MSG_DELTA_HEIGHT, &_delta_height, _delta_height - 10.0, _delta_height + 10.0, _lcd_set_delta_height);

+ 18
- 13
Marlin/src/libs/hex_print_routines.cpp 파일 보기

@@ -21,41 +21,46 @@
21 21
  */
22 22
 
23 23
 #include "../inc/MarlinConfig.h"
24
+#include "../gcode/parser.h"
24 25
 
25 26
 #if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(M100_FREE_MEMORY_WATCHER) || ENABLED(DEBUG_GCODE_PARSER)
26 27
 
27 28
   #include "hex_print_routines.h"
28 29
 
29 30
   #ifdef CPU_32_BIT
30
-    constexpr int byte_start = 0;
31
-    static char _hex[] = "0x0000";
32
-  #else
33 31
     constexpr int byte_start = 4;
34 32
     static char _hex[] = "0x00000000";
33
+  #else
34
+    constexpr int byte_start = 0;
35
+    static char _hex[] = "0x0000";
35 36
   #endif
36 37
 
37 38
   char* hex_byte(const uint8_t b) {
38 39
     _hex[byte_start + 4] = hex_nybble(b >> 4);
39 40
     _hex[byte_start + 5] = hex_nybble(b);
40
-    return &_hex[byte_start];
41
+    return &_hex[byte_start + 4];
41 42
   }
42 43
 
43
-  char* hex_word(const uint16_t w) {
44
+  inline void _hex_word(const uint16_t w) {
44 45
     _hex[byte_start + 2] = hex_nybble(w >> 12);
45 46
     _hex[byte_start + 3] = hex_nybble(w >> 8);
46 47
     _hex[byte_start + 4] = hex_nybble(w >> 4);
47 48
     _hex[byte_start + 5] = hex_nybble(w);
48
-    return &_hex[byte_start - 2];
49
+  }
50
+
51
+  char* hex_word(const uint16_t w) {
52
+    _hex_word(w);
53
+    return &_hex[byte_start + 2];
49 54
   }
50 55
 
51 56
   #ifdef CPU_32_BIT
52
-    char* hex_long(const uint32_t w) {
53
-      _hex[byte_start - 2] = hex_nybble(w >> 28);
54
-      _hex[byte_start - 1] = hex_nybble(w >> 24);
55
-      _hex[byte_start + 0] = hex_nybble(w >> 20);
56
-      _hex[byte_start + 1] = hex_nybble(w >> 16);
57
-      (void)hex_word((uint16_t)(w & 0xFFFF));
58
-      return &_hex[byte_start - 6];
57
+    char* hex_long(const uint32_t l) {
58
+      _hex[2] = hex_nybble(l >> 28);
59
+      _hex[3] = hex_nybble(l >> 24);
60
+      _hex[4] = hex_nybble(l >> 20);
61
+      _hex[5] = hex_nybble(l >> 16);
62
+      _hex_word((uint16_t)(l & 0xFFFF));
63
+      return &_hex[2];
59 64
     }
60 65
   #endif
61 66
 

+ 4
- 0
Marlin/src/libs/nozzle.cpp 파일 보기

@@ -26,6 +26,10 @@
26 26
 #include "../module/motion.h"
27 27
 #include "point_t.h"
28 28
 
29
+#if ENABLED(DELTA)
30
+  #include "../module/delta.h"
31
+#endif
32
+
29 33
 /**
30 34
   * @brief Stroke clean pattern
31 35
   * @details Wipes the nozzle back and forth in a linear movement

+ 4
- 4
Marlin/src/module/stepper.cpp 파일 보기

@@ -135,9 +135,9 @@ volatile uint32_t Stepper::step_events_completed = 0; // The number of step even
135 135
    * This fix isn't perfect and may lose steps - but better than locking up completely
136 136
    * in future the planner should slow down if advance stepping rate would be too high
137 137
    */
138
-  FORCE_INLINE uint16_t adv_rate(const int steps, const uint16_t timer, const uint8_t loops) {
138
+  FORCE_INLINE HAL_TIMER_TYPE adv_rate(const int steps, const HAL_TIMER_TYPE timer, const uint8_t loops) {
139 139
     if (steps) {
140
-      const uint16_t rate = (timer * loops) / abs(steps);
140
+      const HAL_TIMER_TYPE rate = (timer * loops) / abs(steps);
141 141
       //return constrain(rate, 1, ADV_NEVER - 1)
142 142
       return rate ? rate : 1;
143 143
     }
@@ -815,8 +815,8 @@ void Stepper::isr() {
815 815
   #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE)
816 816
     #ifdef CPU_32_BIT
817 817
       // Make sure stepper interrupt does not monopolise CPU by adjusting count to give about 8 us room
818
-      uint32_t stepper_timer_count = HAL_timer_get_count(STEP_TIMER_NUM),
819
-               stepper_timer_current_count = HAL_timer_get_current_count(STEP_TIMER_NUM) + 8 * HAL_TICKS_PER_US;
818
+      HAL_TIMER_TYPE stepper_timer_count = HAL_timer_get_count(STEP_TIMER_NUM),
819
+                     stepper_timer_current_count = HAL_timer_get_current_count(STEP_TIMER_NUM) + 8 * HAL_TICKS_PER_US;
820 820
       HAL_timer_set_count(STEP_TIMER_NUM, max(stepper_timer_count, stepper_timer_current_count));
821 821
     #else
822 822
       NOLESS(OCR1A, TCNT1 + 16);

+ 3
- 3
Marlin/src/module/temperature.cpp 파일 보기

@@ -1744,8 +1744,8 @@ void Temperature::isr() {
1744 1744
 
1745 1745
     // Macros for Slow PWM timer logic
1746 1746
     #define _SLOW_PWM_ROUTINE(NR, src) \
1747
-      soft_pwm_ ##NR = src; \
1748
-      if (soft_pwm_ ##NR > 0) { \
1747
+      soft_pwm_count_ ##NR = src; \
1748
+      if (soft_pwm_count_ ##NR > 0) { \
1749 1749
         if (state_timer_heater_ ##NR == 0) { \
1750 1750
           if (state_heater_ ##NR == 0) state_timer_heater_ ##NR = MIN_STATE_TIME; \
1751 1751
           state_heater_ ##NR = 1; \
@@ -1762,7 +1762,7 @@ void Temperature::isr() {
1762 1762
     #define SLOW_PWM_ROUTINE(n) _SLOW_PWM_ROUTINE(n, soft_pwm_amount[n])
1763 1763
 
1764 1764
     #define PWM_OFF_ROUTINE(NR) \
1765
-      if (soft_pwm_ ##NR < slow_pwm_count) { \
1765
+      if (soft_pwm_count_ ##NR < slow_pwm_count) { \
1766 1766
         if (state_timer_heater_ ##NR == 0) { \
1767 1767
           if (state_heater_ ##NR == 1) state_timer_heater_ ##NR = MIN_STATE_TIME; \
1768 1768
           state_heater_ ##NR = 0; \

+ 1
- 3
Marlin/src/module/tool_change.cpp 파일 보기

@@ -286,8 +286,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
286 286
         #else // !DUAL_X_CARRIAGE
287 287
 
288 288
           #if ENABLED(PARKING_EXTRUDER) // Dual Parking extruder
289
-            const float z_diff = hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
290
-            float z_raise = 0;
289
+            float z_raise = PARKING_EXTRUDER_SECURITY_RAISE;
291 290
             if (!no_move) {
292 291
 
293 292
               const float parkingposx[] = PARKING_EXTRUDER_PARKING_X,
@@ -310,7 +309,6 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
310 309
                 SERIAL_ECHOLNPGM("Starting Autopark");
311 310
                 if (DEBUGGING(LEVELING)) DEBUG_POS("current position:", current_position);
312 311
               #endif
313
-              z_raise = PARKING_EXTRUDER_SECURITY_RAISE;
314 312
               current_position[Z_AXIS] += z_raise;
315 313
               #if ENABLED(DEBUG_LEVELING_FEATURE)
316 314
                 SERIAL_ECHOLNPGM("(1) Raise Z-Axis ");

+ 1
- 1
Marlin/src/sd/SdBaseFile.cpp 파일 보기

@@ -1388,7 +1388,7 @@ bool SdBaseFile::rmdir() {
1388 1388
  * the value zero, false, is returned for failure.
1389 1389
  */
1390 1390
 bool SdBaseFile::rmRfStar() {
1391
-  uint16_t index;
1391
+  uint32_t index;
1392 1392
   SdBaseFile f;
1393 1393
   rewind();
1394 1394
   while (curPosition_ < fileSize_) {

+ 1
- 1
frameworks/CMSIS/LPC1768/driver/lpc17xx_nvic.c 파일 보기

@@ -115,7 +115,7 @@ void NVIC_SCBDeInit(void)
115 115
 	SCB->SCR = 0x00000000;
116 116
 	SCB->CCR = 0x00000000;
117 117
 
118
-	for (tmp = 0; tmp < 32; tmp++) {
118
+	for (tmp = 0; tmp < (sizeof(SCB->SHP) / sizeof(SCB->SHP[0])); tmp++) {
119 119
 		SCB->SHP[tmp] = 0x00;
120 120
 	}
121 121
 

Loading…
취소
저장