ソースを参照

Clean up section comments

Scott Lahteine 4年前
コミット
056efaba91
51個のファイルの変更305行の追加849行の削除
  1. 4
    36
      Marlin/src/HAL/HAL_AVR/HAL.cpp
  2. 8
    12
      Marlin/src/HAL/HAL_AVR/HAL.h
  3. 0
    4
      Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp
  4. 3
    3
      Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h
  5. 6
    38
      Marlin/src/HAL/HAL_DUE/HAL.cpp
  6. 7
    16
      Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp
  7. 8
    29
      Marlin/src/HAL/HAL_DUE/HAL_timers_Due.cpp
  8. 8
    12
      Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h
  9. 12
    32
      Marlin/src/HAL/HAL_ESP32/HAL.cpp
  10. 8
    12
      Marlin/src/HAL/HAL_ESP32/HAL.h
  11. 8
    12
      Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp
  12. 6
    31
      Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp
  13. 8
    12
      Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.h
  14. 2
    2
      Marlin/src/HAL/HAL_LINUX/HAL.cpp
  15. 0
    4
      Marlin/src/HAL/HAL_LINUX/HAL.h
  16. 2
    6
      Marlin/src/HAL/HAL_LINUX/HAL_timers.h
  17. 2
    6
      Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp
  18. 4
    8
      Marlin/src/HAL/HAL_LPC1768/HAL_timers.h
  19. 6
    35
      Marlin/src/HAL/HAL_STM32/HAL.cpp
  20. 8
    12
      Marlin/src/HAL/HAL_STM32/HAL.h
  21. 8
    12
      Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp
  22. 6
    29
      Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.cpp
  23. 8
    12
      Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.h
  24. 6
    6
      Marlin/src/HAL/HAL_STM32/fastio_STM32.h
  25. 18
    28
      Marlin/src/HAL/HAL_STM32F1/HAL.cpp
  26. 8
    12
      Marlin/src/HAL/HAL_STM32F1/HAL.h
  27. 2
    2
      Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.cpp
  28. 6
    10
      Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.h
  29. 6
    15
      Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp
  30. 4
    32
      Marlin/src/HAL/HAL_STM32F1/HAL_timers_STM32F1.cpp
  31. 9
    18
      Marlin/src/HAL/HAL_STM32F1/HAL_timers_STM32F1.h
  32. 2
    2
      Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.h
  33. 12
    40
      Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp
  34. 6
    38
      Marlin/src/HAL/HAL_STM32F4/HAL.cpp
  35. 8
    12
      Marlin/src/HAL/HAL_STM32F4/HAL.h
  36. 8
    12
      Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp
  37. 6
    30
      Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp
  38. 8
    12
      Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h
  39. 2
    2
      Marlin/src/HAL/HAL_STM32F7/EEPROM_Emul/eeprom_emul.h
  40. 12
    40
      Marlin/src/HAL/HAL_STM32F7/EmulatedEeprom.cpp
  41. 6
    38
      Marlin/src/HAL/HAL_STM32F7/HAL.cpp
  42. 8
    12
      Marlin/src/HAL/HAL_STM32F7/HAL.h
  43. 8
    12
      Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp
  44. 6
    31
      Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.cpp
  45. 8
    12
      Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.h
  46. 2
    6
      Marlin/src/HAL/HAL_TEENSY31_32/HAL_timers_Teensy.h
  47. 2
    6
      Marlin/src/HAL/HAL_TEENSY35_36/HAL.h
  48. 2
    6
      Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h
  49. 5
    37
      Marlin/src/HAL/shared/I2cEeprom.cpp
  50. 2
    2
      buildroot/share/PlatformIO/variants/BIGTREE_GENERIC_STM32F407_5X/variant.cpp
  51. 1
    1
      buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.cpp

+ 4
- 36
Marlin/src/HAL/HAL_AVR/HAL.cpp ファイルの表示

@@ -22,50 +22,18 @@
22 22
 
23 23
 #ifdef __AVR__
24 24
 
25
-// --------------------------------------------------------------------------
26
-// Includes
27
-// --------------------------------------------------------------------------
28
-
29 25
 #include "../../inc/MarlinConfig.h"
30 26
 #include "HAL.h"
31 27
 
32
-// --------------------------------------------------------------------------
33
-// Externals
34
-// --------------------------------------------------------------------------
35
-
36
-// --------------------------------------------------------------------------
37
-// Local defines
38
-// --------------------------------------------------------------------------
39
-
40
-// --------------------------------------------------------------------------
41
-// Types
42
-// --------------------------------------------------------------------------
43
-
44
-// --------------------------------------------------------------------------
45
-// Variables
46
-// --------------------------------------------------------------------------
47
-
48
-// --------------------------------------------------------------------------
28
+// ------------------------
49 29
 // Public Variables
50
-// --------------------------------------------------------------------------
30
+// ------------------------
51 31
 
52 32
 //uint8_t MCUSR;
53 33
 
54
-// --------------------------------------------------------------------------
55
-// Private Variables
56
-// --------------------------------------------------------------------------
57
-
58
-// --------------------------------------------------------------------------
59
-// Function prototypes
60
-// --------------------------------------------------------------------------
61
-
62
-// --------------------------------------------------------------------------
63
-// Private functions
64
-// --------------------------------------------------------------------------
65
-
66
-// --------------------------------------------------------------------------
34
+// ------------------------
67 35
 // Public functions
68
-// --------------------------------------------------------------------------
36
+// ------------------------
69 37
 
70 38
 void HAL_init(void) {
71 39
   // Init Servo Pins

+ 8
- 12
Marlin/src/HAL/HAL_AVR/HAL.h ファイルの表示

@@ -18,10 +18,6 @@
18 18
  */
19 19
 #pragma once
20 20
 
21
-// --------------------------------------------------------------------------
22
-// Includes
23
-// --------------------------------------------------------------------------
24
-
25 21
 #include "../shared/Marduino.h"
26 22
 #include "../shared/HAL_SPI.h"
27 23
 #include "fastio_AVR.h"
@@ -42,9 +38,9 @@
42 38
 #include <avr/interrupt.h>
43 39
 #include <avr/io.h>
44 40
 
45
-// --------------------------------------------------------------------------
41
+// ------------------------
46 42
 // Defines
47
-// --------------------------------------------------------------------------
43
+// ------------------------
48 44
 
49 45
 //#define analogInputToDigitalPin(IO) IO
50 46
 
@@ -59,9 +55,9 @@
59 55
 // On AVR this is in math.h?
60 56
 //#define square(x) ((x)*(x))
61 57
 
62
-// --------------------------------------------------------------------------
58
+// ------------------------
63 59
 // Types
64
-// --------------------------------------------------------------------------
60
+// ------------------------
65 61
 
66 62
 typedef uint16_t hal_timer_t;
67 63
 #define HAL_TIMER_TYPE_MAX 0xFFFF
@@ -71,9 +67,9 @@ typedef int8_t pin_t;
71 67
 #define SHARED_SERVOS HAS_SERVOS
72 68
 #define HAL_SERVO_LIB Servo
73 69
 
74
-// --------------------------------------------------------------------------
70
+// ------------------------
75 71
 // Public Variables
76
-// --------------------------------------------------------------------------
72
+// ------------------------
77 73
 
78 74
 //extern uint8_t MCUSR;
79 75
 
@@ -105,9 +101,9 @@ typedef int8_t pin_t;
105 101
   #endif
106 102
 #endif
107 103
 
108
-// --------------------------------------------------------------------------
104
+// ------------------------
109 105
 // Public functions
110
-// --------------------------------------------------------------------------
106
+// ------------------------
111 107
 
112 108
 void HAL_init(void);
113 109
 

+ 0
- 4
Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp ファイルの表示

@@ -31,10 +31,6 @@
31 31
 
32 32
 #ifdef __AVR__
33 33
 
34
-// --------------------------------------------------------------------------
35
-// Includes
36
-// --------------------------------------------------------------------------
37
-
38 34
 #include "../../inc/MarlinConfig.h"
39 35
 
40 36
 void spiBegin(void) {

+ 3
- 3
Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h ファイルの表示

@@ -47,7 +47,7 @@
47 47
 
48 48
 const uint8_t PROGMEM digital_pin_to_port_PGM_plus_70[] = {
49 49
   // PORTLIST
50
-  // -------------------------------------------
50
+  // ------------------------
51 51
   PE  , // PE 0 ** 0 ** USART0_RX
52 52
   PE  , // PE 1 ** 1 ** USART0_TX
53 53
   PE  , // PE 4 ** 2 ** PWM2
@@ -140,7 +140,7 @@ const uint8_t PROGMEM digital_pin_to_port_PGM_plus_70[] = {
140 140
 
141 141
 const uint8_t PROGMEM digital_pin_to_bit_mask_PGM_plus_70[] = {
142 142
   // PIN IN PORT
143
-  // -------------------------------------------
143
+  // ------------------------
144 144
   _BV( 0 )  , // PE 0 ** 0 ** USART0_RX
145 145
   _BV( 1 )  , // PE 1 ** 1 ** USART0_TX
146 146
   _BV( 4 )  , // PE 4 ** 2 ** PWM2
@@ -234,7 +234,7 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM_plus_70[] = {
234 234
 
235 235
 const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = {
236 236
   // TIMERS
237
-  // -------------------------------------------
237
+  // ------------------------
238 238
   NOT_ON_TIMER  , // PE 0 ** 0 ** USART0_RX
239 239
   NOT_ON_TIMER  , // PE 1 ** 1 ** USART0_TX
240 240
   TIMER3B , // PE 4 ** 2 ** PWM2

+ 6
- 38
Marlin/src/HAL/HAL_DUE/HAL.cpp ファイルの表示

@@ -25,53 +25,21 @@
25 25
 
26 26
 #ifdef ARDUINO_ARCH_SAM
27 27
 
28
-// --------------------------------------------------------------------------
29
-// Includes
30
-// --------------------------------------------------------------------------
31
-
32 28
 #include "../../inc/MarlinConfig.h"
33 29
 #include "HAL.h"
34 30
 
35 31
 #include <Wire.h>
36 32
 #include "usb/usb_task.h"
37 33
 
38
-// --------------------------------------------------------------------------
39
-// Externals
40
-// --------------------------------------------------------------------------
41
-
42
-// --------------------------------------------------------------------------
43
-// Local defines
44
-// --------------------------------------------------------------------------
45
-
46
-// --------------------------------------------------------------------------
47
-// Types
48
-// --------------------------------------------------------------------------
49
-
50
-// --------------------------------------------------------------------------
51
-// Variables
52
-// --------------------------------------------------------------------------
53
-
54
-// --------------------------------------------------------------------------
34
+// ------------------------
55 35
 // Public Variables
56
-// --------------------------------------------------------------------------
36
+// ------------------------
57 37
 
58 38
 uint16_t HAL_adc_result;
59 39
 
60
-// --------------------------------------------------------------------------
61
-// Private Variables
62
-// --------------------------------------------------------------------------
63
-
64
-// --------------------------------------------------------------------------
65
-// Function prototypes
66
-// --------------------------------------------------------------------------
67
-
68
-// --------------------------------------------------------------------------
69
-// Private functions
70
-// --------------------------------------------------------------------------
71
-
72
-// --------------------------------------------------------------------------
40
+// ------------------------
73 41
 // Public functions
74
-// --------------------------------------------------------------------------
42
+// ------------------------
75 43
 
76 44
 // HAL initialization task
77 45
 void HAL_init(void) {
@@ -122,9 +90,9 @@ int freeMemory() {
122 90
   return (int)&free_memory - (heap_end ? heap_end : (int)&_ebss);
123 91
 }
124 92
 
125
-// --------------------------------------------------------------------------
93
+// ------------------------
126 94
 // ADC
127
-// --------------------------------------------------------------------------
95
+// ------------------------
128 96
 
129 97
 void HAL_adc_start_conversion(const uint8_t adc_pin) {
130 98
   HAL_adc_result = analogRead(adc_pin);

+ 7
- 16
Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp ファイルの表示

@@ -37,27 +37,18 @@
37 37
 
38 38
 #ifdef ARDUINO_ARCH_SAM
39 39
 
40
-// --------------------------------------------------------------------------
41
-// Includes
42
-// --------------------------------------------------------------------------
43
-
44 40
 #include "../../inc/MarlinConfig.h"
45 41
 #include "../shared/Delay.h"
46 42
 
47
-// --------------------------------------------------------------------------
48
-// Public Variables
49
-// --------------------------------------------------------------------------
50
-
51
-
52
-// --------------------------------------------------------------------------
43
+// ------------------------
53 44
 // Public functions
54
-// --------------------------------------------------------------------------
45
+// ------------------------
55 46
 
56 47
 #if EITHER(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI)
57 48
 
58
-  // --------------------------------------------------------------------------
59
-  // software SPI
60
-  // --------------------------------------------------------------------------
49
+  // ------------------------
50
+  // Software SPI
51
+  // ------------------------
61 52
 
62 53
   // Make sure GCC optimizes this file.
63 54
   // Note that this line triggers a bug in GCC which is fixed by casting.
@@ -551,9 +542,9 @@
551 542
     // slave selects controlled by SPI controller
552 543
     // doesn't support changing SPI speeds for SD card
553 544
 
554
-    // --------------------------------------------------------------------------
545
+    // ------------------------
555 546
     // hardware SPI
556
-    // --------------------------------------------------------------------------
547
+    // ------------------------
557 548
     static bool spiInitialized = false;
558 549
 
559 550
     void spiInit(uint8_t spiRate) {

+ 8
- 29
Marlin/src/HAL/HAL_DUE/HAL_timers_Due.cpp ファイルの表示

@@ -28,36 +28,23 @@
28 28
 
29 29
 #ifdef ARDUINO_ARCH_SAM
30 30
 
31
-// --------------------------------------------------------------------------
31
+// ------------------------
32 32
 // Includes
33
-// --------------------------------------------------------------------------
33
+// ------------------------
34 34
 #include "../../inc/MarlinConfig.h"
35 35
 #include "HAL.h"
36 36
 
37 37
 #include "HAL_timers_Due.h"
38 38
 
39
-// --------------------------------------------------------------------------
40
-// Externals
41
-// --------------------------------------------------------------------------
42
-
43
-// --------------------------------------------------------------------------
39
+// ------------------------
44 40
 // Local defines
45
-// --------------------------------------------------------------------------
41
+// ------------------------
46 42
 
47 43
 #define NUM_HARDWARE_TIMERS 9
48 44
 
49
-// --------------------------------------------------------------------------
50
-// Types
51
-// --------------------------------------------------------------------------
52
-
53
-
54
-// --------------------------------------------------------------------------
55
-// Public Variables
56
-// --------------------------------------------------------------------------
57
-
58
-// --------------------------------------------------------------------------
45
+// ------------------------
59 46
 // Private Variables
60
-// --------------------------------------------------------------------------
47
+// ------------------------
61 48
 
62 49
 const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
63 50
   { TC0, 0, TC0_IRQn,  3}, // 0 - [servo timer5]
@@ -71,17 +58,9 @@ const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
71 58
   { TC2, 2, TC8_IRQn,  0}, // 8
72 59
 };
73 60
 
74
-// --------------------------------------------------------------------------
75
-// Function prototypes
76
-// --------------------------------------------------------------------------
77
-
78
-// --------------------------------------------------------------------------
79
-// Private functions
80
-// --------------------------------------------------------------------------
81
-
82
-// --------------------------------------------------------------------------
61
+// ------------------------
83 62
 // Public functions
84
-// --------------------------------------------------------------------------
63
+// ------------------------
85 64
 
86 65
 /*
87 66
   Timer_clock1: Prescaler 2 -> 42MHz

+ 8
- 12
Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h ファイルの表示

@@ -26,15 +26,11 @@
26 26
  * For ARDUINO_ARCH_SAM
27 27
  */
28 28
 
29
-// --------------------------------------------------------------------------
30
-// Includes
31
-// --------------------------------------------------------------------------
32
-
33 29
 #include <stdint.h>
34 30
 
35
-// --------------------------------------------------------------------------
31
+// ------------------------
36 32
 // Defines
37
-// --------------------------------------------------------------------------
33
+// ------------------------
38 34
 
39 35
 #define FORCE_INLINE __attribute__((always_inline)) inline
40 36
 
@@ -69,9 +65,9 @@ typedef uint32_t hal_timer_t;
69 65
 #define HAL_TEMP_TIMER_ISR()  void TC4_Handler()
70 66
 #define HAL_TONE_TIMER_ISR()  void TC6_Handler()
71 67
 
72
-// --------------------------------------------------------------------------
68
+// ------------------------
73 69
 // Types
74
-// --------------------------------------------------------------------------
70
+// ------------------------
75 71
 
76 72
 typedef struct {
77 73
   Tc          *pTimerRegs;
@@ -80,15 +76,15 @@ typedef struct {
80 76
   uint8_t     priority;
81 77
 } tTimerConfig;
82 78
 
83
-// --------------------------------------------------------------------------
79
+// ------------------------
84 80
 // Public Variables
85
-// --------------------------------------------------------------------------
81
+// ------------------------
86 82
 
87 83
 extern const tTimerConfig TimerConfig[];
88 84
 
89
-// --------------------------------------------------------------------------
85
+// ------------------------
90 86
 // Public functions
91
-// --------------------------------------------------------------------------
87
+// ------------------------
92 88
 
93 89
 void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
94 90
 

+ 12
- 32
Marlin/src/HAL/HAL_ESP32/HAL.cpp ファイルの表示

@@ -22,10 +22,6 @@
22 22
 
23 23
 #ifdef ARDUINO_ARCH_ESP32
24 24
 
25
-// --------------------------------------------------------------------------
26
-// Includes
27
-// --------------------------------------------------------------------------
28
-
29 25
 #include "HAL.h"
30 26
 #include <rom/rtc.h>
31 27
 #include <driver/adc.h>
@@ -48,49 +44,33 @@
48 44
   #endif
49 45
 #endif
50 46
 
51
-// --------------------------------------------------------------------------
47
+// ------------------------
52 48
 // Externals
53
-// --------------------------------------------------------------------------
49
+// ------------------------
54 50
 
55 51
 portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
56 52
 
57
-// --------------------------------------------------------------------------
53
+// ------------------------
58 54
 // Local defines
59
-// --------------------------------------------------------------------------
55
+// ------------------------
60 56
 
61 57
 #define V_REF 1100
62 58
 
63
-// --------------------------------------------------------------------------
64
-// Types
65
-// --------------------------------------------------------------------------
66
-
67
-// --------------------------------------------------------------------------
68
-// Variables
69
-// --------------------------------------------------------------------------
70
-
71
-// --------------------------------------------------------------------------
59
+// ------------------------
72 60
 // Public Variables
73
-// --------------------------------------------------------------------------
61
+// ------------------------
74 62
 
75 63
 uint16_t HAL_adc_result;
76 64
 
77
-// --------------------------------------------------------------------------
65
+// ------------------------
78 66
 // Private Variables
79
-// --------------------------------------------------------------------------
67
+// ------------------------
80 68
 
81 69
 esp_adc_cal_characteristics_t characteristics;
82 70
 
83
-// --------------------------------------------------------------------------
84
-// Function prototypes
85
-// --------------------------------------------------------------------------
86
-
87
-// --------------------------------------------------------------------------
88
-// Private functions
89
-// --------------------------------------------------------------------------
90
-
91
-// --------------------------------------------------------------------------
71
+// ------------------------
92 72
 // Public functions
93
-// --------------------------------------------------------------------------
73
+// ------------------------
94 74
 
95 75
 void HAL_init(void) {
96 76
   i2s_init();
@@ -128,9 +108,9 @@ void _delay_ms(int delay_ms) { delay(delay_ms); }
128 108
 // return free memory between end of heap (or end bss) and whatever is current
129 109
 int freeMemory() { return ESP.getFreeHeap(); }
130 110
 
131
-// --------------------------------------------------------------------------
111
+// ------------------------
132 112
 // ADC
133
-// --------------------------------------------------------------------------
113
+// ------------------------
134 114
 #define ADC1_CHANNEL(pin) ADC1_GPIO ## pin ## _CHANNEL
135 115
 
136 116
 adc1_channel_t get_channel(int pin) {

+ 8
- 12
Marlin/src/HAL/HAL_ESP32/HAL.h ファイルの表示

@@ -24,10 +24,6 @@
24 24
 
25 25
 #define CPU_32_BIT
26 26
 
27
-// --------------------------------------------------------------------------
28
-// Includes
29
-// --------------------------------------------------------------------------
30
-
31 27
 #include <stdint.h>
32 28
 
33 29
 #include "../shared/Marduino.h"
@@ -43,9 +39,9 @@
43 39
 #include "WebSocketSerial.h"
44 40
 #include "FlushableHardwareSerial.h"
45 41
 
46
-// --------------------------------------------------------------------------
42
+// ------------------------
47 43
 // Defines
48
-// --------------------------------------------------------------------------
44
+// ------------------------
49 45
 
50 46
 extern portMUX_TYPE spinlock;
51 47
 
@@ -69,24 +65,24 @@ extern portMUX_TYPE spinlock;
69 65
 #undef pgm_read_ptr
70 66
 #define pgm_read_ptr(addr) (*(addr))
71 67
 
72
-// --------------------------------------------------------------------------
68
+// ------------------------
73 69
 // Types
74
-// --------------------------------------------------------------------------
70
+// ------------------------
75 71
 
76 72
 typedef int16_t pin_t;
77 73
 
78 74
 #define HAL_SERVO_LIB Servo
79 75
 
80
-// --------------------------------------------------------------------------
76
+// ------------------------
81 77
 // Public Variables
82
-// --------------------------------------------------------------------------
78
+// ------------------------
83 79
 
84 80
 /** result of last ADC conversion */
85 81
 extern uint16_t HAL_adc_result;
86 82
 
87
-// --------------------------------------------------------------------------
83
+// ------------------------
88 84
 // Public functions
89
-// --------------------------------------------------------------------------
85
+// ------------------------
90 86
 
91 87
 // clear reset reason
92 88
 void HAL_clear_reset_source (void);

+ 8
- 12
Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp ファイルの表示

@@ -23,10 +23,6 @@
23 23
 
24 24
 #ifdef ARDUINO_ARCH_ESP32
25 25
 
26
-// --------------------------------------------------------------------------
27
-// Includes
28
-// --------------------------------------------------------------------------
29
-
30 26
 #include "HAL.h"
31 27
 #include "../shared/HAL_SPI.h"
32 28
 #include <pins_arduino.h>
@@ -34,28 +30,28 @@
34 30
 #include "../../core/macros.h"
35 31
 #include <SPI.h>
36 32
 
37
-// --------------------------------------------------------------------------
33
+// ------------------------
38 34
 // Public Variables
39
-// --------------------------------------------------------------------------
35
+// ------------------------
40 36
 
41 37
 static SPISettings spiConfig;
42 38
 
43
-// --------------------------------------------------------------------------
39
+// ------------------------
44 40
 // Public functions
45
-// --------------------------------------------------------------------------
41
+// ------------------------
46 42
 
47 43
 #if ENABLED(SOFTWARE_SPI)
48 44
 
49
-  // --------------------------------------------------------------------------
45
+  // ------------------------
50 46
   // Software SPI
51
-  // --------------------------------------------------------------------------
47
+  // ------------------------
52 48
   #error "Software SPI not supported for ESP32. Use Hardware SPI."
53 49
 
54 50
 #else
55 51
 
56
-// --------------------------------------------------------------------------
52
+// ------------------------
57 53
 // Hardware SPI
58
-// --------------------------------------------------------------------------
54
+// ------------------------
59 55
 
60 56
 void spiBegin() {
61 57
   #if !PIN_EXISTS(SS)

+ 6
- 31
Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp ファイルの表示

@@ -22,10 +22,6 @@
22 22
 
23 23
 #ifdef ARDUINO_ARCH_ESP32
24 24
 
25
-// --------------------------------------------------------------------------
26
-// Includes
27
-// --------------------------------------------------------------------------
28
-
29 25
 #include <stdio.h>
30 26
 #include "esp_types.h"
31 27
 #include "soc/timer_group_struct.h"
@@ -36,28 +32,15 @@
36 32
 
37 33
 #include "HAL_timers_ESP32.h"
38 34
 
39
-// --------------------------------------------------------------------------
40
-// Externals
41
-// --------------------------------------------------------------------------
42
-
43
-// --------------------------------------------------------------------------
35
+// ------------------------
44 36
 // Local defines
45
-// --------------------------------------------------------------------------
37
+// ------------------------
46 38
 
47 39
 #define NUM_HARDWARE_TIMERS 4
48 40
 
49
-// --------------------------------------------------------------------------
50
-// Types
51
-// --------------------------------------------------------------------------
52
-
53
-
54
-// --------------------------------------------------------------------------
55
-// Public Variables
56
-// --------------------------------------------------------------------------
57
-
58
-// --------------------------------------------------------------------------
41
+// ------------------------
59 42
 // Private Variables
60
-// --------------------------------------------------------------------------
43
+// ------------------------
61 44
 
62 45
 static timg_dev_t *TG[2] = {&TIMERG0, &TIMERG1};
63 46
 
@@ -68,17 +51,9 @@ const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
68 51
   { TIMER_GROUP_1, TIMER_1,                      1, nullptr }, // 3
69 52
 };
70 53
 
71
-// --------------------------------------------------------------------------
72
-// Function prototypes
73
-// --------------------------------------------------------------------------
74
-
75
-// --------------------------------------------------------------------------
76
-// Private functions
77
-// --------------------------------------------------------------------------
78
-
79
-// --------------------------------------------------------------------------
54
+// ------------------------
80 55
 // Public functions
81
-// --------------------------------------------------------------------------
56
+// ------------------------
82 57
 
83 58
 void IRAM_ATTR timer_group0_isr(void *para) {
84 59
   const int timer_idx = (int)para;

+ 8
- 12
Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.h ファイルの表示

@@ -21,10 +21,6 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-// --------------------------------------------------------------------------
25
-// Includes
26
-// --------------------------------------------------------------------------
27
-
28 24
 #include <stdint.h>
29 25
 #include "driver/timer.h"
30 26
 
@@ -33,9 +29,9 @@
33 29
 #include "../../inc/MarlinConfig.h"
34 30
 #include "../../pins/pins.h"
35 31
 
36
-// --------------------------------------------------------------------------
32
+// ------------------------
37 33
 // Defines
38
-// --------------------------------------------------------------------------
34
+// ------------------------
39 35
 //
40 36
 #define FORCE_INLINE __attribute__((always_inline)) inline
41 37
 
@@ -81,9 +77,9 @@ extern "C" void tempTC_Handler(void);
81 77
 extern "C" void stepTC_Handler(void);
82 78
 
83 79
 
84
-// --------------------------------------------------------------------------
80
+// ------------------------
85 81
 // Types
86
-// --------------------------------------------------------------------------
82
+// ------------------------
87 83
 
88 84
 typedef struct {
89 85
   timer_group_t  group;
@@ -92,15 +88,15 @@ typedef struct {
92 88
   void           (*fn)(void);
93 89
 } tTimerConfig;
94 90
 
95
-// --------------------------------------------------------------------------
91
+// ------------------------
96 92
 // Public Variables
97
-// --------------------------------------------------------------------------
93
+// ------------------------
98 94
 
99 95
 extern const tTimerConfig TimerConfig[];
100 96
 
101
-// --------------------------------------------------------------------------
97
+// ------------------------
102 98
 // Public functions
103
-// --------------------------------------------------------------------------
99
+// ------------------------
104 100
 
105 101
 void HAL_timer_start (const uint8_t timer_num, uint32_t frequency);
106 102
 void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t count);

+ 2
- 2
Marlin/src/HAL/HAL_LINUX/HAL.cpp ファイルの表示

@@ -47,9 +47,9 @@ int freeMemory() {
47 47
   return 0;
48 48
 }
49 49
 
50
-// --------------------------------------------------------------------------
50
+// ------------------------
51 51
 // ADC
52
-// --------------------------------------------------------------------------
52
+// ------------------------
53 53
 
54 54
 void HAL_adc_init(void) {
55 55
 

+ 0
- 4
Marlin/src/HAL/HAL_LINUX/HAL.h ファイルの表示

@@ -23,10 +23,6 @@
23 23
 
24 24
 #define CPU_32_BIT
25 25
 
26
-// --------------------------------------------------------------------------
27
-// Includes
28
-// --------------------------------------------------------------------------
29
-
30 26
 #define F_CPU 100000000
31 27
 #define SystemCoreClock F_CPU
32 28
 #include <iostream>

+ 2
- 6
Marlin/src/HAL/HAL_LINUX/HAL_timers.h ファイルの表示

@@ -24,15 +24,11 @@
24 24
  * HAL timers for Linux X86_64
25 25
  */
26 26
 
27
-// --------------------------------------------------------------------------
28
-// Includes
29
-// --------------------------------------------------------------------------
30
-
31 27
 #include <stdint.h>
32 28
 
33
-// --------------------------------------------------------------------------
29
+// ------------------------
34 30
 // Defines
35
-// --------------------------------------------------------------------------
31
+// ------------------------
36 32
 
37 33
 #define FORCE_INLINE __attribute__((always_inline)) inline
38 34
 

+ 2
- 6
Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp ファイルの表示

@@ -49,15 +49,11 @@
49 49
 #ifdef TARGET_LPC1768
50 50
 
51 51
 #include "../../inc/MarlinConfig.h"
52
-// --------------------------------------------------------------------------
53
-// Includes
54
-// --------------------------------------------------------------------------
55
-
56 52
 #include <SPI.h>
57 53
 
58
-// --------------------------------------------------------------------------
54
+// ------------------------
59 55
 // Public functions
60
-// --------------------------------------------------------------------------
56
+// ------------------------
61 57
 #if ENABLED(LPC_SOFTWARE_SPI)
62 58
 
63 59
   #include "SoftwareSPI.h"

+ 4
- 8
Marlin/src/HAL/HAL_LPC1768/HAL_timers.h ファイルの表示

@@ -25,10 +25,6 @@
25 25
  * HAL For LPC1768
26 26
  */
27 27
 
28
-// --------------------------------------------------------------------------
29
-// Includes
30
-// --------------------------------------------------------------------------
31
-
32 28
 #include <stdint.h>
33 29
 
34 30
 #include "../../core/macros.h"
@@ -51,9 +47,9 @@
51 47
 #define SBIT_MR3R 10
52 48
 #define SBIT_MR3S 11
53 49
 
54
-// --------------------------------------------------------------------------
50
+// ------------------------
55 51
 // Defines
56
-// --------------------------------------------------------------------------
52
+// ------------------------
57 53
 
58 54
 #define _HAL_TIMER(T) _CAT(LPC_TIM, T)
59 55
 #define _HAL_TIMER_IRQ(T) TIMER##T##_IRQn
@@ -95,9 +91,9 @@ typedef uint32_t hal_timer_t;
95 91
 #define STEP_TIMER _HAL_TIMER(STEP_TIMER_NUM)
96 92
 #define TEMP_TIMER _HAL_TIMER(TEMP_TIMER_NUM)
97 93
 
98
-// --------------------------------------------------------------------------
94
+// ------------------------
99 95
 // Public functions
100
-// --------------------------------------------------------------------------
96
+// ------------------------
101 97
 void HAL_timer_init(void);
102 98
 void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
103 99
 

+ 6
- 35
Marlin/src/HAL/HAL_STM32/HAL.cpp ファイルの表示

@@ -38,44 +38,15 @@
38 38
   #endif
39 39
 #endif
40 40
 
41
-// --------------------------------------------------------------------------
42
-// Externals
43
-// --------------------------------------------------------------------------
44
-
45
-// --------------------------------------------------------------------------
46
-// Local defines
47
-// --------------------------------------------------------------------------
48
-
49
-// --------------------------------------------------------------------------
50
-// Types
51
-// --------------------------------------------------------------------------
52
-
53
-// --------------------------------------------------------------------------
54
-// Variables
55
-// --------------------------------------------------------------------------
56
-
57
-// --------------------------------------------------------------------------
41
+// ------------------------
58 42
 // Public Variables
59
-// --------------------------------------------------------------------------
43
+// ------------------------
60 44
 
61 45
 uint16_t HAL_adc_result;
62 46
 
63
-// --------------------------------------------------------------------------
64
-// Private Variables
65
-// --------------------------------------------------------------------------
66
-
67
-// --------------------------------------------------------------------------
68
-// Function prototypes
69
-// --------------------------------------------------------------------------
70
-
71
-// --------------------------------------------------------------------------
72
-// Private functions
73
-// --------------------------------------------------------------------------
74
-
75
-// --------------------------------------------------------------------------
47
+// ------------------------
76 48
 // Public functions
77
-// --------------------------------------------------------------------------
78
-
49
+// ------------------------
79 50
 
80 51
 // Needed for DELAY_NS() / DELAY_US() on CORTEX-M7
81 52
 #if (defined(__arm__) || defined(__thumb__)) && __CORTEX_M == 7
@@ -129,9 +100,9 @@ extern "C" {
129 100
   extern unsigned int _ebss; // end of bss section
130 101
 }
131 102
 
132
-// --------------------------------------------------------------------------
103
+// ------------------------
133 104
 // ADC
134
-// --------------------------------------------------------------------------
105
+// ------------------------
135 106
 
136 107
 void HAL_adc_start_conversion(const uint8_t adc_pin) {
137 108
   HAL_adc_result = analogRead(adc_pin);

+ 8
- 12
Marlin/src/HAL/HAL_STM32/HAL.h ファイルの表示

@@ -24,10 +24,6 @@
24 24
 
25 25
 #define CPU_32_BIT
26 26
 
27
-// --------------------------------------------------------------------------
28
-// Includes
29
-// --------------------------------------------------------------------------
30
-
31 27
 #include "../../core/macros.h"
32 28
 #include "../shared/Marduino.h"
33 29
 #include "../shared/math_32bit.h"
@@ -43,9 +39,9 @@
43 39
   #include <USBSerial.h>
44 40
 #endif
45 41
 
46
-// --------------------------------------------------------------------------
42
+// ------------------------
47 43
 // Defines
48
-// --------------------------------------------------------------------------
44
+// ------------------------
49 45
 
50 46
 #if SERIAL_PORT == 0
51 47
   #error "Serial port 0 does not exist"
@@ -128,24 +124,24 @@
128 124
 #undef pgm_read_ptr
129 125
 #define pgm_read_ptr(addr) (*(addr))
130 126
 
131
-// --------------------------------------------------------------------------
127
+// ------------------------
132 128
 // Types
133
-// --------------------------------------------------------------------------
129
+// ------------------------
134 130
 
135 131
 typedef int16_t pin_t;
136 132
 
137 133
 #define HAL_SERVO_LIB libServo
138 134
 
139
-// --------------------------------------------------------------------------
135
+// ------------------------
140 136
 // Public Variables
141
-// --------------------------------------------------------------------------
137
+// ------------------------
142 138
 
143 139
 /** result of last ADC conversion */
144 140
 extern uint16_t HAL_adc_result;
145 141
 
146
-// --------------------------------------------------------------------------
142
+// ------------------------
147 143
 // Public functions
148
-// --------------------------------------------------------------------------
144
+// ------------------------
149 145
 
150 146
 // Memory related
151 147
 #define __bss_end __bss_end__

+ 8
- 12
Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp ファイルの表示

@@ -23,35 +23,31 @@
23 23
 #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
24 24
 
25 25
 
26
-// --------------------------------------------------------------------------
27
-// Includes
28
-// --------------------------------------------------------------------------
29
-
30 26
 #include "../../inc/MarlinConfig.h"
31 27
 
32 28
 #include <SPI.h>
33 29
 
34
-// --------------------------------------------------------------------------
30
+// ------------------------
35 31
 // Public Variables
36
-// --------------------------------------------------------------------------
32
+// ------------------------
37 33
 
38 34
 static SPISettings spiConfig;
39 35
 
40
-// --------------------------------------------------------------------------
36
+// ------------------------
41 37
 // Public functions
42
-// --------------------------------------------------------------------------
38
+// ------------------------
43 39
 
44 40
 #if ENABLED(SOFTWARE_SPI)
45
-  // --------------------------------------------------------------------------
41
+  // ------------------------
46 42
   // Software SPI
47
-  // --------------------------------------------------------------------------
43
+  // ------------------------
48 44
   #error "Software SPI not supported for STM32. Use Hardware SPI."
49 45
 
50 46
 #else
51 47
 
52
-// --------------------------------------------------------------------------
48
+// ------------------------
53 49
 // Hardware SPI
54
-// --------------------------------------------------------------------------
50
+// ------------------------
55 51
 
56 52
 /**
57 53
  * VGPV SPI speed start and PCLK2/2, by default 108/2 = 54Mhz

+ 6
- 29
Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.cpp ファイルの表示

@@ -22,50 +22,27 @@
22 22
 #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
23 23
 
24 24
 
25
-// --------------------------------------------------------------------------
26
-// Includes
27
-// --------------------------------------------------------------------------
28
-
29 25
 #include "HAL.h"
30 26
 
31 27
 #include "HAL_timers_STM32.h"
32 28
 
33
-// --------------------------------------------------------------------------
34
-// Externals
35
-// --------------------------------------------------------------------------
36
-
37
-// --------------------------------------------------------------------------
29
+// ------------------------
38 30
 // Local defines
39
-// --------------------------------------------------------------------------
31
+// ------------------------
40 32
 
41 33
 #define NUM_HARDWARE_TIMERS 2
42 34
 
43 35
 //#define PRESCALER 1
44
-// --------------------------------------------------------------------------
45
-// Types
46
-// --------------------------------------------------------------------------
47
-
48
-// --------------------------------------------------------------------------
49
-// Public Variables
50
-// --------------------------------------------------------------------------
51 36
 
52
-// --------------------------------------------------------------------------
37
+// ------------------------
53 38
 // Private Variables
54
-// --------------------------------------------------------------------------
39
+// ------------------------
55 40
 
56 41
 stm32f4_timer_t TimerHandle[NUM_HARDWARE_TIMERS];
57 42
 
58
-// --------------------------------------------------------------------------
59
-// Function prototypes
60
-// --------------------------------------------------------------------------
61
-
62
-// --------------------------------------------------------------------------
63
-// Private functions
64
-// --------------------------------------------------------------------------
65
-
66
-// --------------------------------------------------------------------------
43
+// ------------------------
67 44
 // Public functions
68
-// --------------------------------------------------------------------------
45
+// ------------------------
69 46
 
70 47
 bool timers_initialized[NUM_HARDWARE_TIMERS] = { false };
71 48
 

+ 8
- 12
Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.h ファイルの表示

@@ -21,16 +21,12 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-// --------------------------------------------------------------------------
25
-// Includes
26
-// --------------------------------------------------------------------------
27
-
28 24
 #include <stdint.h>
29 25
 #include "../../inc/MarlinConfig.h"
30 26
 
31
-// --------------------------------------------------------------------------
27
+// ------------------------
32 28
 // Defines
33
-// --------------------------------------------------------------------------
29
+// ------------------------
34 30
 
35 31
 #define FORCE_INLINE __attribute__((always_inline)) inline
36 32
 
@@ -128,21 +124,21 @@ extern void Temp_Handler(stimer_t *htim);
128 124
 #define HAL_STEP_TIMER_ISR() void Step_Handler(stimer_t *htim)
129 125
 #define HAL_TEMP_TIMER_ISR() void Temp_Handler(stimer_t *htim)
130 126
 
131
-// --------------------------------------------------------------------------
127
+// ------------------------
132 128
 // Types
133
-// --------------------------------------------------------------------------
129
+// ------------------------
134 130
 
135 131
 typedef stimer_t stm32f4_timer_t;
136 132
 
137
-// --------------------------------------------------------------------------
133
+// ------------------------
138 134
 // Public Variables
139
-// --------------------------------------------------------------------------
135
+// ------------------------
140 136
 
141 137
 extern stm32f4_timer_t TimerHandle[];
142 138
 
143
-// --------------------------------------------------------------------------
139
+// ------------------------
144 140
 // Public functions
145
-// --------------------------------------------------------------------------
141
+// ------------------------
146 142
 
147 143
 void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
148 144
 void HAL_timer_enable_interrupt(const uint8_t timer_num);

+ 6
- 6
Marlin/src/HAL/HAL_STM32/fastio_STM32.h ファイルの表示

@@ -27,21 +27,21 @@
27 27
  * These use GPIO register access for fast port manipulation.
28 28
  */
29 29
 
30
-// --------------------------------------------------------------------------
30
+// ------------------------
31 31
 // Public Variables
32
-// --------------------------------------------------------------------------
32
+// ------------------------
33 33
 
34 34
 extern GPIO_TypeDef * FastIOPortMap[];
35 35
 
36
-// --------------------------------------------------------------------------
36
+// ------------------------
37 37
 // Public functions
38
-// --------------------------------------------------------------------------
38
+// ------------------------
39 39
 
40 40
 void FastIO_init(); // Must be called before using fast io macros
41 41
 
42
-// --------------------------------------------------------------------------
42
+// ------------------------
43 43
 // Defines
44
-// --------------------------------------------------------------------------
44
+// ------------------------
45 45
 
46 46
 #define _BV32(b) (1UL << (b))
47 47
 

+ 18
- 28
Marlin/src/HAL/HAL_STM32F1/HAL.cpp ファイルの表示

@@ -27,22 +27,14 @@
27 27
 
28 28
 #ifdef __STM32F1__
29 29
 
30
-// --------------------------------------------------------------------------
31
-// Includes
32
-// --------------------------------------------------------------------------
33
-
34 30
 #include "HAL.h"
35 31
 #include "../../inc/MarlinConfig.h"
36 32
 
37 33
 #include <STM32ADC.h>
38 34
 
39
-// --------------------------------------------------------------------------
40
-// Externals
41
-// --------------------------------------------------------------------------
42
-
43
-// --------------------------------------------------------------------------
35
+// ------------------------
44 36
 // Types
45
-// --------------------------------------------------------------------------
37
+// ------------------------
46 38
 
47 39
 #define __I
48 40
 #define __IO volatile
@@ -70,13 +62,10 @@
70 62
    __IO uint32_t CPACR;                   /*!< Offset: 0x088 (R/W)  Coprocessor Access Control Register                   */
71 63
  } SCB_Type;
72 64
 
73
-// --------------------------------------------------------------------------
74
-// Variables
75
-// --------------------------------------------------------------------------
76
-
77
-// --------------------------------------------------------------------------
65
+// ------------------------
78 66
 // Local defines
79
-// --------------------------------------------------------------------------
67
+// ------------------------
68
+
80 69
 #define SCS_BASE            (0xE000E000UL)                            /*!< System Control Space Base Address  */
81 70
 #define SCB_BASE            (SCS_BASE +  0x0D00UL)                    /*!< System Control Block Base Address  */
82 71
 
@@ -89,18 +78,19 @@
89 78
 #define SCB_AIRCR_PRIGROUP_Pos              8                                             /*!< SCB AIRCR: PRIGROUP Position */
90 79
 #define SCB_AIRCR_PRIGROUP_Msk             (7UL << SCB_AIRCR_PRIGROUP_Pos)                /*!< SCB AIRCR: PRIGROUP Mask */
91 80
 
92
-// --------------------------------------------------------------------------
81
+// ------------------------
93 82
 // Public Variables
94
-// --------------------------------------------------------------------------
83
+// ------------------------
84
+
95 85
 #ifdef SERIAL_USB
96 86
   USBSerial SerialUSB;
97 87
 #endif
98 88
 
99 89
 uint16_t HAL_adc_result;
100 90
 
101
-// --------------------------------------------------------------------------
91
+// ------------------------
102 92
 // Private Variables
103
-// --------------------------------------------------------------------------
93
+// ------------------------
104 94
 STM32ADC adc(ADC1);
105 95
 
106 96
 uint8_t adc_pins[] = {
@@ -166,13 +156,13 @@ enum TEMP_PINS : char {
166 156
 
167 157
 uint16_t HAL_adc_results[ADC_PIN_COUNT];
168 158
 
169
-// --------------------------------------------------------------------------
159
+// ------------------------
170 160
 // Function prototypes
171
-// --------------------------------------------------------------------------
161
+// ------------------------
172 162
 
173
-// --------------------------------------------------------------------------
163
+// ------------------------
174 164
 // Private functions
175
-// --------------------------------------------------------------------------
165
+// ------------------------
176 166
 static void NVIC_SetPriorityGrouping(uint32_t PriorityGroup) {
177 167
   uint32_t reg_value;
178 168
   uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07);               /* only values 0..7 are used          */
@@ -185,9 +175,9 @@ static void NVIC_SetPriorityGrouping(uint32_t PriorityGroup) {
185 175
   SCB->AIRCR =  reg_value;
186 176
 }
187 177
 
188
-// --------------------------------------------------------------------------
178
+// ------------------------
189 179
 // Public functions
190
-// --------------------------------------------------------------------------
180
+// ------------------------
191 181
 
192 182
 //
193 183
 // Leave PA11/PA12 intact if USBSerial is not used
@@ -263,9 +253,9 @@ extern "C" {
263 253
 }
264 254
 */
265 255
 
266
-// --------------------------------------------------------------------------
256
+// ------------------------
267 257
 // ADC
268
-// --------------------------------------------------------------------------
258
+// ------------------------
269 259
 // Init the AD in continuous capture mode
270 260
 void HAL_adc_init(void) {
271 261
   // configure the ADC

+ 8
- 12
Marlin/src/HAL/HAL_STM32F1/HAL.h ファイルの表示

@@ -32,10 +32,6 @@
32 32
   #define vsnprintf_P vsnprintf
33 33
 #endif
34 34
 
35
-// --------------------------------------------------------------------------
36
-// Includes
37
-// --------------------------------------------------------------------------
38
-
39 35
 #include "../../core/macros.h"
40 36
 #include "../shared/Marduino.h"
41 37
 #include "../shared/math_32bit.h"
@@ -51,9 +47,9 @@
51 47
 
52 48
 #include "../../inc/MarlinConfigPre.h"
53 49
 
54
-// --------------------------------------------------------------------------
50
+// ------------------------
55 51
 // Defines
56
-// --------------------------------------------------------------------------
52
+// ------------------------
57 53
 
58 54
 #ifdef SERIAL_USB
59 55
   #define UsbSerial Serial
@@ -156,22 +152,22 @@ void HAL_init(void);
156 152
 #define RST_SOFTWARE   32
157 153
 #define RST_BACKUP     64
158 154
 
159
-// --------------------------------------------------------------------------
155
+// ------------------------
160 156
 // Types
161
-// --------------------------------------------------------------------------
157
+// ------------------------
162 158
 
163 159
 typedef int8_t pin_t;
164 160
 
165
-// --------------------------------------------------------------------------
161
+// ------------------------
166 162
 // Public Variables
167
-// --------------------------------------------------------------------------
163
+// ------------------------
168 164
 
169 165
 /** result of last ADC conversion */
170 166
 extern uint16_t HAL_adc_result;
171 167
 
172
-// --------------------------------------------------------------------------
168
+// ------------------------
173 169
 // Public functions
174
-// --------------------------------------------------------------------------
170
+// ------------------------
175 171
 
176 172
 // Disable interrupts
177 173
 #define cli() noInterrupts()

+ 2
- 2
Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.cpp ファイルの表示

@@ -167,9 +167,9 @@ bool SDIO_WriteBlock(uint32_t blockAddress, const uint8_t *data) {
167 167
 
168 168
 inline uint32_t SDIO_GetCardState(void) { return SDIO_CmdSendStatus(SdCard.RelCardAdd << 16U) ? (SDIO_GetResponse(SDIO_RESP1) >> 9U) & 0x0FU : SDIO_CARD_ERROR; }
169 169
 
170
-// --------------------------------------------------------------------------
170
+// ------------------------
171 171
 // SD Commands and Responses
172
-// --------------------------------------------------------------------------
172
+// ------------------------
173 173
 
174 174
 void SDIO_SendCommand(uint16_t command, uint32_t argument) { SDIO->ARG = argument; SDIO->CMD = (uint32_t)(SDIO_CMD_CPSMEN | command); }
175 175
 uint8_t SDIO_GetCommandResponse(void) { return (uint8_t)(SDIO->RESPCMD); }

+ 6
- 10
Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.h ファイルの表示

@@ -21,18 +21,14 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-// --------------------------------------------------------------------------
25
-// Includes
26
-// --------------------------------------------------------------------------
27
-
28 24
 #include "../shared/Marduino.h"
29 25
 
30 26
 #include "libmaple/sdio.h"
31 27
 #include "libmaple/dma.h"
32 28
 
33
-// --------------------------------------------------------------------------
29
+// ------------------------
34 30
 // Defines
35
-// --------------------------------------------------------------------------
31
+// ------------------------
36 32
 
37 33
 #define SDMMC_CMD_GO_IDLE_STATE                       ((uint8_t)0)   /* Resets the SD memory card. */
38 34
 #define SDMMC_CMD_ALL_SEND_CID                        ((uint8_t)2)   /* Asks any card connected to the host to send the CID numbers on the CMD line. */
@@ -106,9 +102,9 @@
106 102
 
107 103
 #define SDIO_CLOCK                           18000000       /* 18 MHz */
108 104
 
109
-// --------------------------------------------------------------------------
105
+// ------------------------
110 106
 // Types
111
-// --------------------------------------------------------------------------
107
+// ------------------------
112 108
 
113 109
 typedef struct {
114 110
   uint32_t CardType;      // Card Type
@@ -121,9 +117,9 @@ typedef struct {
121 117
   uint32_t LogBlockSize;  // Logical block size in bytes
122 118
 } SDIO_CardInfoTypeDef;
123 119
 
124
-// --------------------------------------------------------------------------
120
+// ------------------------
125 121
 // Public functions
126
-// --------------------------------------------------------------------------
122
+// ------------------------
127 123
 
128 124
 inline uint32_t SDIO_GetCardState(void);
129 125
 

+ 6
- 15
Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp ファイルの表示

@@ -32,34 +32,25 @@
32 32
 
33 33
 #ifdef __STM32F1__
34 34
 
35
-// --------------------------------------------------------------------------
36
-// Includes
37
-// --------------------------------------------------------------------------
38
-
39 35
 #include "../../inc/MarlinConfig.h"
40 36
 #include <SPI.h>
41 37
 
42
-
43
-// --------------------------------------------------------------------------
44
-// Public Variables
45
-// --------------------------------------------------------------------------
46
-
47
-// --------------------------------------------------------------------------
38
+// ------------------------
48 39
 // Public functions
49
-// --------------------------------------------------------------------------
40
+// ------------------------
50 41
 
51 42
 #if ENABLED(SOFTWARE_SPI)
52 43
 
53
-  // --------------------------------------------------------------------------
44
+  // ------------------------
54 45
   // Software SPI
55
-  // --------------------------------------------------------------------------
46
+  // ------------------------
56 47
   #error "Software SPI not supported for STM32F1. Use hardware SPI."
57 48
 
58 49
 #else
59 50
 
60
-// --------------------------------------------------------------------------
51
+// ------------------------
61 52
 // Hardware SPI
62
-// --------------------------------------------------------------------------
53
+// ------------------------
63 54
 
64 55
 /**
65 56
  * VGPV SPI speed start and F_CPU/2, by default 72/2 = 36Mhz

+ 4
- 32
Marlin/src/HAL/HAL_STM32F1/HAL_timers_STM32F1.cpp ファイルの表示

@@ -26,45 +26,17 @@
26 26
 
27 27
 #ifdef __STM32F1__
28 28
 
29
-// --------------------------------------------------------------------------
30
-// Includes
31
-// --------------------------------------------------------------------------
32
-
33 29
 #include "HAL.h"
34 30
 
35 31
 #include "HAL_timers_STM32F1.h"
36 32
 
37
-// --------------------------------------------------------------------------
38
-// Externals
39
-// --------------------------------------------------------------------------
40
-
41
-// --------------------------------------------------------------------------
33
+// ------------------------
42 34
 // Local defines
43
-// --------------------------------------------------------------------------
44
-
45
-// --------------------------------------------------------------------------
46
-// Types
47
-// --------------------------------------------------------------------------
48
-
49
-// --------------------------------------------------------------------------
50
-// Public Variables
51
-// --------------------------------------------------------------------------
52
-
53
-// --------------------------------------------------------------------------
54
-// Private Variables
55
-// --------------------------------------------------------------------------
56
-
57
-// --------------------------------------------------------------------------
58
-// Function prototypes
59
-// --------------------------------------------------------------------------
60
-
61
-// --------------------------------------------------------------------------
62
-// Private functions
63
-// --------------------------------------------------------------------------
35
+// ------------------------
64 36
 
65
-// --------------------------------------------------------------------------
37
+// ------------------------
66 38
 // Public functions
67
-// --------------------------------------------------------------------------
39
+// ------------------------
68 40
 
69 41
 /**
70 42
  * Timer_clock1: Prescaler   2 ->  36    MHz

+ 9
- 18
Marlin/src/HAL/HAL_STM32F1/HAL_timers_STM32F1.h ファイルの表示

@@ -25,16 +25,12 @@
25 25
  * HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
26 26
  */
27 27
 
28
-// --------------------------------------------------------------------------
29
-// Includes
30
-// --------------------------------------------------------------------------
31
-
32 28
 #include <stdint.h>
33 29
 #include <libmaple/timer.h>
34 30
 
35
-// --------------------------------------------------------------------------
31
+// ------------------------
36 32
 // Defines
37
-// --------------------------------------------------------------------------
33
+// ------------------------
38 34
 
39 35
 /**
40 36
  * TODO: Check and confirm what timer we will use for each Temps and stepper driving.
@@ -96,21 +92,16 @@ timer_dev* get_timer_dev(int number);
96 92
 extern "C" void tempTC_Handler(void);
97 93
 extern "C" void stepTC_Handler(void);
98 94
 
99
-// --------------------------------------------------------------------------
100
-// Types
101
-// --------------------------------------------------------------------------
95
+// ------------------------
96
+// Public Variables
97
+// ------------------------
102 98
 
99
+//static HardwareTimer StepperTimer(STEP_TIMER_NUM);
100
+//static HardwareTimer TempTimer(TEMP_TIMER_NUM);
103 101
 
104
-// --------------------------------------------------------------------------
105
-// Public Variables
106
-// --------------------------------------------------------------------------
107
-/*
108
-static HardwareTimer StepperTimer(STEP_TIMER_NUM);
109
-static HardwareTimer TempTimer(TEMP_TIMER_NUM);
110
-*/
111
-// --------------------------------------------------------------------------
102
+// ------------------------
112 103
 // Public functions
113
-// --------------------------------------------------------------------------
104
+// ------------------------
114 105
 
115 106
 void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
116 107
 void HAL_timer_enable_interrupt(const uint8_t timer_num);

+ 2
- 2
Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.h ファイルの表示

@@ -45,9 +45,9 @@
45 45
  ******************************************************************************/
46 46
 #pragma once
47 47
 
48
-// --------------------------------------------------------------------------
48
+// ------------------------
49 49
 // Includes
50
-// --------------------------------------------------------------------------
50
+// ------------------------
51 51
 #include "../../../inc/MarlinConfig.h"
52 52
 #include "../HAL.h"
53 53
 

+ 12
- 40
Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp ファイルの表示

@@ -28,58 +28,30 @@
28 28
 
29 29
 #if ENABLED(EEPROM_SETTINGS) && NONE(I2C_EEPROM, SPI_EEPROM)
30 30
 
31
-// --------------------------------------------------------------------------
31
+// ------------------------
32 32
 // Includes
33
-// --------------------------------------------------------------------------
33
+// ------------------------
34 34
 
35 35
 #include "HAL.h"
36 36
 #include "EEPROM_Emul/eeprom_emul.h"
37 37
 
38
-
39
-// --------------------------------------------------------------------------
40
-// Externals
41
-// --------------------------------------------------------------------------
42
-
43
-// --------------------------------------------------------------------------
38
+// ------------------------
44 39
 // Local defines
45
-// --------------------------------------------------------------------------
46
-
47
-// --------------------------------------------------------------------------
48
-// Types
49
-// --------------------------------------------------------------------------
50
-
51
-// --------------------------------------------------------------------------
52
-// Variables
53
-// --------------------------------------------------------------------------
54
-
55
-// --------------------------------------------------------------------------
56
-// Public Variables
57
-// --------------------------------------------------------------------------
58
-
59
-// --------------------------------------------------------------------------
60
-// Private Variables
61
-// --------------------------------------------------------------------------
62
-static bool eeprom_initialized = false;
63
-// --------------------------------------------------------------------------
64
-// Function prototypes
65
-// --------------------------------------------------------------------------
66
-
67
-// --------------------------------------------------------------------------
68
-// Private functions
69
-// --------------------------------------------------------------------------
70
-
71
-// --------------------------------------------------------------------------
72
-// Public functions
73
-// --------------------------------------------------------------------------
40
+// ------------------------
74 41
 
75 42
 // FLASH_FLAG_PGSERR (Programming Sequence Error) was renamed to
76 43
 // FLASH_FLAG_ERSERR (Erasing Sequence Error) in STM32F4
77 44
 // #define FLASH_FLAG_PGSERR FLASH_FLAG_ERSERR
78 45
 
79
-// --------------------------------------------------------------------------
80
-// EEPROM
81
-// --------------------------------------------------------------------------
46
+// ------------------------
47
+// Private Variables
48
+// ------------------------
82 49
 
50
+static bool eeprom_initialized = false;
51
+
52
+// ------------------------
53
+// Public functions
54
+// ------------------------
83 55
 
84 56
 void eeprom_init() {
85 57
   if (!eeprom_initialized) {

+ 6
- 38
Marlin/src/HAL/HAL_STM32F4/HAL.cpp ファイルの表示

@@ -23,51 +23,19 @@
23 23
 
24 24
 #if defined(STM32GENERIC) && defined(STM32F4)
25 25
 
26
-// --------------------------------------------------------------------------
27
-// Includes
28
-// --------------------------------------------------------------------------
29
-
30 26
 #include "HAL.h"
31 27
 
32 28
 //#include <Wire.h>
33 29
 
34
-// --------------------------------------------------------------------------
35
-// Externals
36
-// --------------------------------------------------------------------------
37
-
38
-// --------------------------------------------------------------------------
39
-// Local defines
40
-// --------------------------------------------------------------------------
41
-
42
-// --------------------------------------------------------------------------
43
-// Types
44
-// --------------------------------------------------------------------------
45
-
46
-// --------------------------------------------------------------------------
47
-// Variables
48
-// --------------------------------------------------------------------------
49
-
50
-// --------------------------------------------------------------------------
30
+// ------------------------
51 31
 // Public Variables
52
-// --------------------------------------------------------------------------
32
+// ------------------------
53 33
 
54 34
 uint16_t HAL_adc_result;
55 35
 
56
-// --------------------------------------------------------------------------
57
-// Private Variables
58
-// --------------------------------------------------------------------------
59
-
60
-// --------------------------------------------------------------------------
61
-// Function prototypes
62
-// --------------------------------------------------------------------------
63
-
64
-// --------------------------------------------------------------------------
65
-// Private functions
66
-// --------------------------------------------------------------------------
67
-
68
-// --------------------------------------------------------------------------
36
+// ------------------------
69 37
 // Public functions
70
-// --------------------------------------------------------------------------
38
+// ------------------------
71 39
 
72 40
 /* VGPV Done with defines
73 41
 // disable interrupts
@@ -118,9 +86,9 @@ extern "C" {
118 86
 }
119 87
 */
120 88
 
121
-// --------------------------------------------------------------------------
89
+// ------------------------
122 90
 // ADC
123
-// --------------------------------------------------------------------------
91
+// ------------------------
124 92
 
125 93
 void HAL_adc_start_conversion(const uint8_t adc_pin) {
126 94
   HAL_adc_result = analogRead(adc_pin);

+ 8
- 12
Marlin/src/HAL/HAL_STM32F4/HAL.h ファイルの表示

@@ -28,10 +28,6 @@
28 28
   #define vsnprintf_P vsnprintf
29 29
 #endif
30 30
 
31
-// --------------------------------------------------------------------------
32
-// Includes
33
-// --------------------------------------------------------------------------
34
-
35 31
 #include "../shared/Marduino.h"
36 32
 #include "../shared/math_32bit.h"
37 33
 #include "../shared/HAL_SPI.h"
@@ -47,9 +43,9 @@
47 43
   #include <USBSerial.h>
48 44
 #endif
49 45
 
50
-// --------------------------------------------------------------------------
46
+// ------------------------
51 47
 // Defines
52
-// --------------------------------------------------------------------------
48
+// ------------------------
53 49
 
54 50
 //Serial override
55 51
 //extern HalSerial usb_serial;
@@ -136,24 +132,24 @@
136 132
 #undef pgm_read_ptr
137 133
 #define pgm_read_ptr(addr) (*(addr))
138 134
 
139
-// --------------------------------------------------------------------------
135
+// ------------------------
140 136
 // Types
141
-// --------------------------------------------------------------------------
137
+// ------------------------
142 138
 
143 139
 typedef int8_t pin_t;
144 140
 
145 141
 #define HAL_SERVO_LIB libServo
146 142
 
147
-// --------------------------------------------------------------------------
143
+// ------------------------
148 144
 // Public Variables
149
-// --------------------------------------------------------------------------
145
+// ------------------------
150 146
 
151 147
 /** result of last ADC conversion */
152 148
 extern uint16_t HAL_adc_result;
153 149
 
154
-// --------------------------------------------------------------------------
150
+// ------------------------
155 151
 // Public functions
156
-// --------------------------------------------------------------------------
152
+// ------------------------
157 153
 
158 154
 // Memory related
159 155
 #define __bss_end __bss_end__

+ 8
- 12
Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp ファイルの表示

@@ -32,10 +32,6 @@
32 32
 
33 33
 #if defined(STM32GENERIC) && defined(STM32F4)
34 34
 
35
-// --------------------------------------------------------------------------
36
-// Includes
37
-// --------------------------------------------------------------------------
38
-
39 35
 #include "HAL.h"
40 36
 #include "../shared/HAL_SPI.h"
41 37
 #include <pins_arduino.h>
@@ -43,28 +39,28 @@
43 39
 #include "../../core/macros.h"
44 40
 #include <SPI.h>
45 41
 
46
-// --------------------------------------------------------------------------
42
+// ------------------------
47 43
 // Public Variables
48
-// --------------------------------------------------------------------------
44
+// ------------------------
49 45
 
50 46
 static SPISettings spiConfig;
51 47
 
52
-// --------------------------------------------------------------------------
48
+// ------------------------
53 49
 // Public functions
54
-// --------------------------------------------------------------------------
50
+// ------------------------
55 51
 
56 52
 #if ENABLED(SOFTWARE_SPI)
57 53
 
58
-  // --------------------------------------------------------------------------
54
+  // ------------------------
59 55
   // Software SPI
60
-  // --------------------------------------------------------------------------
56
+  // ------------------------
61 57
   #error "Software SPI not supported for STM32F4. Use hardware SPI."
62 58
 
63 59
 #else
64 60
 
65
-// --------------------------------------------------------------------------
61
+// ------------------------
66 62
 // Hardware SPI
67
-// --------------------------------------------------------------------------
63
+// ------------------------
68 64
 
69 65
 /**
70 66
  * VGPV SPI speed start and F_CPU/2, by default 72/2 = 36Mhz

+ 6
- 30
Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp ファイルの表示

@@ -22,52 +22,28 @@
22 22
 
23 23
 #if defined(STM32GENERIC) && defined(STM32F4)
24 24
 
25
-// --------------------------------------------------------------------------
26
-// Includes
27
-// --------------------------------------------------------------------------
28
-
29 25
 #include "HAL.h"
30 26
 
31 27
 #include "HAL_timers_STM32F4.h"
32 28
 
33
-// --------------------------------------------------------------------------
34
-// Externals
35
-// --------------------------------------------------------------------------
36
-
37
-// --------------------------------------------------------------------------
29
+// ------------------------
38 30
 // Local defines
39
-// --------------------------------------------------------------------------
31
+// ------------------------
40 32
 
41 33
 #define NUM_HARDWARE_TIMERS 2
42 34
 #define STEP_TIMER_IRQ_ID TIM5_IRQn
43 35
 #define TEMP_TIMER_IRQ_ID TIM7_IRQn
44 36
 
45 37
 //#define PRESCALER 1
46
-// --------------------------------------------------------------------------
47
-// Types
48
-// --------------------------------------------------------------------------
49
-
50
-// --------------------------------------------------------------------------
51
-// Public Variables
52
-// --------------------------------------------------------------------------
53
-
54
-// --------------------------------------------------------------------------
38
+// ------------------------
55 39
 // Private Variables
56
-// --------------------------------------------------------------------------
40
+// ------------------------
57 41
 
58 42
 stm32f4_timer_t TimerHandle[NUM_HARDWARE_TIMERS];
59 43
 
60
-// --------------------------------------------------------------------------
61
-// Function prototypes
62
-// --------------------------------------------------------------------------
63
-
64
-// --------------------------------------------------------------------------
65
-// Private functions
66
-// --------------------------------------------------------------------------
67
-
68
-// --------------------------------------------------------------------------
44
+// ------------------------
69 45
 // Public functions
70
-// --------------------------------------------------------------------------
46
+// ------------------------
71 47
 
72 48
 bool timers_initialized[NUM_HARDWARE_TIMERS] = {false};
73 49
 

+ 8
- 12
Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h ファイルの表示

@@ -21,15 +21,11 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-// --------------------------------------------------------------------------
25
-// Includes
26
-// --------------------------------------------------------------------------
27
-
28 24
 #include <stdint.h>
29 25
 
30
-// --------------------------------------------------------------------------
26
+// ------------------------
31 27
 // Defines
32
-// --------------------------------------------------------------------------
28
+// ------------------------
33 29
 
34 30
 #define FORCE_INLINE __attribute__((always_inline)) inline
35 31
 
@@ -75,9 +71,9 @@
75 71
 #endif
76 72
 
77 73
 
78
-// --------------------------------------------------------------------------
74
+// ------------------------
79 75
 // Types
80
-// --------------------------------------------------------------------------
76
+// ------------------------
81 77
 
82 78
 #ifdef STM32GENERIC
83 79
   typedef struct {
@@ -89,15 +85,15 @@
89 85
   typedef stimer_t stm32f4_timer_t;
90 86
 #endif
91 87
 
92
-// --------------------------------------------------------------------------
88
+// ------------------------
93 89
 // Public Variables
94
-// --------------------------------------------------------------------------
90
+// ------------------------
95 91
 
96 92
 extern stm32f4_timer_t TimerHandle[];
97 93
 
98
-// --------------------------------------------------------------------------
94
+// ------------------------
99 95
 // Public functions
100
-// --------------------------------------------------------------------------
96
+// ------------------------
101 97
 
102 98
 void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
103 99
 void HAL_timer_enable_interrupt(const uint8_t timer_num);

+ 2
- 2
Marlin/src/HAL/HAL_STM32F7/EEPROM_Emul/eeprom_emul.h ファイルの表示

@@ -45,9 +45,9 @@
45 45
  *****************************************************************************/
46 46
 #pragma once
47 47
 
48
-// --------------------------------------------------------------------------
48
+// ------------------------
49 49
 // Includes
50
-// --------------------------------------------------------------------------
50
+// ------------------------
51 51
 #include "../../../inc/MarlinConfig.h"
52 52
 #include "../HAL.h"
53 53
 

+ 12
- 40
Marlin/src/HAL/HAL_STM32F7/EmulatedEeprom.cpp ファイルの表示

@@ -26,58 +26,30 @@
26 26
 
27 27
 #include "../../inc/MarlinConfig.h"
28 28
 
29
-// --------------------------------------------------------------------------
29
+// ------------------------
30 30
 // Includes
31
-// --------------------------------------------------------------------------
31
+// ------------------------
32 32
 
33 33
 #include "HAL.h"
34 34
 #include "EEPROM_Emul/eeprom_emul.h"
35 35
 
36
-
37
-// --------------------------------------------------------------------------
38
-// Externals
39
-// --------------------------------------------------------------------------
40
-
41
-// --------------------------------------------------------------------------
36
+// ------------------------
42 37
 // Local defines
43
-// --------------------------------------------------------------------------
44
-
45
-// --------------------------------------------------------------------------
46
-// Types
47
-// --------------------------------------------------------------------------
48
-
49
-// --------------------------------------------------------------------------
50
-// Variables
51
-// --------------------------------------------------------------------------
52
-
53
-// --------------------------------------------------------------------------
54
-// Public Variables
55
-// --------------------------------------------------------------------------
56
-
57
-// --------------------------------------------------------------------------
58
-// Private Variables
59
-// --------------------------------------------------------------------------
60
-static bool eeprom_initialized = false;
61
-// --------------------------------------------------------------------------
62
-// Function prototypes
63
-// --------------------------------------------------------------------------
64
-
65
-// --------------------------------------------------------------------------
66
-// Private functions
67
-// --------------------------------------------------------------------------
68
-
69
-// --------------------------------------------------------------------------
70
-// Public functions
71
-// --------------------------------------------------------------------------
38
+// ------------------------
72 39
 
73 40
 // FLASH_FLAG_PGSERR (Programming Sequence Error) was renamed to
74 41
 // FLASH_FLAG_ERSERR (Erasing Sequence Error) in STM32F7
75 42
 #define FLASH_FLAG_PGSERR FLASH_FLAG_ERSERR
76 43
 
77
-// --------------------------------------------------------------------------
78
-// EEPROM
79
-// --------------------------------------------------------------------------
44
+// ------------------------
45
+// Private Variables
46
+// ------------------------
80 47
 
48
+static bool eeprom_initialized = false;
49
+
50
+// ------------------------
51
+// Public functions
52
+// ------------------------
81 53
 
82 54
 void eeprom_init() {
83 55
   if (!eeprom_initialized) {

+ 6
- 38
Marlin/src/HAL/HAL_STM32F7/HAL.cpp ファイルの表示

@@ -23,51 +23,19 @@
23 23
 
24 24
 #ifdef STM32F7
25 25
 
26
-// --------------------------------------------------------------------------
27
-// Includes
28
-// --------------------------------------------------------------------------
29
-
30 26
 #include "HAL.h"
31 27
 
32 28
 //#include <Wire.h>
33 29
 
34
-// --------------------------------------------------------------------------
35
-// Externals
36
-// --------------------------------------------------------------------------
37
-
38
-// --------------------------------------------------------------------------
39
-// Local defines
40
-// --------------------------------------------------------------------------
41
-
42
-// --------------------------------------------------------------------------
43
-// Types
44
-// --------------------------------------------------------------------------
45
-
46
-// --------------------------------------------------------------------------
47
-// Variables
48
-// --------------------------------------------------------------------------
49
-
50
-// --------------------------------------------------------------------------
30
+// ------------------------
51 31
 // Public Variables
52
-// --------------------------------------------------------------------------
32
+// ------------------------
53 33
 
54 34
 uint16_t HAL_adc_result;
55 35
 
56
-// --------------------------------------------------------------------------
57
-// Private Variables
58
-// --------------------------------------------------------------------------
59
-
60
-// --------------------------------------------------------------------------
61
-// Function prototypes
62
-// --------------------------------------------------------------------------
63
-
64
-// --------------------------------------------------------------------------
65
-// Private functions
66
-// --------------------------------------------------------------------------
67
-
68
-// --------------------------------------------------------------------------
36
+// ------------------------
69 37
 // Public functions
70
-// --------------------------------------------------------------------------
38
+// ------------------------
71 39
 
72 40
 /* VGPV Done with defines
73 41
 // disable interrupts
@@ -124,9 +92,9 @@ extern "C" {
124 92
 }
125 93
 */
126 94
 
127
-// --------------------------------------------------------------------------
95
+// ------------------------
128 96
 // ADC
129
-// --------------------------------------------------------------------------
97
+// ------------------------
130 98
 
131 99
 void HAL_adc_start_conversion(const uint8_t adc_pin) {
132 100
   HAL_adc_result = analogRead(adc_pin);

+ 8
- 12
Marlin/src/HAL/HAL_STM32F7/HAL.h ファイルの表示

@@ -28,10 +28,6 @@
28 28
   #define vsnprintf_P vsnprintf
29 29
 #endif
30 30
 
31
-// --------------------------------------------------------------------------
32
-// Includes
33
-// --------------------------------------------------------------------------
34
-
35 31
 #include <stdint.h>
36 32
 
37 33
 #include "../shared/Marduino.h"
@@ -45,9 +41,9 @@
45 41
 
46 42
 #include "../../inc/MarlinConfigPre.h"
47 43
 
48
-// --------------------------------------------------------------------------
44
+// ------------------------
49 45
 // Defines
50
-// --------------------------------------------------------------------------
46
+// ------------------------
51 47
 
52 48
 //Serial override
53 49
 //extern HalSerial usb_serial;
@@ -125,22 +121,22 @@
125 121
 #undef pgm_read_ptr
126 122
 #define pgm_read_ptr(addr) (*(addr))
127 123
 
128
-// --------------------------------------------------------------------------
124
+// ------------------------
129 125
 // Types
130
-// --------------------------------------------------------------------------
126
+// ------------------------
131 127
 
132 128
 typedef int8_t pin_t;
133 129
 
134
-// --------------------------------------------------------------------------
130
+// ------------------------
135 131
 // Public Variables
136
-// --------------------------------------------------------------------------
132
+// ------------------------
137 133
 
138 134
 /** result of last ADC conversion */
139 135
 extern uint16_t HAL_adc_result;
140 136
 
141
-// --------------------------------------------------------------------------
137
+// ------------------------
142 138
 // Public functions
143
-// --------------------------------------------------------------------------
139
+// ------------------------
144 140
 
145 141
 // Memory related
146 142
 #define __bss_end __bss_end__

+ 8
- 12
Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp ファイルの表示

@@ -32,10 +32,6 @@
32 32
 
33 33
 #ifdef STM32F7
34 34
 
35
-// --------------------------------------------------------------------------
36
-// Includes
37
-// --------------------------------------------------------------------------
38
-
39 35
 #include "HAL.h"
40 36
 #include "../shared/HAL_SPI.h"
41 37
 #include <pins_arduino.h>
@@ -43,27 +39,27 @@
43 39
 #include "../../core/macros.h"
44 40
 #include <SPI.h>
45 41
 
46
-// --------------------------------------------------------------------------
42
+// ------------------------
47 43
 // Public Variables
48
-// --------------------------------------------------------------------------
44
+// ------------------------
49 45
 
50 46
 static SPISettings spiConfig;
51 47
 
52
-// --------------------------------------------------------------------------
48
+// ------------------------
53 49
 // Public functions
54
-// --------------------------------------------------------------------------
50
+// ------------------------
55 51
 
56 52
 #if ENABLED(SOFTWARE_SPI)
57
-  // --------------------------------------------------------------------------
53
+  // ------------------------
58 54
   // Software SPI
59
-  // --------------------------------------------------------------------------
55
+  // ------------------------
60 56
   #error "Software SPI not supported for STM32F7. Use hardware SPI."
61 57
 
62 58
 #else
63 59
 
64
-// --------------------------------------------------------------------------
60
+// ------------------------
65 61
 // Hardware SPI
66
-// --------------------------------------------------------------------------
62
+// ------------------------
67 63
 
68 64
 /**
69 65
  * VGPV SPI speed start and F_CPU/2, by default 72/2 = 36Mhz

+ 6
- 31
Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.cpp ファイルの表示

@@ -22,51 +22,26 @@
22 22
 
23 23
 #ifdef STM32F7
24 24
 
25
-// --------------------------------------------------------------------------
26
-// Includes
27
-// --------------------------------------------------------------------------
28
-
29 25
 #include "HAL.h"
30 26
 
31 27
 #include "HAL_timers_STM32F7.h"
32 28
 
33
-// --------------------------------------------------------------------------
34
-// Externals
35
-// --------------------------------------------------------------------------
36
-
37
-// --------------------------------------------------------------------------
29
+// ------------------------
38 30
 // Local defines
39
-// --------------------------------------------------------------------------
31
+// ------------------------
40 32
 
41 33
 #define NUM_HARDWARE_TIMERS 2
42 34
 
43 35
 //#define PRESCALER 1
44
-// --------------------------------------------------------------------------
45
-// Types
46
-// --------------------------------------------------------------------------
47
-
48
-
49
-// --------------------------------------------------------------------------
50
-// Public Variables
51
-// --------------------------------------------------------------------------
52
-
53
-// --------------------------------------------------------------------------
36
+// ------------------------
54 37
 // Private Variables
55
-// --------------------------------------------------------------------------
38
+// ------------------------
56 39
 
57 40
 tTimerConfig timerConfig[NUM_HARDWARE_TIMERS];
58 41
 
59
-// --------------------------------------------------------------------------
60
-// Function prototypes
61
-// --------------------------------------------------------------------------
62
-
63
-// --------------------------------------------------------------------------
64
-// Private functions
65
-// --------------------------------------------------------------------------
66
-
67
-// --------------------------------------------------------------------------
42
+// ------------------------
68 43
 // Public functions
69
-// --------------------------------------------------------------------------
44
+// ------------------------
70 45
 
71 46
 
72 47
 bool timers_initialized[NUM_HARDWARE_TIMERS] = {false};

+ 8
- 12
Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.h ファイルの表示

@@ -21,15 +21,11 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-// --------------------------------------------------------------------------
25
-// Includes
26
-// --------------------------------------------------------------------------
27
-
28 24
 #include <stdint.h>
29 25
 
30
-// --------------------------------------------------------------------------
26
+// ------------------------
31 27
 // Defines
32
-// --------------------------------------------------------------------------
28
+// ------------------------
33 29
 
34 30
 #define FORCE_INLINE __attribute__((always_inline)) inline
35 31
 
@@ -69,9 +65,9 @@ extern void TC7_Handler();
69 65
 #define HAL_STEP_TIMER_ISR()  void TC5_Handler()
70 66
 #define HAL_TEMP_TIMER_ISR()  void TC7_Handler()
71 67
 
72
-// --------------------------------------------------------------------------
68
+// ------------------------
73 69
 // Types
74
-// --------------------------------------------------------------------------
70
+// ------------------------
75 71
 
76 72
 typedef struct {
77 73
   TIM_HandleTypeDef timerdef;
@@ -79,15 +75,15 @@ typedef struct {
79 75
   uint32_t callback;
80 76
 } tTimerConfig;
81 77
 
82
-// --------------------------------------------------------------------------
78
+// ------------------------
83 79
 // Public Variables
84
-// --------------------------------------------------------------------------
80
+// ------------------------
85 81
 
86 82
 //extern const tTimerConfig timerConfig[];
87 83
 
88
-// --------------------------------------------------------------------------
84
+// ------------------------
89 85
 // Public functions
90
-// --------------------------------------------------------------------------
86
+// ------------------------
91 87
 
92 88
 void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
93 89
 void HAL_timer_enable_interrupt(const uint8_t timer_num);

+ 2
- 6
Marlin/src/HAL/HAL_TEENSY31_32/HAL_timers_Teensy.h ファイルの表示

@@ -28,15 +28,11 @@
28 28
 
29 29
 #pragma once
30 30
 
31
-// --------------------------------------------------------------------------
32
-// Includes
33
-// --------------------------------------------------------------------------
34
-
35 31
 #include <stdint.h>
36 32
 
37
-// --------------------------------------------------------------------------
33
+// ------------------------
38 34
 // Defines
39
-// --------------------------------------------------------------------------
35
+// ------------------------
40 36
 
41 37
 #define FORCE_INLINE __attribute__((always_inline)) inline
42 38
 

+ 2
- 6
Marlin/src/HAL/HAL_TEENSY35_36/HAL.h ファイルの表示

@@ -27,10 +27,6 @@
27 27
 
28 28
 #define CPU_32_BIT
29 29
 
30
-// --------------------------------------------------------------------------
31
-// Includes
32
-// --------------------------------------------------------------------------
33
-
34 30
 #include "../shared/Marduino.h"
35 31
 #include "../shared/math_32bit.h"
36 32
 #include "../shared/HAL_SPI.h"
@@ -47,9 +43,9 @@
47 43
 #define ST7920_DELAY_2 DELAY_NS(750)
48 44
 #define ST7920_DELAY_3 DELAY_NS(750)
49 45
 
50
-// --------------------------------------------------------------------------
46
+// ------------------------
51 47
 // Defines
52
-// --------------------------------------------------------------------------
48
+// ------------------------
53 49
 
54 50
 #define IS_32BIT_TEENSY (defined(__MK64FX512__) || defined(__MK66FX1M0__))
55 51
 #define IS_TEENSY35 defined(__MK64FX512__)

+ 2
- 6
Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h ファイルの表示

@@ -25,15 +25,11 @@
25 25
  * Teensy3.6 (__MK66FX1M0__)
26 26
  */
27 27
 
28
-// --------------------------------------------------------------------------
29
-// Includes
30
-// --------------------------------------------------------------------------
31
-
32 28
 #include <stdint.h>
33 29
 
34
-// --------------------------------------------------------------------------
30
+// ------------------------
35 31
 // Defines
36
-// --------------------------------------------------------------------------
32
+// ------------------------
37 33
 
38 34
 #define FORCE_INLINE __attribute__((always_inline)) inline
39 35
 

+ 5
- 37
Marlin/src/HAL/shared/I2cEeprom.cpp ファイルの表示

@@ -29,50 +29,18 @@
29 29
 
30 30
 #if ENABLED(I2C_EEPROM)
31 31
 
32
-// --------------------------------------------------------------------------
33
-// Includes
34
-// --------------------------------------------------------------------------
35
-
36 32
 #include "../HAL.h"
37 33
 #include <Wire.h>
38 34
 
39
-// --------------------------------------------------------------------------
40
-// Externals
41
-// --------------------------------------------------------------------------
42
-
43
-// --------------------------------------------------------------------------
44
-// Local defines
45
-// --------------------------------------------------------------------------
46
-
47
-// --------------------------------------------------------------------------
48
-// Types
49
-// --------------------------------------------------------------------------
50
-
51
-// --------------------------------------------------------------------------
52
-// Variables
53
-// --------------------------------------------------------------------------
54
-
55
-// --------------------------------------------------------------------------
56
-// Public Variables
57
-// --------------------------------------------------------------------------
58
-
59
-// --------------------------------------------------------------------------
35
+// ------------------------
60 36
 // Private Variables
61
-// --------------------------------------------------------------------------
62
-
63
-// --------------------------------------------------------------------------
64
-// Function prototypes
65
-// --------------------------------------------------------------------------
37
+// ------------------------
66 38
 
67
-// --------------------------------------------------------------------------
68
-// Private functions
69
-// --------------------------------------------------------------------------
39
+static uint8_t eeprom_device_address = 0x50;
70 40
 
71
-// --------------------------------------------------------------------------
41
+// ------------------------
72 42
 // Public functions
73
-// --------------------------------------------------------------------------
74
-
75
-static uint8_t eeprom_device_address = 0x50;
43
+// ------------------------
76 44
 
77 45
 static void eeprom_init(void) {
78 46
   static bool eeprom_initialized = false;

+ 2
- 2
buildroot/share/PlatformIO/variants/BIGTREE_GENERIC_STM32F407_5X/variant.cpp ファイルの表示

@@ -108,7 +108,7 @@ const PinName digitalPin[] = {
108 108
   PE_15, //D64 - 1:FSMC_D12
109 109
   PD_8,  //D65 - 1:FSMC_D13 / USART3_TX
110 110
   PD_9,  //D66 - 1:FSMC_D14 / USART3_RX
111
-  PD_10, //D67 - 1:FSMC_D15 
111
+  PD_10, //D67 - 1:FSMC_D15
112 112
   PD_11, //D68 - 1:FSMC_A16
113 113
   PD_12, //D69 - 1:FSMC_A17 / TIM4_CH1
114 114
   PD_13, //D70 - 1:FSMC_A18 / TIM4_CH2
@@ -220,7 +220,7 @@ const PinName digitalPin[] = {
220 220
 }
221 221
 #endif
222 222
 
223
-// ----------------------------------------------------------------------------
223
+// ------------------------
224 224
 
225 225
 #ifdef __cplusplus
226 226
 extern "C" {

+ 1
- 1
buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.cpp ファイルの表示

@@ -98,7 +98,7 @@ const PinName digitalPin[] = {
98 98
 }
99 99
 #endif
100 100
 
101
-// ----------------------------------------------------------------------------
101
+// ------------------------
102 102
 
103 103
 #ifdef __cplusplus
104 104
 extern "C" {

読み込み中…
キャンセル
保存