浏览代码

Use C++ language supported 'nullptr' (#13944)

Scott Lahteine 6 年前
父节点
当前提交
ad4ffa1d2f
没有帐户链接到提交者的电子邮件
共有 70 个文件被更改,包括 670 次插入668 次删除
  1. 22
    20
      Marlin/src/HAL/HAL_AVR/endstop_interrupts.h
  2. 12
    12
      Marlin/src/HAL/HAL_AVR/fast_pwm.cpp
  3. 146
    146
      Marlin/src/HAL/HAL_AVR/fastio_1280.h
  4. 94
    94
      Marlin/src/HAL/HAL_AVR/fastio_1281.h
  5. 38
    38
      Marlin/src/HAL/HAL_AVR/fastio_168.h
  6. 72
    72
      Marlin/src/HAL/HAL_AVR/fastio_644.h
  7. 106
    106
      Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h
  8. 1
    1
      Marlin/src/HAL/HAL_AVR/fastio_AVR.h
  9. 1
    1
      Marlin/src/HAL/HAL_DUE/G2_pins.h
  10. 1
    1
      Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp
  11. 3
    3
      Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp
  12. 6
    6
      Marlin/src/HAL/HAL_ESP32/i2s.cpp
  13. 4
    4
      Marlin/src/HAL/HAL_LINUX/hardware/Timer.cpp
  14. 2
    2
      Marlin/src/HAL/HAL_LINUX/persistent_store_impl.cpp
  15. 1
    1
      Marlin/src/HAL/HAL_STM32F1/HAL.cpp
  16. 1
    1
      Marlin/src/HAL/HAL_STM32F1/HAL.h
  17. 1
    1
      Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h
  18. 1
    1
      Marlin/src/HAL/HAL_STM32F1/u8g_com_stm32duino_fsmc.cpp
  19. 1
    1
      Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp
  20. 1
    1
      Marlin/src/HAL/shared/backtrace/unwarm.cpp
  21. 3
    3
      Marlin/src/HAL/shared/backtrace/unwarmbytab.cpp
  22. 1
    1
      Marlin/src/Marlin.cpp
  23. 1
    1
      Marlin/src/Marlin.h
  24. 1
    1
      Marlin/src/core/serial.cpp
  25. 2
    2
      Marlin/src/core/serial.h
  26. 5
    5
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  27. 1
    1
      Marlin/src/feature/host_actions.cpp
  28. 2
    2
      Marlin/src/feature/host_actions.h
  29. 1
    1
      Marlin/src/feature/twibus.cpp
  30. 1
    1
      Marlin/src/feature/twibus.h
  31. 1
    1
      Marlin/src/gcode/bedlevel/ubl/M421.cpp
  32. 1
    1
      Marlin/src/gcode/calibrate/G425.cpp
  33. 2
    2
      Marlin/src/gcode/calibrate/M100.cpp
  34. 4
    4
      Marlin/src/gcode/parser.cpp
  35. 7
    7
      Marlin/src/gcode/parser.h
  36. 10
    10
      Marlin/src/gcode/queue.cpp
  37. 3
    3
      Marlin/src/inc/SanityCheck.h
  38. 2
    2
      Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp
  39. 3
    3
      Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp
  40. 6
    6
      Marlin/src/lcd/dogm/u8g_fontutf8.cpp
  41. 3
    3
      Marlin/src/lcd/dogm/ultralcd_DOGM.cpp
  42. 1
    1
      Marlin/src/lcd/menu/game/invaders.cpp
  43. 3
    3
      Marlin/src/lcd/menu/menu.cpp
  44. 6
    6
      Marlin/src/lcd/menu/menu.h
  45. 1
    1
      Marlin/src/lcd/menu/menu_advanced.cpp
  46. 1
    1
      Marlin/src/lcd/menu/menu_bed_corners.cpp
  47. 2
    2
      Marlin/src/lcd/menu/menu_filament.cpp
  48. 5
    5
      Marlin/src/lcd/menu/menu_main.cpp
  49. 1
    1
      Marlin/src/lcd/menu/menu_mixer.cpp
  50. 1
    1
      Marlin/src/lcd/ultralcd.cpp
  51. 2
    2
      Marlin/src/lcd/ultralcd.h
  52. 1
    1
      Marlin/src/libs/L6470/L6470_Marlin.cpp
  53. 1
    1
      Marlin/src/libs/vector_3.cpp
  54. 2
    2
      Marlin/src/module/configuration_store.cpp
  55. 1
    1
      Marlin/src/module/configuration_store.h
  56. 1
    1
      Marlin/src/module/endstops.cpp
  57. 3
    3
      Marlin/src/module/planner.cpp
  58. 4
    4
      Marlin/src/module/planner.h
  59. 3
    3
      Marlin/src/module/stepper.cpp
  60. 1
    1
      Marlin/src/module/temperature.cpp
  61. 6
    6
      Marlin/src/module/thermistor/thermistors.h
  62. 2
    2
      Marlin/src/sd/SdBaseFile.cpp
  63. 15
    15
      Marlin/src/sd/cardreader.cpp
  64. 2
    2
      Marlin/src/sd/cardreader.h
  65. 15
    15
      Marlin/src/sd/usb_flashdrive/lib/Usb.cpp
  66. 2
    2
      Marlin/src/sd/usb_flashdrive/lib/UsbCore.h
  67. 1
    1
      Marlin/src/sd/usb_flashdrive/lib/address.h
  68. 8
    8
      Marlin/src/sd/usb_flashdrive/lib/masstorage.cpp
  69. 4
    4
      Marlin/src/sd/usb_flashdrive/lib/parsetools.h
  70. 1
    1
      buildroot/share/pin_interrupt_test/pin_interrupt_test.ino

+ 22
- 20
Marlin/src/HAL/HAL_AVR/endstop_interrupts.h 查看文件

54
   #undef  digitalPinToPCICR
54
   #undef  digitalPinToPCICR
55
   #define digitalPinToPCICR(p)    ( WITHIN(p, 10, 15) || \
55
   #define digitalPinToPCICR(p)    ( WITHIN(p, 10, 15) || \
56
                                     WITHIN(p, 50, 53) || \
56
                                     WITHIN(p, 50, 53) || \
57
-                                    WITHIN(p, 62, 69) ? &PCICR : (uint8_t*)0 )
57
+                                    WITHIN(p, 62, 69) ? &PCICR : nullptr )
58
   #undef  digitalPinToPCICRbit
58
   #undef  digitalPinToPCICRbit
59
   #define digitalPinToPCICRbit(p) ( WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? 0 : \
59
   #define digitalPinToPCICRbit(p) ( WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? 0 : \
60
                                     WITHIN(p, 14, 15) ? 1 : \
60
                                     WITHIN(p, 14, 15) ? 1 : \
64
   #define digitalPinToPCMSK(p)    ( WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? &PCMSK0 : \
64
   #define digitalPinToPCMSK(p)    ( WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? &PCMSK0 : \
65
                                     WITHIN(p, 14, 15) ? &PCMSK1 : \
65
                                     WITHIN(p, 14, 15) ? &PCMSK1 : \
66
                                     WITHIN(p, 62, 69) ? &PCMSK2 : \
66
                                     WITHIN(p, 62, 69) ? &PCMSK2 : \
67
-                                    (uint8_t *)0 )
67
+                                    nullptr )
68
   #undef  digitalPinToPCMSKbit
68
   #undef  digitalPinToPCMSKbit
69
   #define digitalPinToPCMSKbit(p) ( WITHIN(p, 10, 13) ? ((p) - 6) : \
69
   #define digitalPinToPCMSKbit(p) ( WITHIN(p, 10, 13) ? ((p) - 6) : \
70
                                     (p) == 14 || (p) == 51 ? 2 : \
70
                                     (p) == 14 || (p) == 51 ? 2 : \
78
 
78
 
79
 // Install Pin change interrupt for a pin. Can be called multiple times.
79
 // Install Pin change interrupt for a pin. Can be called multiple times.
80
 void pciSetup(const int8_t pin) {
80
 void pciSetup(const int8_t pin) {
81
-  SBI(*digitalPinToPCMSK(pin), digitalPinToPCMSKbit(pin));  // enable pin
82
-  SBI(PCIFR, digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
83
-  SBI(PCICR, digitalPinToPCICRbit(pin)); // enable interrupt for the group
81
+  if (digitalPinToPCMSK(pin) != nullptr) {
82
+    SBI(*digitalPinToPCMSK(pin), digitalPinToPCMSKbit(pin));  // enable pin
83
+    SBI(PCIFR, digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
84
+    SBI(PCICR, digitalPinToPCICRbit(pin)); // enable interrupt for the group
85
+  }
84
 }
86
 }
85
 
87
 
86
 // Handlers for pin change interrupts
88
 // Handlers for pin change interrupts
107
       attachInterrupt(digitalPinToInterrupt(X_MAX_PIN), endstop_ISR, CHANGE); // assign it
109
       attachInterrupt(digitalPinToInterrupt(X_MAX_PIN), endstop_ISR, CHANGE); // assign it
108
     #else
110
     #else
109
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
111
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
110
-      static_assert(digitalPinToPCICR(X_MAX_PIN) != NULL, "X_MAX_PIN is not interrupt-capable"); // if pin has no pin change interrupt - error
112
+      static_assert(digitalPinToPCICR(X_MAX_PIN), "X_MAX_PIN is not interrupt-capable"); // if pin has no pin change interrupt - error
111
       pciSetup(X_MAX_PIN);                                                            // assign it
113
       pciSetup(X_MAX_PIN);                                                            // assign it
112
     #endif
114
     #endif
113
   #endif
115
   #endif
117
       attachInterrupt(digitalPinToInterrupt(X_MIN_PIN), endstop_ISR, CHANGE);
119
       attachInterrupt(digitalPinToInterrupt(X_MIN_PIN), endstop_ISR, CHANGE);
118
     #else
120
     #else
119
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
121
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
120
-      static_assert(digitalPinToPCICR(X_MIN_PIN) != NULL, "X_MIN_PIN is not interrupt-capable");
122
+      static_assert(digitalPinToPCICR(X_MIN_PIN), "X_MIN_PIN is not interrupt-capable");
121
       pciSetup(X_MIN_PIN);
123
       pciSetup(X_MIN_PIN);
122
     #endif
124
     #endif
123
   #endif
125
   #endif
127
       attachInterrupt(digitalPinToInterrupt(Y_MAX_PIN), endstop_ISR, CHANGE);
129
       attachInterrupt(digitalPinToInterrupt(Y_MAX_PIN), endstop_ISR, CHANGE);
128
     #else
130
     #else
129
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
131
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
130
-      static_assert(digitalPinToPCICR(Y_MAX_PIN) != NULL, "Y_MAX_PIN is not interrupt-capable");
132
+      static_assert(digitalPinToPCICR(Y_MAX_PIN), "Y_MAX_PIN is not interrupt-capable");
131
       pciSetup(Y_MAX_PIN);
133
       pciSetup(Y_MAX_PIN);
132
     #endif
134
     #endif
133
   #endif
135
   #endif
137
       attachInterrupt(digitalPinToInterrupt(Y_MIN_PIN), endstop_ISR, CHANGE);
139
       attachInterrupt(digitalPinToInterrupt(Y_MIN_PIN), endstop_ISR, CHANGE);
138
     #else
140
     #else
139
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
141
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
140
-      static_assert(digitalPinToPCICR(Y_MIN_PIN) != NULL, "Y_MIN_PIN is not interrupt-capable");
142
+      static_assert(digitalPinToPCICR(Y_MIN_PIN), "Y_MIN_PIN is not interrupt-capable");
141
       pciSetup(Y_MIN_PIN);
143
       pciSetup(Y_MIN_PIN);
142
     #endif
144
     #endif
143
   #endif
145
   #endif
147
       attachInterrupt(digitalPinToInterrupt(Z_MAX_PIN), endstop_ISR, CHANGE);
149
       attachInterrupt(digitalPinToInterrupt(Z_MAX_PIN), endstop_ISR, CHANGE);
148
     #else
150
     #else
149
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
151
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
150
-      static_assert(digitalPinToPCICR(Z_MAX_PIN) != NULL, "Z_MAX_PIN is not interrupt-capable");
152
+      static_assert(digitalPinToPCICR(Z_MAX_PIN), "Z_MAX_PIN is not interrupt-capable");
151
       pciSetup(Z_MAX_PIN);
153
       pciSetup(Z_MAX_PIN);
152
     #endif
154
     #endif
153
   #endif
155
   #endif
157
       attachInterrupt(digitalPinToInterrupt(Z_MIN_PIN), endstop_ISR, CHANGE);
159
       attachInterrupt(digitalPinToInterrupt(Z_MIN_PIN), endstop_ISR, CHANGE);
158
     #else
160
     #else
159
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
161
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
160
-      static_assert(digitalPinToPCICR(Z_MIN_PIN) != NULL, "Z_MIN_PIN is not interrupt-capable");
162
+      static_assert(digitalPinToPCICR(Z_MIN_PIN), "Z_MIN_PIN is not interrupt-capable");
161
       pciSetup(Z_MIN_PIN);
163
       pciSetup(Z_MIN_PIN);
162
     #endif
164
     #endif
163
   #endif
165
   #endif
167
       attachInterrupt(digitalPinToInterrupt(X2_MAX_PIN), endstop_ISR, CHANGE);
169
       attachInterrupt(digitalPinToInterrupt(X2_MAX_PIN), endstop_ISR, CHANGE);
168
     #else
170
     #else
169
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
171
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
170
-      static_assert(digitalPinToPCICR(X2_MAX_PIN) != NULL, "X2_MAX_PIN is not interrupt-capable");
172
+      static_assert(digitalPinToPCICR(X2_MAX_PIN), "X2_MAX_PIN is not interrupt-capable");
171
       pciSetup(X2_MAX_PIN);
173
       pciSetup(X2_MAX_PIN);
172
     #endif
174
     #endif
173
   #endif
175
   #endif
177
       attachInterrupt(digitalPinToInterrupt(X2_MIN_PIN), endstop_ISR, CHANGE);
179
       attachInterrupt(digitalPinToInterrupt(X2_MIN_PIN), endstop_ISR, CHANGE);
178
     #else
180
     #else
179
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
181
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
180
-      static_assert(digitalPinToPCICR(X2_MIN_PIN) != NULL, "X2_MIN_PIN is not interrupt-capable");
182
+      static_assert(digitalPinToPCICR(X2_MIN_PIN), "X2_MIN_PIN is not interrupt-capable");
181
       pciSetup(X2_MIN_PIN);
183
       pciSetup(X2_MIN_PIN);
182
     #endif
184
     #endif
183
   #endif
185
   #endif
187
       attachInterrupt(digitalPinToInterrupt(Y2_MAX_PIN), endstop_ISR, CHANGE);
189
       attachInterrupt(digitalPinToInterrupt(Y2_MAX_PIN), endstop_ISR, CHANGE);
188
     #else
190
     #else
189
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
191
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
190
-      static_assert(digitalPinToPCICR(Y2_MAX_PIN) != NULL, "Y2_MAX_PIN is not interrupt-capable");
192
+      static_assert(digitalPinToPCICR(Y2_MAX_PIN), "Y2_MAX_PIN is not interrupt-capable");
191
       pciSetup(Y2_MAX_PIN);
193
       pciSetup(Y2_MAX_PIN);
192
     #endif
194
     #endif
193
   #endif
195
   #endif
197
       attachInterrupt(digitalPinToInterrupt(Y2_MIN_PIN), endstop_ISR, CHANGE);
199
       attachInterrupt(digitalPinToInterrupt(Y2_MIN_PIN), endstop_ISR, CHANGE);
198
     #else
200
     #else
199
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
201
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
200
-      static_assert(digitalPinToPCICR(Y2_MIN_PIN) != NULL, "Y2_MIN_PIN is not interrupt-capable");
202
+      static_assert(digitalPinToPCICR(Y2_MIN_PIN), "Y2_MIN_PIN is not interrupt-capable");
201
       pciSetup(Y2_MIN_PIN);
203
       pciSetup(Y2_MIN_PIN);
202
     #endif
204
     #endif
203
   #endif
205
   #endif
207
       attachInterrupt(digitalPinToInterrupt(Z2_MAX_PIN), endstop_ISR, CHANGE);
209
       attachInterrupt(digitalPinToInterrupt(Z2_MAX_PIN), endstop_ISR, CHANGE);
208
     #else
210
     #else
209
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
211
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
210
-      static_assert(digitalPinToPCICR(Z2_MAX_PIN) != NULL, "Z2_MAX_PIN is not interrupt-capable");
212
+      static_assert(digitalPinToPCICR(Z2_MAX_PIN), "Z2_MAX_PIN is not interrupt-capable");
211
       pciSetup(Z2_MAX_PIN);
213
       pciSetup(Z2_MAX_PIN);
212
     #endif
214
     #endif
213
   #endif
215
   #endif
217
       attachInterrupt(digitalPinToInterrupt(Z2_MIN_PIN), endstop_ISR, CHANGE);
219
       attachInterrupt(digitalPinToInterrupt(Z2_MIN_PIN), endstop_ISR, CHANGE);
218
     #else
220
     #else
219
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
221
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
220
-      static_assert(digitalPinToPCICR(Z2_MIN_PIN) != NULL, "Z2_MIN_PIN is not interrupt-capable");
222
+      static_assert(digitalPinToPCICR(Z2_MIN_PIN), "Z2_MIN_PIN is not interrupt-capable");
221
       pciSetup(Z2_MIN_PIN);
223
       pciSetup(Z2_MIN_PIN);
222
     #endif
224
     #endif
223
   #endif
225
   #endif
227
       attachInterrupt(digitalPinToInterrupt(Z3_MAX_PIN), endstop_ISR, CHANGE);
229
       attachInterrupt(digitalPinToInterrupt(Z3_MAX_PIN), endstop_ISR, CHANGE);
228
     #else
230
     #else
229
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
231
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
230
-      static_assert(digitalPinToPCICR(Z3_MAX_PIN) != NULL, "Z3_MAX_PIN is not interrupt-capable");
232
+      static_assert(digitalPinToPCICR(Z3_MAX_PIN), "Z3_MAX_PIN is not interrupt-capable");
231
       pciSetup(Z3_MAX_PIN);
233
       pciSetup(Z3_MAX_PIN);
232
     #endif
234
     #endif
233
   #endif
235
   #endif
237
       attachInterrupt(digitalPinToInterrupt(Z3_MIN_PIN), endstop_ISR, CHANGE);
239
       attachInterrupt(digitalPinToInterrupt(Z3_MIN_PIN), endstop_ISR, CHANGE);
238
     #else
240
     #else
239
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
241
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
240
-      static_assert(digitalPinToPCICR(Z3_MIN_PIN) != NULL, "Z3_MIN_PIN is not interrupt-capable");
242
+      static_assert(digitalPinToPCICR(Z3_MIN_PIN), "Z3_MIN_PIN is not interrupt-capable");
241
       pciSetup(Z3_MIN_PIN);
243
       pciSetup(Z3_MIN_PIN);
242
     #endif
244
     #endif
243
   #endif
245
   #endif
247
       attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
249
       attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
248
     #else
250
     #else
249
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
251
       // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
250
-      static_assert(digitalPinToPCICR(Z_MIN_PROBE_PIN) != NULL, "Z_MIN_PROBE_PIN is not interrupt-capable");
252
+      static_assert(digitalPinToPCICR(Z_MIN_PROBE_PIN), "Z_MIN_PROBE_PIN is not interrupt-capable");
251
       pciSetup(Z_MIN_PROBE_PIN);
253
       pciSetup(Z_MIN_PROBE_PIN);
252
     #endif
254
     #endif
253
   #endif
255
   #endif

+ 12
- 12
Marlin/src/HAL/HAL_AVR/fast_pwm.cpp 查看文件

38
         #ifdef TCCR2
38
         #ifdef TCCR2
39
           case TIMER2: {
39
           case TIMER2: {
40
             Timer timer = {
40
             Timer timer = {
41
-              /*TCCRnQ*/  { &TCCR2, NULL, NULL},
42
-              /*OCRnQ*/   { (uint16_t*)&OCR2, NULL, NULL},
43
-              /*ICRn*/      NULL,
41
+              /*TCCRnQ*/  { &TCCR2, nullptr, nullptr},
42
+              /*OCRnQ*/   { (uint16_t*)&OCR2, nullptr, nullptr},
43
+              /*ICRn*/      nullptr,
44
               /*n, q*/      2, 0
44
               /*n, q*/      2, 0
45
             };
45
             };
46
           }
46
           }
49
             case TIMER2A:   break; // protect TIMER2A
49
             case TIMER2A:   break; // protect TIMER2A
50
             case TIMER2B: {
50
             case TIMER2B: {
51
               Timer timer = {
51
               Timer timer = {
52
-                /*TCCRnQ*/  { &TCCR2A,  &TCCR2B,  NULL},
53
-                /*OCRnQ*/   { (uint16_t*)&OCR2A, (uint16_t*)&OCR2B, NULL},
54
-                /*ICRn*/      NULL,
52
+                /*TCCRnQ*/  { &TCCR2A,  &TCCR2B,  nullptr},
53
+                /*OCRnQ*/   { (uint16_t*)&OCR2A, (uint16_t*)&OCR2B, nullptr},
54
+                /*ICRn*/      nullptr,
55
                 /*n, q*/      2, 1
55
                 /*n, q*/      2, 1
56
               };
56
               };
57
               return timer;
57
               return timer;
60
             case TIMER2B:   ++q;
60
             case TIMER2B:   ++q;
61
             case TIMER2A: {
61
             case TIMER2A: {
62
               Timer timer = {
62
               Timer timer = {
63
-                /*TCCRnQ*/  { &TCCR2A,  &TCCR2B,  NULL},
64
-                /*OCRnQ*/   { (uint16_t*)&OCR2A, (uint16_t*)&OCR2B, NULL},
65
-                /*ICRn*/      NULL,
63
+                /*TCCRnQ*/  { &TCCR2A,  &TCCR2B,  nullptr},
64
+                /*OCRnQ*/   { (uint16_t*)&OCR2A, (uint16_t*)&OCR2B, nullptr},
65
+                /*ICRn*/      nullptr,
66
                               2, q
66
                               2, q
67
               };
67
               };
68
               return timer;
68
               return timer;
111
       #endif
111
       #endif
112
     }
112
     }
113
     Timer timer = {
113
     Timer timer = {
114
-        /*TCCRnQ*/  { NULL, NULL, NULL},
115
-        /*OCRnQ*/   { NULL, NULL, NULL},
116
-        /*ICRn*/      NULL,
114
+        /*TCCRnQ*/  { nullptr, nullptr, nullptr},
115
+        /*OCRnQ*/   { nullptr, nullptr, nullptr},
116
+        /*ICRn*/      nullptr,
117
                       0, 0
117
                       0, 0
118
     };
118
     };
119
     return timer;
119
     return timer;

+ 146
- 146
Marlin/src/HAL/HAL_AVR/fastio_1280.h
文件差异内容过多而无法显示
查看文件


+ 94
- 94
Marlin/src/HAL/HAL_AVR/fastio_1281.h 查看文件

63
 #define DIO0_RPORT  PINE
63
 #define DIO0_RPORT  PINE
64
 #define DIO0_WPORT  PORTE
64
 #define DIO0_WPORT  PORTE
65
 #define DIO0_DDR    DDRE
65
 #define DIO0_DDR    DDRE
66
-#define DIO0_PWM    NULL
66
+#define DIO0_PWM    nullptr
67
 
67
 
68
 #define DIO1_PIN    PINE1
68
 #define DIO1_PIN    PINE1
69
 #define DIO1_RPORT  PINE
69
 #define DIO1_RPORT  PINE
70
 #define DIO1_WPORT  PORTE
70
 #define DIO1_WPORT  PORTE
71
 #define DIO1_DDR    DDRE
71
 #define DIO1_DDR    DDRE
72
-#define DIO1_PWM    NULL
72
+#define DIO1_PWM    nullptr
73
 
73
 
74
 #define DIO2_PIN    PINE4
74
 #define DIO2_PIN    PINE4
75
 #define DIO2_RPORT  PINE
75
 #define DIO2_RPORT  PINE
123
 #define DIO10_RPORT PINB
123
 #define DIO10_RPORT PINB
124
 #define DIO10_WPORT PORTB
124
 #define DIO10_WPORT PORTB
125
 #define DIO10_DDR   DDRB
125
 #define DIO10_DDR   DDRB
126
-#define DIO10_PWM   NULL
126
+#define DIO10_PWM   nullptr
127
 
127
 
128
 #define DIO11_PIN   PINB2
128
 #define DIO11_PIN   PINB2
129
 #define DIO11_RPORT PINB
129
 #define DIO11_RPORT PINB
130
 #define DIO11_WPORT PORTB
130
 #define DIO11_WPORT PORTB
131
 #define DIO11_DDR   DDRB
131
 #define DIO11_DDR   DDRB
132
-#define DIO11_PWM   NULL
132
+#define DIO11_PWM   nullptr
133
 
133
 
134
 #define DIO12_PIN   PINB3
134
 #define DIO12_PIN   PINB3
135
 #define DIO12_RPORT PINB
135
 #define DIO12_RPORT PINB
136
 #define DIO12_WPORT PORTB
136
 #define DIO12_WPORT PORTB
137
 #define DIO12_DDR   DDRB
137
 #define DIO12_DDR   DDRB
138
-#define DIO12_PWM   NULL
138
+#define DIO12_PWM   nullptr
139
 
139
 
140
 #define DIO13_PIN   PINE2
140
 #define DIO13_PIN   PINE2
141
 #define DIO13_RPORT PINE
141
 #define DIO13_RPORT PINE
142
 #define DIO13_WPORT PORTE
142
 #define DIO13_WPORT PORTE
143
 #define DIO13_DDR   DDRE
143
 #define DIO13_DDR   DDRE
144
-#define DIO13_PWM   NULL
144
+#define DIO13_PWM   nullptr
145
 
145
 
146
 #define DIO14_PIN   PINE6
146
 #define DIO14_PIN   PINE6
147
 #define DIO14_RPORT PINE
147
 #define DIO14_RPORT PINE
148
 #define DIO14_WPORT PORTE
148
 #define DIO14_WPORT PORTE
149
 #define DIO14_DDR   DDRE
149
 #define DIO14_DDR   DDRE
150
-#define DIO14_PWM   NULL
150
+#define DIO14_PWM   nullptr
151
 
151
 
152
 #define DIO15_PIN   PINE7
152
 #define DIO15_PIN   PINE7
153
 #define DIO15_RPORT PINE
153
 #define DIO15_RPORT PINE
154
 #define DIO15_WPORT PORTE
154
 #define DIO15_WPORT PORTE
155
 #define DIO15_DDR   DDRE
155
 #define DIO15_DDR   DDRE
156
-#define DIO15_PWM   NULL
156
+#define DIO15_PWM   nullptr
157
 
157
 
158
 #define DIO16_PIN   PINB0
158
 #define DIO16_PIN   PINB0
159
 #define DIO16_RPORT PINB
159
 #define DIO16_RPORT PINB
160
 #define DIO16_WPORT PORTB
160
 #define DIO16_WPORT PORTB
161
 #define DIO16_DDR   DDRB
161
 #define DIO16_DDR   DDRB
162
-#define DIO16_PWM   NULL
162
+#define DIO16_PWM   nullptr
163
 
163
 
164
 #define DIO17_PIN   PIND0
164
 #define DIO17_PIN   PIND0
165
 #define DIO17_RPORT PIND
165
 #define DIO17_RPORT PIND
166
 #define DIO17_WPORT PORTD
166
 #define DIO17_WPORT PORTD
167
 #define DIO17_DDR   DDRD
167
 #define DIO17_DDR   DDRD
168
-#define DIO17_PWM   NULL
168
+#define DIO17_PWM   nullptr
169
 
169
 
170
 #define DIO18_PIN   PIND1
170
 #define DIO18_PIN   PIND1
171
 #define DIO18_RPORT PIND
171
 #define DIO18_RPORT PIND
172
 #define DIO18_WPORT PORTD
172
 #define DIO18_WPORT PORTD
173
 #define DIO18_DDR   DDRD
173
 #define DIO18_DDR   DDRD
174
-#define DIO18_PWM   NULL
174
+#define DIO18_PWM   nullptr
175
 
175
 
176
 #define DIO19_PIN   PIND2
176
 #define DIO19_PIN   PIND2
177
 #define DIO19_RPORT PIND
177
 #define DIO19_RPORT PIND
178
 #define DIO19_WPORT PORTD
178
 #define DIO19_WPORT PORTD
179
 #define DIO19_DDR   DDRD
179
 #define DIO19_DDR   DDRD
180
-#define DIO19_PWM   NULL
180
+#define DIO19_PWM   nullptr
181
 
181
 
182
 #define DIO20_PIN   PIND3
182
 #define DIO20_PIN   PIND3
183
 #define DIO20_RPORT PIND
183
 #define DIO20_RPORT PIND
184
 #define DIO20_WPORT PORTD
184
 #define DIO20_WPORT PORTD
185
 #define DIO20_DDR   DDRD
185
 #define DIO20_DDR   DDRD
186
-#define DIO20_PWM   NULL
186
+#define DIO20_PWM   nullptr
187
 
187
 
188
 #define DIO21_PIN   PIND4
188
 #define DIO21_PIN   PIND4
189
 #define DIO21_RPORT PIND
189
 #define DIO21_RPORT PIND
190
 #define DIO21_WPORT PORTD
190
 #define DIO21_WPORT PORTD
191
 #define DIO21_DDR   DDRD
191
 #define DIO21_DDR   DDRD
192
-#define DIO21_PWM   NULL
192
+#define DIO21_PWM   nullptr
193
 
193
 
194
 #define DIO22_PIN   PIND5
194
 #define DIO22_PIN   PIND5
195
 #define DIO22_RPORT PIND
195
 #define DIO22_RPORT PIND
196
 #define DIO22_WPORT PORTD
196
 #define DIO22_WPORT PORTD
197
 #define DIO22_DDR   DDRD
197
 #define DIO22_DDR   DDRD
198
-#define DIO22_PWM   NULL
198
+#define DIO22_PWM   nullptr
199
 
199
 
200
 #define DIO23_PIN   PIND6
200
 #define DIO23_PIN   PIND6
201
 #define DIO23_RPORT PIND
201
 #define DIO23_RPORT PIND
202
 #define DIO23_WPORT PORTD
202
 #define DIO23_WPORT PORTD
203
 #define DIO23_DDR   DDRD
203
 #define DIO23_DDR   DDRD
204
-#define DIO23_PWM   NULL
204
+#define DIO23_PWM   nullptr
205
 
205
 
206
 #define DIO24_PIN   PIND7
206
 #define DIO24_PIN   PIND7
207
 #define DIO24_RPORT PIND
207
 #define DIO24_RPORT PIND
208
 #define DIO24_WPORT PORTD
208
 #define DIO24_WPORT PORTD
209
 #define DIO24_DDR   DDRD
209
 #define DIO24_DDR   DDRD
210
-#define DIO24_PWM   NULL
210
+#define DIO24_PWM   nullptr
211
 
211
 
212
 #define DIO25_PIN   PING0
212
 #define DIO25_PIN   PING0
213
 #define DIO25_RPORT PING
213
 #define DIO25_RPORT PING
214
 #define DIO25_WPORT PORTG
214
 #define DIO25_WPORT PORTG
215
 #define DIO25_DDR   DDRG
215
 #define DIO25_DDR   DDRG
216
-#define DIO25_PWM   NULL
216
+#define DIO25_PWM   nullptr
217
 
217
 
218
 #define DIO26_PIN   PING1
218
 #define DIO26_PIN   PING1
219
 #define DIO26_RPORT PING
219
 #define DIO26_RPORT PING
220
 #define DIO26_WPORT PORTG
220
 #define DIO26_WPORT PORTG
221
 #define DIO26_DDR   DDRG
221
 #define DIO26_DDR   DDRG
222
-#define DIO26_PWM   NULL
222
+#define DIO26_PWM   nullptr
223
 
223
 
224
 #define DIO27_PIN   PING2
224
 #define DIO27_PIN   PING2
225
 #define DIO27_RPORT PING
225
 #define DIO27_RPORT PING
226
 #define DIO27_WPORT PORTG
226
 #define DIO27_WPORT PORTG
227
 #define DIO27_DDR   DDRG
227
 #define DIO27_DDR   DDRG
228
-#define DIO27_PWM   NULL
228
+#define DIO27_PWM   nullptr
229
 
229
 
230
 #define DIO28_PIN   PING3
230
 #define DIO28_PIN   PING3
231
 #define DIO28_RPORT PING
231
 #define DIO28_RPORT PING
232
 #define DIO28_WPORT PORTG
232
 #define DIO28_WPORT PORTG
233
 #define DIO28_DDR   DDRG
233
 #define DIO28_DDR   DDRG
234
-#define DIO28_PWM   NULL
234
+#define DIO28_PWM   nullptr
235
 
235
 
236
 #define DIO29_PIN   PING4
236
 #define DIO29_PIN   PING4
237
 #define DIO29_RPORT PING
237
 #define DIO29_RPORT PING
238
 #define DIO29_WPORT PORTG
238
 #define DIO29_WPORT PORTG
239
 #define DIO29_DDR   DDRG
239
 #define DIO29_DDR   DDRG
240
-#define DIO29_PWM   NULL
240
+#define DIO29_PWM   nullptr
241
 
241
 
242
 #define DIO30_PIN   PINC0
242
 #define DIO30_PIN   PINC0
243
 #define DIO30_RPORT PINC
243
 #define DIO30_RPORT PINC
244
 #define DIO30_WPORT PORTC
244
 #define DIO30_WPORT PORTC
245
 #define DIO30_DDR   DDRC
245
 #define DIO30_DDR   DDRC
246
-#define DIO30_PWM   NULL
246
+#define DIO30_PWM   nullptr
247
 
247
 
248
 #define DIO31_PIN   PINC1
248
 #define DIO31_PIN   PINC1
249
 #define DIO31_RPORT PINC
249
 #define DIO31_RPORT PINC
250
 #define DIO31_WPORT PORTC
250
 #define DIO31_WPORT PORTC
251
 #define DIO31_DDR   DDRC
251
 #define DIO31_DDR   DDRC
252
-#define DIO31_PWM   NULL
252
+#define DIO31_PWM   nullptr
253
 
253
 
254
 #define DIO32_PIN   PINC2
254
 #define DIO32_PIN   PINC2
255
 #define DIO32_RPORT PINC
255
 #define DIO32_RPORT PINC
256
 #define DIO32_WPORT PORTC
256
 #define DIO32_WPORT PORTC
257
 #define DIO32_DDR   DDRC
257
 #define DIO32_DDR   DDRC
258
-#define DIO32_PWM   NULL
258
+#define DIO32_PWM   nullptr
259
 
259
 
260
 #define DIO33_PIN   PINC3
260
 #define DIO33_PIN   PINC3
261
 #define DIO33_RPORT PINC
261
 #define DIO33_RPORT PINC
262
 #define DIO33_WPORT PORTC
262
 #define DIO33_WPORT PORTC
263
 #define DIO33_DDR   DDRC
263
 #define DIO33_DDR   DDRC
264
-#define DIO33_PWM   NULL
264
+#define DIO33_PWM   nullptr
265
 
265
 
266
 #define DIO34_PIN   PINC4
266
 #define DIO34_PIN   PINC4
267
 #define DIO34_RPORT PINC
267
 #define DIO34_RPORT PINC
268
 #define DIO34_WPORT PORTC
268
 #define DIO34_WPORT PORTC
269
 #define DIO34_DDR   DDRC
269
 #define DIO34_DDR   DDRC
270
-#define DIO34_PWM   NULL
270
+#define DIO34_PWM   nullptr
271
 
271
 
272
 #define DIO35_PIN   PINC5
272
 #define DIO35_PIN   PINC5
273
 #define DIO35_RPORT PINC
273
 #define DIO35_RPORT PINC
274
 #define DIO35_WPORT PORTC
274
 #define DIO35_WPORT PORTC
275
 #define DIO35_DDR   DDRC
275
 #define DIO35_DDR   DDRC
276
-#define DIO35_PWM   NULL
276
+#define DIO35_PWM   nullptr
277
 
277
 
278
 #define DIO36_PIN   PINC6
278
 #define DIO36_PIN   PINC6
279
 #define DIO36_RPORT PINC
279
 #define DIO36_RPORT PINC
280
 #define DIO36_WPORT PORTC
280
 #define DIO36_WPORT PORTC
281
 #define DIO36_DDR   DDRC
281
 #define DIO36_DDR   DDRC
282
-#define DIO36_PWM   NULL
282
+#define DIO36_PWM   nullptr
283
 
283
 
284
 #define DIO37_PIN   PINC7
284
 #define DIO37_PIN   PINC7
285
 #define DIO37_RPORT PINC
285
 #define DIO37_RPORT PINC
286
 #define DIO37_WPORT PORTC
286
 #define DIO37_WPORT PORTC
287
 #define DIO37_DDR   DDRC
287
 #define DIO37_DDR   DDRC
288
-#define DIO37_PWM   NULL
288
+#define DIO37_PWM   nullptr
289
 
289
 
290
 #define DIO38_PIN   PINA0
290
 #define DIO38_PIN   PINA0
291
 #define DIO38_RPORT PINA
291
 #define DIO38_RPORT PINA
292
 #define DIO38_WPORT PORTA
292
 #define DIO38_WPORT PORTA
293
 #define DIO38_DDR   DDRA
293
 #define DIO38_DDR   DDRA
294
-#define DIO38_PWM   NULL
294
+#define DIO38_PWM   nullptr
295
 
295
 
296
 #define DIO39_PIN   PINA1
296
 #define DIO39_PIN   PINA1
297
 #define DIO39_RPORT PINA
297
 #define DIO39_RPORT PINA
298
 #define DIO39_WPORT PORTA
298
 #define DIO39_WPORT PORTA
299
 #define DIO39_DDR   DDRA
299
 #define DIO39_DDR   DDRA
300
-#define DIO39_PWM   NULL
300
+#define DIO39_PWM   nullptr
301
 
301
 
302
 #define DIO40_PIN   PINA2
302
 #define DIO40_PIN   PINA2
303
 #define DIO40_RPORT PINA
303
 #define DIO40_RPORT PINA
304
 #define DIO40_WPORT PORTA
304
 #define DIO40_WPORT PORTA
305
 #define DIO40_DDR   DDRA
305
 #define DIO40_DDR   DDRA
306
-#define DIO40_PWM   NULL
306
+#define DIO40_PWM   nullptr
307
 
307
 
308
 #define DIO41_PIN   PINA3
308
 #define DIO41_PIN   PINA3
309
 #define DIO41_RPORT PINA
309
 #define DIO41_RPORT PINA
310
 #define DIO41_WPORT PORTA
310
 #define DIO41_WPORT PORTA
311
 #define DIO41_DDR   DDRA
311
 #define DIO41_DDR   DDRA
312
-#define DIO41_PWM   NULL
312
+#define DIO41_PWM   nullptr
313
 
313
 
314
 #define DIO42_PIN   PINA4
314
 #define DIO42_PIN   PINA4
315
 #define DIO42_RPORT PINA
315
 #define DIO42_RPORT PINA
316
 #define DIO42_WPORT PORTA
316
 #define DIO42_WPORT PORTA
317
 #define DIO42_DDR   DDRA
317
 #define DIO42_DDR   DDRA
318
-#define DIO42_PWM   NULL
318
+#define DIO42_PWM   nullptr
319
 
319
 
320
 #define DIO43_PIN   PINA5
320
 #define DIO43_PIN   PINA5
321
 #define DIO43_RPORT PINA
321
 #define DIO43_RPORT PINA
322
 #define DIO43_WPORT PORTA
322
 #define DIO43_WPORT PORTA
323
 #define DIO43_DDR   DDRA
323
 #define DIO43_DDR   DDRA
324
-#define DIO43_PWM   NULL
324
+#define DIO43_PWM   nullptr
325
 
325
 
326
 #define DIO44_PIN   PINA6
326
 #define DIO44_PIN   PINA6
327
 #define DIO44_RPORT PINA
327
 #define DIO44_RPORT PINA
328
 #define DIO44_WPORT PORTA
328
 #define DIO44_WPORT PORTA
329
 #define DIO44_DDR   DDRA
329
 #define DIO44_DDR   DDRA
330
-#define DIO44_PWM   NULL
330
+#define DIO44_PWM   nullptr
331
 
331
 
332
 #define DIO45_PIN   PINA7
332
 #define DIO45_PIN   PINA7
333
 #define DIO45_RPORT PINA
333
 #define DIO45_RPORT PINA
334
 #define DIO45_WPORT PORTA
334
 #define DIO45_WPORT PORTA
335
 #define DIO45_DDR   DDRA
335
 #define DIO45_DDR   DDRA
336
-#define DIO45_PWM   NULL
336
+#define DIO45_PWM   nullptr
337
 
337
 
338
 #define DIO46_PIN   PINF0
338
 #define DIO46_PIN   PINF0
339
 #define DIO46_RPORT PINF
339
 #define DIO46_RPORT PINF
340
 #define DIO46_WPORT PORTF
340
 #define DIO46_WPORT PORTF
341
 #define DIO46_DDR   DDRF
341
 #define DIO46_DDR   DDRF
342
-#define DIO46_PWM   NULL
342
+#define DIO46_PWM   nullptr
343
 
343
 
344
 #define DIO47_PIN   PINF1
344
 #define DIO47_PIN   PINF1
345
 #define DIO47_RPORT PINF
345
 #define DIO47_RPORT PINF
346
 #define DIO47_WPORT PORTF
346
 #define DIO47_WPORT PORTF
347
 #define DIO47_DDR   DDRF
347
 #define DIO47_DDR   DDRF
348
-#define DIO47_PWM   NULL
348
+#define DIO47_PWM   nullptr
349
 
349
 
350
 #define DIO48_PIN   PINF2
350
 #define DIO48_PIN   PINF2
351
 #define DIO48_RPORT PINF
351
 #define DIO48_RPORT PINF
352
 #define DIO48_WPORT PORTF
352
 #define DIO48_WPORT PORTF
353
 #define DIO48_DDR   DDRF
353
 #define DIO48_DDR   DDRF
354
-#define DIO48_PWM   NULL
354
+#define DIO48_PWM   nullptr
355
 
355
 
356
 #define DIO49_PIN   PINF3
356
 #define DIO49_PIN   PINF3
357
 #define DIO49_RPORT PINF
357
 #define DIO49_RPORT PINF
358
 #define DIO49_WPORT PORTF
358
 #define DIO49_WPORT PORTF
359
 #define DIO49_DDR   DDRF
359
 #define DIO49_DDR   DDRF
360
-#define DIO49_PWM   NULL
360
+#define DIO49_PWM   nullptr
361
 
361
 
362
 #define DIO50_PIN   PINF4
362
 #define DIO50_PIN   PINF4
363
 #define DIO50_RPORT PINF
363
 #define DIO50_RPORT PINF
364
 #define DIO50_WPORT PORTF
364
 #define DIO50_WPORT PORTF
365
 #define DIO50_DDR   DDRF
365
 #define DIO50_DDR   DDRF
366
-#define DIO50_PWM   NULL
366
+#define DIO50_PWM   nullptr
367
 
367
 
368
 #define DIO51_PIN   PINF5
368
 #define DIO51_PIN   PINF5
369
 #define DIO51_RPORT PINF
369
 #define DIO51_RPORT PINF
370
 #define DIO51_WPORT PORTF
370
 #define DIO51_WPORT PORTF
371
 #define DIO51_DDR   DDRF
371
 #define DIO51_DDR   DDRF
372
-#define DIO51_PWM   NULL
372
+#define DIO51_PWM   nullptr
373
 
373
 
374
 #define DIO52_PIN   PINF6
374
 #define DIO52_PIN   PINF6
375
 #define DIO52_RPORT PINF
375
 #define DIO52_RPORT PINF
376
 #define DIO52_WPORT PORTF
376
 #define DIO52_WPORT PORTF
377
 #define DIO52_DDR   DDRF
377
 #define DIO52_DDR   DDRF
378
-#define DIO52_PWM   NULL
378
+#define DIO52_PWM   nullptr
379
 
379
 
380
 #define DIO53_PIN   PINF7
380
 #define DIO53_PIN   PINF7
381
 #define DIO53_RPORT PINF
381
 #define DIO53_RPORT PINF
382
 #define DIO53_WPORT PORTF
382
 #define DIO53_WPORT PORTF
383
 #define DIO53_DDR   DDRF
383
 #define DIO53_DDR   DDRF
384
-#define DIO53_PWM   NULL
384
+#define DIO53_PWM   nullptr
385
 
385
 
386
 #undef PA0
386
 #undef PA0
387
 #define PA0_PIN     PINA0
387
 #define PA0_PIN     PINA0
388
 #define PA0_RPORT   PINA
388
 #define PA0_RPORT   PINA
389
 #define PA0_WPORT   PORTA
389
 #define PA0_WPORT   PORTA
390
 #define PA0_DDR     DDRA
390
 #define PA0_DDR     DDRA
391
-#define PA0_PWM     NULL
391
+#define PA0_PWM     nullptr
392
 #undef PA1
392
 #undef PA1
393
 #define PA1_PIN     PINA1
393
 #define PA1_PIN     PINA1
394
 #define PA1_RPORT   PINA
394
 #define PA1_RPORT   PINA
395
 #define PA1_WPORT   PORTA
395
 #define PA1_WPORT   PORTA
396
 #define PA1_DDR     DDRA
396
 #define PA1_DDR     DDRA
397
-#define PA1_PWM     NULL
397
+#define PA1_PWM     nullptr
398
 #undef PA2
398
 #undef PA2
399
 #define PA2_PIN     PINA2
399
 #define PA2_PIN     PINA2
400
 #define PA2_RPORT   PINA
400
 #define PA2_RPORT   PINA
401
 #define PA2_WPORT   PORTA
401
 #define PA2_WPORT   PORTA
402
 #define PA2_DDR     DDRA
402
 #define PA2_DDR     DDRA
403
-#define PA2_PWM     NULL
403
+#define PA2_PWM     nullptr
404
 #undef PA3
404
 #undef PA3
405
 #define PA3_PIN     PINA3
405
 #define PA3_PIN     PINA3
406
 #define PA3_RPORT   PINA
406
 #define PA3_RPORT   PINA
407
 #define PA3_WPORT   PORTA
407
 #define PA3_WPORT   PORTA
408
 #define PA3_DDR     DDRA
408
 #define PA3_DDR     DDRA
409
-#define PA3_PWM     NULL
409
+#define PA3_PWM     nullptr
410
 #undef PA4
410
 #undef PA4
411
 #define PA4_PIN     PINA4
411
 #define PA4_PIN     PINA4
412
 #define PA4_RPORT   PINA
412
 #define PA4_RPORT   PINA
413
 #define PA4_WPORT   PORTA
413
 #define PA4_WPORT   PORTA
414
 #define PA4_DDR     DDRA
414
 #define PA4_DDR     DDRA
415
-#define PA4_PWM     NULL
415
+#define PA4_PWM     nullptr
416
 #undef PA5
416
 #undef PA5
417
 #define PA5_PIN     PINA5
417
 #define PA5_PIN     PINA5
418
 #define PA5_RPORT   PINA
418
 #define PA5_RPORT   PINA
419
 #define PA5_WPORT   PORTA
419
 #define PA5_WPORT   PORTA
420
 #define PA5_DDR     DDRA
420
 #define PA5_DDR     DDRA
421
-#define PA5_PWM     NULL
421
+#define PA5_PWM     nullptr
422
 #undef PA6
422
 #undef PA6
423
 #define PA6_PIN     PINA6
423
 #define PA6_PIN     PINA6
424
 #define PA6_RPORT   PINA
424
 #define PA6_RPORT   PINA
425
 #define PA6_WPORT   PORTA
425
 #define PA6_WPORT   PORTA
426
 #define PA6_DDR     DDRA
426
 #define PA6_DDR     DDRA
427
-#define PA6_PWM     NULL
427
+#define PA6_PWM     nullptr
428
 #undef PA7
428
 #undef PA7
429
 #define PA7_PIN     PINA7
429
 #define PA7_PIN     PINA7
430
 #define PA7_RPORT   PINA
430
 #define PA7_RPORT   PINA
431
 #define PA7_WPORT   PORTA
431
 #define PA7_WPORT   PORTA
432
 #define PA7_DDR     DDRA
432
 #define PA7_DDR     DDRA
433
-#define PA7_PWM     NULL
433
+#define PA7_PWM     nullptr
434
 
434
 
435
 #undef PB0
435
 #undef PB0
436
 #define PB0_PIN     PINB0
436
 #define PB0_PIN     PINB0
437
 #define PB0_RPORT   PINB
437
 #define PB0_RPORT   PINB
438
 #define PB0_WPORT   PORTB
438
 #define PB0_WPORT   PORTB
439
 #define PB0_DDR     DDRB
439
 #define PB0_DDR     DDRB
440
-#define PB0_PWM     NULL
440
+#define PB0_PWM     nullptr
441
 #undef PB1
441
 #undef PB1
442
 #define PB1_PIN     PINB1
442
 #define PB1_PIN     PINB1
443
 #define PB1_RPORT   PINB
443
 #define PB1_RPORT   PINB
444
 #define PB1_WPORT   PORTB
444
 #define PB1_WPORT   PORTB
445
 #define PB1_DDR     DDRB
445
 #define PB1_DDR     DDRB
446
-#define PB1_PWM     NULL
446
+#define PB1_PWM     nullptr
447
 #undef PB2
447
 #undef PB2
448
 #define PB2_PIN     PINB2
448
 #define PB2_PIN     PINB2
449
 #define PB2_RPORT   PINB
449
 #define PB2_RPORT   PINB
450
 #define PB2_WPORT   PORTB
450
 #define PB2_WPORT   PORTB
451
 #define PB2_DDR     DDRB
451
 #define PB2_DDR     DDRB
452
-#define PB2_PWM     NULL
452
+#define PB2_PWM     nullptr
453
 #undef PB3
453
 #undef PB3
454
 #define PB3_PIN     PINB3
454
 #define PB3_PIN     PINB3
455
 #define PB3_RPORT   PINB
455
 #define PB3_RPORT   PINB
456
 #define PB3_WPORT   PORTB
456
 #define PB3_WPORT   PORTB
457
 #define PB3_DDR     DDRB
457
 #define PB3_DDR     DDRB
458
-#define PB3_PWM     NULL
458
+#define PB3_PWM     nullptr
459
 #undef PB4
459
 #undef PB4
460
 #define PB4_PIN     PINB4
460
 #define PB4_PIN     PINB4
461
 #define PB4_RPORT   PINB
461
 #define PB4_RPORT   PINB
467
 #define PB5_RPORT   PINB
467
 #define PB5_RPORT   PINB
468
 #define PB5_WPORT   PORTB
468
 #define PB5_WPORT   PORTB
469
 #define PB5_DDR     DDRB
469
 #define PB5_DDR     DDRB
470
-#define PB5_PWM     NULL
470
+#define PB5_PWM     nullptr
471
 #undef PB6
471
 #undef PB6
472
 #define PB6_PIN     PINB6
472
 #define PB6_PIN     PINB6
473
 #define PB6_RPORT   PINB
473
 #define PB6_RPORT   PINB
474
 #define PB6_WPORT   PORTB
474
 #define PB6_WPORT   PORTB
475
 #define PB6_DDR     DDRB
475
 #define PB6_DDR     DDRB
476
-#define PB6_PWM     NULL
476
+#define PB6_PWM     nullptr
477
 #undef PB7
477
 #undef PB7
478
 #define PB7_PIN     PINB7
478
 #define PB7_PIN     PINB7
479
 #define PB7_RPORT   PINB
479
 #define PB7_RPORT   PINB
486
 #define PC0_RPORT   PINC
486
 #define PC0_RPORT   PINC
487
 #define PC0_WPORT   PORTC
487
 #define PC0_WPORT   PORTC
488
 #define PC0_DDR     DDRC
488
 #define PC0_DDR     DDRC
489
-#define PC0_PWM     NULL
489
+#define PC0_PWM     nullptr
490
 #undef PC1
490
 #undef PC1
491
 #define PC1_PIN     PINC1
491
 #define PC1_PIN     PINC1
492
 #define PC1_RPORT   PINC
492
 #define PC1_RPORT   PINC
493
 #define PC1_WPORT   PORTC
493
 #define PC1_WPORT   PORTC
494
 #define PC1_DDR     DDRC
494
 #define PC1_DDR     DDRC
495
-#define PC1_PWM     NULL
495
+#define PC1_PWM     nullptr
496
 #undef PC2
496
 #undef PC2
497
 #define PC2_PIN     PINC2
497
 #define PC2_PIN     PINC2
498
 #define PC2_RPORT   PINC
498
 #define PC2_RPORT   PINC
499
 #define PC2_WPORT   PORTC
499
 #define PC2_WPORT   PORTC
500
 #define PC2_DDR     DDRC
500
 #define PC2_DDR     DDRC
501
-#define PC2_PWM     NULL
501
+#define PC2_PWM     nullptr
502
 #undef PC3
502
 #undef PC3
503
 #define PC3_PIN     PINC3
503
 #define PC3_PIN     PINC3
504
 #define PC3_RPORT   PINC
504
 #define PC3_RPORT   PINC
505
 #define PC3_WPORT   PORTC
505
 #define PC3_WPORT   PORTC
506
 #define PC3_DDR     DDRC
506
 #define PC3_DDR     DDRC
507
-#define PC3_PWM     NULL
507
+#define PC3_PWM     nullptr
508
 #undef PC4
508
 #undef PC4
509
 #define PC4_PIN     PINC4
509
 #define PC4_PIN     PINC4
510
 #define PC4_RPORT   PINC
510
 #define PC4_RPORT   PINC
511
 #define PC4_WPORT   PORTC
511
 #define PC4_WPORT   PORTC
512
 #define PC4_DDR     DDRC
512
 #define PC4_DDR     DDRC
513
-#define PC4_PWM     NULL
513
+#define PC4_PWM     nullptr
514
 #undef PC5
514
 #undef PC5
515
 #define PC5_PIN     PINC5
515
 #define PC5_PIN     PINC5
516
 #define PC5_RPORT   PINC
516
 #define PC5_RPORT   PINC
517
 #define PC5_WPORT   PORTC
517
 #define PC5_WPORT   PORTC
518
 #define PC5_DDR     DDRC
518
 #define PC5_DDR     DDRC
519
-#define PC5_PWM     NULL
519
+#define PC5_PWM     nullptr
520
 #undef PC6
520
 #undef PC6
521
 #define PC6_PIN     PINC6
521
 #define PC6_PIN     PINC6
522
 #define PC6_RPORT   PINC
522
 #define PC6_RPORT   PINC
523
 #define PC6_WPORT   PORTC
523
 #define PC6_WPORT   PORTC
524
 #define PC6_DDR     DDRC
524
 #define PC6_DDR     DDRC
525
-#define PC6_PWM     NULL
525
+#define PC6_PWM     nullptr
526
 #undef PC7
526
 #undef PC7
527
 #define PC7_PIN     PINC7
527
 #define PC7_PIN     PINC7
528
 #define PC7_RPORT   PINC
528
 #define PC7_RPORT   PINC
529
 #define PC7_WPORT   PORTC
529
 #define PC7_WPORT   PORTC
530
 #define PC7_DDR     DDRC
530
 #define PC7_DDR     DDRC
531
-#define PC7_PWM     NULL
531
+#define PC7_PWM     nullptr
532
 
532
 
533
 #undef PD0
533
 #undef PD0
534
 #define PD0_PIN     PIND0
534
 #define PD0_PIN     PIND0
535
 #define PD0_RPORT   PIND
535
 #define PD0_RPORT   PIND
536
 #define PD0_WPORT   PORTD
536
 #define PD0_WPORT   PORTD
537
 #define PD0_DDR     DDRD
537
 #define PD0_DDR     DDRD
538
-#define PD0_PWM     NULL
538
+#define PD0_PWM     nullptr
539
 #undef PD1
539
 #undef PD1
540
 #define PD1_PIN     PIND1
540
 #define PD1_PIN     PIND1
541
 #define PD1_RPORT   PIND
541
 #define PD1_RPORT   PIND
542
 #define PD1_WPORT   PORTD
542
 #define PD1_WPORT   PORTD
543
 #define PD1_DDR     DDRD
543
 #define PD1_DDR     DDRD
544
-#define PD1_PWM     NULL
544
+#define PD1_PWM     nullptr
545
 #undef PD2
545
 #undef PD2
546
 #define PD2_PIN     PIND2
546
 #define PD2_PIN     PIND2
547
 #define PD2_RPORT   PIND
547
 #define PD2_RPORT   PIND
548
 #define PD2_WPORT   PORTD
548
 #define PD2_WPORT   PORTD
549
 #define PD2_DDR     DDRD
549
 #define PD2_DDR     DDRD
550
-#define PD2_PWM     NULL
550
+#define PD2_PWM     nullptr
551
 #undef PD3
551
 #undef PD3
552
 #define PD3_PIN     PIND3
552
 #define PD3_PIN     PIND3
553
 #define PD3_RPORT   PIND
553
 #define PD3_RPORT   PIND
554
 #define PD3_WPORT   PORTD
554
 #define PD3_WPORT   PORTD
555
 #define PD3_DDR     DDRD
555
 #define PD3_DDR     DDRD
556
-#define PD3_PWM     NULL
556
+#define PD3_PWM     nullptr
557
 #undef PD4
557
 #undef PD4
558
 #define PD4_PIN     PIND4
558
 #define PD4_PIN     PIND4
559
 #define PD4_RPORT   PIND
559
 #define PD4_RPORT   PIND
560
 #define PD4_WPORT   PORTD
560
 #define PD4_WPORT   PORTD
561
 #define PD4_DDR     DDRD
561
 #define PD4_DDR     DDRD
562
-#define PD4_PWM     NULL
562
+#define PD4_PWM     nullptr
563
 #undef PD5
563
 #undef PD5
564
 #define PD5_PIN     PIND5
564
 #define PD5_PIN     PIND5
565
 #define PD5_RPORT   PIND
565
 #define PD5_RPORT   PIND
566
 #define PD5_WPORT   PORTD
566
 #define PD5_WPORT   PORTD
567
 #define PD5_DDR     DDRD
567
 #define PD5_DDR     DDRD
568
-#define PD5_PWM     NULL
568
+#define PD5_PWM     nullptr
569
 #undef PD6
569
 #undef PD6
570
 #define PD6_PIN     PIND6
570
 #define PD6_PIN     PIND6
571
 #define PD6_RPORT   PIND
571
 #define PD6_RPORT   PIND
572
 #define PD6_WPORT   PORTD
572
 #define PD6_WPORT   PORTD
573
 #define PD6_DDR     DDRD
573
 #define PD6_DDR     DDRD
574
-#define PD6_PWM     NULL
574
+#define PD6_PWM     nullptr
575
 #undef PD7
575
 #undef PD7
576
 #define PD7_PIN     PIND7
576
 #define PD7_PIN     PIND7
577
 #define PD7_RPORT   PIND
577
 #define PD7_RPORT   PIND
578
 #define PD7_WPORT   PORTD
578
 #define PD7_WPORT   PORTD
579
 #define PD7_DDR     DDRD
579
 #define PD7_DDR     DDRD
580
-#define PD7_PWM     NULL
580
+#define PD7_PWM     nullptr
581
 
581
 
582
 #undef PE0
582
 #undef PE0
583
 #define PE0_PIN     PINE0
583
 #define PE0_PIN     PINE0
584
 #define PE0_RPORT   PINE
584
 #define PE0_RPORT   PINE
585
 #define PE0_WPORT   PORTE
585
 #define PE0_WPORT   PORTE
586
 #define PE0_DDR     DDRE
586
 #define PE0_DDR     DDRE
587
-#define PE0_PWM     NULL
587
+#define PE0_PWM     nullptr
588
 #undef PE1
588
 #undef PE1
589
 #define PE1_PIN     PINE1
589
 #define PE1_PIN     PINE1
590
 #define PE1_RPORT   PINE
590
 #define PE1_RPORT   PINE
591
 #define PE1_WPORT   PORTE
591
 #define PE1_WPORT   PORTE
592
 #define PE1_DDR     DDRE
592
 #define PE1_DDR     DDRE
593
-#define PE1_PWM     NULL
593
+#define PE1_PWM     nullptr
594
 #undef PE2
594
 #undef PE2
595
 #define PE2_PIN     PINE2
595
 #define PE2_PIN     PINE2
596
 #define PE2_RPORT   PINE
596
 #define PE2_RPORT   PINE
597
 #define PE2_WPORT   PORTE
597
 #define PE2_WPORT   PORTE
598
 #define PE2_DDR     DDRE
598
 #define PE2_DDR     DDRE
599
-#define PE2_PWM     NULL
599
+#define PE2_PWM     nullptr
600
 #undef PE3
600
 #undef PE3
601
 #define PE3_PIN     PINE3
601
 #define PE3_PIN     PINE3
602
 #define PE3_RPORT   PINE
602
 #define PE3_RPORT   PINE
620
 #define PE6_RPORT   PINE
620
 #define PE6_RPORT   PINE
621
 #define PE6_WPORT   PORTE
621
 #define PE6_WPORT   PORTE
622
 #define PE6_DDR     DDRE
622
 #define PE6_DDR     DDRE
623
-#define PE6_PWM     NULL
623
+#define PE6_PWM     nullptr
624
 #undef PE7
624
 #undef PE7
625
 #define PE7_PIN     PINE7
625
 #define PE7_PIN     PINE7
626
 #define PE7_RPORT   PINE
626
 #define PE7_RPORT   PINE
627
 #define PE7_WPORT   PORTE
627
 #define PE7_WPORT   PORTE
628
 #define PE7_DDR     DDRE
628
 #define PE7_DDR     DDRE
629
-#define PE7_PWM     NULL
629
+#define PE7_PWM     nullptr
630
 
630
 
631
 #undef PF0
631
 #undef PF0
632
 #define PF0_PIN     PINF0
632
 #define PF0_PIN     PINF0
633
 #define PF0_RPORT   PINF
633
 #define PF0_RPORT   PINF
634
 #define PF0_WPORT   PORTF
634
 #define PF0_WPORT   PORTF
635
 #define PF0_DDR     DDRF
635
 #define PF0_DDR     DDRF
636
-#define PF0_PWM     NULL
636
+#define PF0_PWM     nullptr
637
 #undef PF1
637
 #undef PF1
638
 #define PF1_PIN     PINF1
638
 #define PF1_PIN     PINF1
639
 #define PF1_RPORT   PINF
639
 #define PF1_RPORT   PINF
640
 #define PF1_WPORT   PORTF
640
 #define PF1_WPORT   PORTF
641
 #define PF1_DDR     DDRF
641
 #define PF1_DDR     DDRF
642
-#define PF1_PWM     NULL
642
+#define PF1_PWM     nullptr
643
 #undef PF2
643
 #undef PF2
644
 #define PF2_PIN     PINF2
644
 #define PF2_PIN     PINF2
645
 #define PF2_RPORT   PINF
645
 #define PF2_RPORT   PINF
646
 #define PF2_WPORT   PORTF
646
 #define PF2_WPORT   PORTF
647
 #define PF2_DDR     DDRF
647
 #define PF2_DDR     DDRF
648
-#define PF2_PWM     NULL
648
+#define PF2_PWM     nullptr
649
 #undef PF3
649
 #undef PF3
650
 #define PF3_PIN     PINF3
650
 #define PF3_PIN     PINF3
651
 #define PF3_RPORT   PINF
651
 #define PF3_RPORT   PINF
652
 #define PF3_WPORT   PORTF
652
 #define PF3_WPORT   PORTF
653
 #define PF3_DDR     DDRF
653
 #define PF3_DDR     DDRF
654
-#define PF3_PWM     NULL
654
+#define PF3_PWM     nullptr
655
 #undef PF4
655
 #undef PF4
656
 #define PF4_PIN     PINF4
656
 #define PF4_PIN     PINF4
657
 #define PF4_RPORT   PINF
657
 #define PF4_RPORT   PINF
658
 #define PF4_WPORT   PORTF
658
 #define PF4_WPORT   PORTF
659
 #define PF4_DDR     DDRF
659
 #define PF4_DDR     DDRF
660
-#define PF4_PWM     NULL
660
+#define PF4_PWM     nullptr
661
 #undef PF5
661
 #undef PF5
662
 #define PF5_PIN     PINF5
662
 #define PF5_PIN     PINF5
663
 #define PF5_RPORT   PINF
663
 #define PF5_RPORT   PINF
664
 #define PF5_WPORT   PORTF
664
 #define PF5_WPORT   PORTF
665
 #define PF5_DDR     DDRF
665
 #define PF5_DDR     DDRF
666
-#define PF5_PWM     NULL
666
+#define PF5_PWM     nullptr
667
 #undef PF6
667
 #undef PF6
668
 #define PF6_PIN     PINF6
668
 #define PF6_PIN     PINF6
669
 #define PF6_RPORT   PINF
669
 #define PF6_RPORT   PINF
670
 #define PF6_WPORT   PORTF
670
 #define PF6_WPORT   PORTF
671
 #define PF6_DDR     DDRF
671
 #define PF6_DDR     DDRF
672
-#define PF6_PWM     NULL
672
+#define PF6_PWM     nullptr
673
 #undef PF7
673
 #undef PF7
674
 #define PF7_PIN     PINF7
674
 #define PF7_PIN     PINF7
675
 #define PF7_RPORT   PINF
675
 #define PF7_RPORT   PINF
676
 #define PF7_WPORT   PORTF
676
 #define PF7_WPORT   PORTF
677
 #define PF7_DDR     DDRF
677
 #define PF7_DDR     DDRF
678
-#define PF7_PWM     NULL
678
+#define PF7_PWM     nullptr
679
 
679
 
680
 #undef PG0
680
 #undef PG0
681
 #define PG0_PIN     PING0
681
 #define PG0_PIN     PING0
682
 #define PG0_RPORT   PING
682
 #define PG0_RPORT   PING
683
 #define PG0_WPORT   PORTG
683
 #define PG0_WPORT   PORTG
684
 #define PG0_DDR     DDRG
684
 #define PG0_DDR     DDRG
685
-#define PG0_PWM     NULL
685
+#define PG0_PWM     nullptr
686
 #undef PG1
686
 #undef PG1
687
 #define PG1_PIN     PING1
687
 #define PG1_PIN     PING1
688
 #define PG1_RPORT   PING
688
 #define PG1_RPORT   PING
689
 #define PG1_WPORT   PORTG
689
 #define PG1_WPORT   PORTG
690
 #define PG1_DDR     DDRG
690
 #define PG1_DDR     DDRG
691
-#define PG1_PWM     NULL
691
+#define PG1_PWM     nullptr
692
 #undef PG2
692
 #undef PG2
693
 #define PG2_PIN     PING2
693
 #define PG2_PIN     PING2
694
 #define PG2_RPORT   PING
694
 #define PG2_RPORT   PING
695
 #define PG2_WPORT   PORTG
695
 #define PG2_WPORT   PORTG
696
 #define PG2_DDR     DDRG
696
 #define PG2_DDR     DDRG
697
-#define PG2_PWM     NULL
697
+#define PG2_PWM     nullptr
698
 #undef PG3
698
 #undef PG3
699
 #define PG3_PIN     PING3
699
 #define PG3_PIN     PING3
700
 #define PG3_RPORT   PING
700
 #define PG3_RPORT   PING
701
 #define PG3_WPORT   PORTG
701
 #define PG3_WPORT   PORTG
702
 #define PG3_DDR     DDRG
702
 #define PG3_DDR     DDRG
703
-#define PG3_PWM     NULL
703
+#define PG3_PWM     nullptr
704
 #undef PG4
704
 #undef PG4
705
 #define PG4_PIN     PING4
705
 #define PG4_PIN     PING4
706
 #define PG4_RPORT   PING
706
 #define PG4_RPORT   PING
707
 #define PG4_WPORT   PORTG
707
 #define PG4_WPORT   PORTG
708
 #define PG4_DDR     DDRG
708
 #define PG4_DDR     DDRG
709
-#define PG4_PWM     NULL
709
+#define PG4_PWM     nullptr
710
 #undef PG5
710
 #undef PG5
711
 #define PG5_PIN     PING5
711
 #define PG5_PIN     PING5
712
 #define PG5_RPORT   PING
712
 #define PG5_RPORT   PING

+ 38
- 38
Marlin/src/HAL/HAL_AVR/fastio_168.h 查看文件

60
 #define DIO0_RPORT  PIND
60
 #define DIO0_RPORT  PIND
61
 #define DIO0_WPORT  PORTD
61
 #define DIO0_WPORT  PORTD
62
 #define DIO0_DDR    DDRD
62
 #define DIO0_DDR    DDRD
63
-#define DIO0_PWM    NULL
63
+#define DIO0_PWM    nullptr
64
 
64
 
65
 #define DIO1_PIN    PIND1
65
 #define DIO1_PIN    PIND1
66
 #define DIO1_RPORT  PIND
66
 #define DIO1_RPORT  PIND
67
 #define DIO1_WPORT  PORTD
67
 #define DIO1_WPORT  PORTD
68
 #define DIO1_DDR    DDRD
68
 #define DIO1_DDR    DDRD
69
-#define DIO1_PWM    NULL
69
+#define DIO1_PWM    nullptr
70
 
70
 
71
 #define DIO2_PIN    PIND2
71
 #define DIO2_PIN    PIND2
72
 #define DIO2_RPORT  PIND
72
 #define DIO2_RPORT  PIND
73
 #define DIO2_WPORT  PORTD
73
 #define DIO2_WPORT  PORTD
74
 #define DIO2_DDR    DDRD
74
 #define DIO2_DDR    DDRD
75
-#define DIO2_PWM    NULL
75
+#define DIO2_PWM    nullptr
76
 
76
 
77
 #define DIO3_PIN    PIND3
77
 #define DIO3_PIN    PIND3
78
 #define DIO3_RPORT  PIND
78
 #define DIO3_RPORT  PIND
84
 #define DIO4_RPORT  PIND
84
 #define DIO4_RPORT  PIND
85
 #define DIO4_WPORT  PORTD
85
 #define DIO4_WPORT  PORTD
86
 #define DIO4_DDR    DDRD
86
 #define DIO4_DDR    DDRD
87
-#define DIO4_PWM    NULL
87
+#define DIO4_PWM    nullptr
88
 
88
 
89
 #define DIO5_PIN    PIND5
89
 #define DIO5_PIN    PIND5
90
 #define DIO5_RPORT  PIND
90
 #define DIO5_RPORT  PIND
102
 #define DIO7_RPORT  PIND
102
 #define DIO7_RPORT  PIND
103
 #define DIO7_WPORT  PORTD
103
 #define DIO7_WPORT  PORTD
104
 #define DIO7_DDR    DDRD
104
 #define DIO7_DDR    DDRD
105
-#define DIO7_PWM    NULL
105
+#define DIO7_PWM    nullptr
106
 
106
 
107
 #define DIO8_PIN    PINB0
107
 #define DIO8_PIN    PINB0
108
 #define DIO8_RPORT  PINB
108
 #define DIO8_RPORT  PINB
109
 #define DIO8_WPORT  PORTB
109
 #define DIO8_WPORT  PORTB
110
 #define DIO8_DDR    DDRB
110
 #define DIO8_DDR    DDRB
111
-#define DIO8_PWM    NULL
111
+#define DIO8_PWM    nullptr
112
 
112
 
113
 #define DIO9_PIN    PINB1
113
 #define DIO9_PIN    PINB1
114
 #define DIO9_RPORT  PINB
114
 #define DIO9_RPORT  PINB
115
 #define DIO9_WPORT  PORTB
115
 #define DIO9_WPORT  PORTB
116
 #define DIO9_DDR    DDRB
116
 #define DIO9_DDR    DDRB
117
-#define DIO9_PWM    NULL
117
+#define DIO9_PWM    nullptr
118
 
118
 
119
 #define DIO10_PIN   PINB2
119
 #define DIO10_PIN   PINB2
120
 #define DIO10_RPORT PINB
120
 #define DIO10_RPORT PINB
121
 #define DIO10_WPORT PORTB
121
 #define DIO10_WPORT PORTB
122
 #define DIO10_DDR   DDRB
122
 #define DIO10_DDR   DDRB
123
-#define DIO10_PWM   NULL
123
+#define DIO10_PWM   nullptr
124
 
124
 
125
 #define DIO11_PIN   PINB3
125
 #define DIO11_PIN   PINB3
126
 #define DIO11_RPORT PINB
126
 #define DIO11_RPORT PINB
132
 #define DIO12_RPORT PINB
132
 #define DIO12_RPORT PINB
133
 #define DIO12_WPORT PORTB
133
 #define DIO12_WPORT PORTB
134
 #define DIO12_DDR   DDRB
134
 #define DIO12_DDR   DDRB
135
-#define DIO12_PWM   NULL
135
+#define DIO12_PWM   nullptr
136
 
136
 
137
 #define DIO13_PIN   PINB5
137
 #define DIO13_PIN   PINB5
138
 #define DIO13_RPORT PINB
138
 #define DIO13_RPORT PINB
139
 #define DIO13_WPORT PORTB
139
 #define DIO13_WPORT PORTB
140
 #define DIO13_DDR   DDRB
140
 #define DIO13_DDR   DDRB
141
-#define DIO13_PWM   NULL
141
+#define DIO13_PWM   nullptr
142
 
142
 
143
 #define DIO14_PIN   PINC0
143
 #define DIO14_PIN   PINC0
144
 #define DIO14_RPORT PINC
144
 #define DIO14_RPORT PINC
145
 #define DIO14_WPORT PORTC
145
 #define DIO14_WPORT PORTC
146
 #define DIO14_DDR   DDRC
146
 #define DIO14_DDR   DDRC
147
-#define DIO14_PWM   NULL
147
+#define DIO14_PWM   nullptr
148
 
148
 
149
 #define DIO15_PIN   PINC1
149
 #define DIO15_PIN   PINC1
150
 #define DIO15_RPORT PINC
150
 #define DIO15_RPORT PINC
151
 #define DIO15_WPORT PORTC
151
 #define DIO15_WPORT PORTC
152
 #define DIO15_DDR   DDRC
152
 #define DIO15_DDR   DDRC
153
-#define DIO15_PWM   NULL
153
+#define DIO15_PWM   nullptr
154
 
154
 
155
 #define DIO16_PIN   PINC2
155
 #define DIO16_PIN   PINC2
156
 #define DIO16_RPORT PINC
156
 #define DIO16_RPORT PINC
157
 #define DIO16_WPORT PORTC
157
 #define DIO16_WPORT PORTC
158
 #define DIO16_DDR   DDRC
158
 #define DIO16_DDR   DDRC
159
-#define DIO16_PWM   NULL
159
+#define DIO16_PWM   nullptr
160
 
160
 
161
 #define DIO17_PIN   PINC3
161
 #define DIO17_PIN   PINC3
162
 #define DIO17_RPORT PINC
162
 #define DIO17_RPORT PINC
163
 #define DIO17_WPORT PORTC
163
 #define DIO17_WPORT PORTC
164
 #define DIO17_DDR   DDRC
164
 #define DIO17_DDR   DDRC
165
-#define DIO17_PWM   NULL
165
+#define DIO17_PWM   nullptr
166
 
166
 
167
 #define DIO18_PIN   PINC4
167
 #define DIO18_PIN   PINC4
168
 #define DIO18_RPORT PINC
168
 #define DIO18_RPORT PINC
169
 #define DIO18_WPORT PORTC
169
 #define DIO18_WPORT PORTC
170
 #define DIO18_DDR   DDRC
170
 #define DIO18_DDR   DDRC
171
-#define DIO18_PWM   NULL
171
+#define DIO18_PWM   nullptr
172
 
172
 
173
 #define DIO19_PIN   PINC5
173
 #define DIO19_PIN   PINC5
174
 #define DIO19_RPORT PINC
174
 #define DIO19_RPORT PINC
175
 #define DIO19_WPORT PORTC
175
 #define DIO19_WPORT PORTC
176
 #define DIO19_DDR   DDRC
176
 #define DIO19_DDR   DDRC
177
-#define DIO19_PWM   NULL
177
+#define DIO19_PWM   nullptr
178
 
178
 
179
 #define DIO20_PIN   PINC6
179
 #define DIO20_PIN   PINC6
180
 #define DIO20_RPORT PINC
180
 #define DIO20_RPORT PINC
181
 #define DIO20_WPORT PORTC
181
 #define DIO20_WPORT PORTC
182
 #define DIO20_DDR   DDRC
182
 #define DIO20_DDR   DDRC
183
-#define DIO20_PWM   NULL
183
+#define DIO20_PWM   nullptr
184
 
184
 
185
 #define DIO21_PIN   PINC7
185
 #define DIO21_PIN   PINC7
186
 #define DIO21_RPORT PINC
186
 #define DIO21_RPORT PINC
187
 #define DIO21_WPORT PORTC
187
 #define DIO21_WPORT PORTC
188
 #define DIO21_DDR   DDRC
188
 #define DIO21_DDR   DDRC
189
-#define DIO21_PWM   NULL
189
+#define DIO21_PWM   nullptr
190
 
190
 
191
 #undef PB0
191
 #undef PB0
192
 #define PB0_PIN     PINB0
192
 #define PB0_PIN     PINB0
193
 #define PB0_RPORT   PINB
193
 #define PB0_RPORT   PINB
194
 #define PB0_WPORT   PORTB
194
 #define PB0_WPORT   PORTB
195
 #define PB0_DDR     DDRB
195
 #define PB0_DDR     DDRB
196
-#define PB0_PWM     NULL
196
+#define PB0_PWM     nullptr
197
 
197
 
198
 #undef PB1
198
 #undef PB1
199
 #define PB1_PIN     PINB1
199
 #define PB1_PIN     PINB1
200
 #define PB1_RPORT   PINB
200
 #define PB1_RPORT   PINB
201
 #define PB1_WPORT   PORTB
201
 #define PB1_WPORT   PORTB
202
 #define PB1_DDR     DDRB
202
 #define PB1_DDR     DDRB
203
-#define PB1_PWM     NULL
203
+#define PB1_PWM     nullptr
204
 
204
 
205
 #undef PB2
205
 #undef PB2
206
 #define PB2_PIN     PINB2
206
 #define PB2_PIN     PINB2
207
 #define PB2_RPORT   PINB
207
 #define PB2_RPORT   PINB
208
 #define PB2_WPORT   PORTB
208
 #define PB2_WPORT   PORTB
209
 #define PB2_DDR     DDRB
209
 #define PB2_DDR     DDRB
210
-#define PB2_PWM     NULL
210
+#define PB2_PWM     nullptr
211
 
211
 
212
 #undef PB3
212
 #undef PB3
213
 #define PB3_PIN     PINB3
213
 #define PB3_PIN     PINB3
221
 #define PB4_RPORT   PINB
221
 #define PB4_RPORT   PINB
222
 #define PB4_WPORT   PORTB
222
 #define PB4_WPORT   PORTB
223
 #define PB4_DDR     DDRB
223
 #define PB4_DDR     DDRB
224
-#define PB4_PWM     NULL
224
+#define PB4_PWM     nullptr
225
 
225
 
226
 #undef PB5
226
 #undef PB5
227
 #define PB5_PIN     PINB5
227
 #define PB5_PIN     PINB5
228
 #define PB5_RPORT   PINB
228
 #define PB5_RPORT   PINB
229
 #define PB5_WPORT   PORTB
229
 #define PB5_WPORT   PORTB
230
 #define PB5_DDR     DDRB
230
 #define PB5_DDR     DDRB
231
-#define PB5_PWM     NULL
231
+#define PB5_PWM     nullptr
232
 
232
 
233
 #undef PB6
233
 #undef PB6
234
 #define PB6_PIN     PINB6
234
 #define PB6_PIN     PINB6
235
 #define PB6_RPORT   PINB
235
 #define PB6_RPORT   PINB
236
 #define PB6_WPORT   PORTB
236
 #define PB6_WPORT   PORTB
237
 #define PB6_DDR     DDRB
237
 #define PB6_DDR     DDRB
238
-#define PB6_PWM     NULL
238
+#define PB6_PWM     nullptr
239
 
239
 
240
 #undef PB7
240
 #undef PB7
241
 #define PB7_PIN     PINB7
241
 #define PB7_PIN     PINB7
242
 #define PB7_RPORT   PINB
242
 #define PB7_RPORT   PINB
243
 #define PB7_WPORT   PORTB
243
 #define PB7_WPORT   PORTB
244
 #define PB7_DDR     DDRB
244
 #define PB7_DDR     DDRB
245
-#define PB7_PWM     NULL
245
+#define PB7_PWM     nullptr
246
 
246
 
247
 #undef PC0
247
 #undef PC0
248
 #define PC0_PIN     PINC0
248
 #define PC0_PIN     PINC0
249
 #define PC0_RPORT   PINC
249
 #define PC0_RPORT   PINC
250
 #define PC0_WPORT   PORTC
250
 #define PC0_WPORT   PORTC
251
 #define PC0_DDR     DDRC
251
 #define PC0_DDR     DDRC
252
-#define PC0_PWM     NULL
252
+#define PC0_PWM     nullptr
253
 
253
 
254
 #undef PC1
254
 #undef PC1
255
 #define PC1_PIN     PINC1
255
 #define PC1_PIN     PINC1
256
 #define PC1_RPORT   PINC
256
 #define PC1_RPORT   PINC
257
 #define PC1_WPORT   PORTC
257
 #define PC1_WPORT   PORTC
258
 #define PC1_DDR     DDRC
258
 #define PC1_DDR     DDRC
259
-#define PC1_PWM     NULL
259
+#define PC1_PWM     nullptr
260
 
260
 
261
 #undef PC2
261
 #undef PC2
262
 #define PC2_PIN     PINC2
262
 #define PC2_PIN     PINC2
263
 #define PC2_RPORT   PINC
263
 #define PC2_RPORT   PINC
264
 #define PC2_WPORT   PORTC
264
 #define PC2_WPORT   PORTC
265
 #define PC2_DDR     DDRC
265
 #define PC2_DDR     DDRC
266
-#define PC2_PWM     NULL
266
+#define PC2_PWM     nullptr
267
 
267
 
268
 #undef PC3
268
 #undef PC3
269
 #define PC3_PIN     PINC3
269
 #define PC3_PIN     PINC3
270
 #define PC3_RPORT   PINC
270
 #define PC3_RPORT   PINC
271
 #define PC3_WPORT   PORTC
271
 #define PC3_WPORT   PORTC
272
 #define PC3_DDR     DDRC
272
 #define PC3_DDR     DDRC
273
-#define PC3_PWM     NULL
273
+#define PC3_PWM     nullptr
274
 
274
 
275
 #undef PC4
275
 #undef PC4
276
 #define PC4_PIN     PINC4
276
 #define PC4_PIN     PINC4
277
 #define PC4_RPORT   PINC
277
 #define PC4_RPORT   PINC
278
 #define PC4_WPORT   PORTC
278
 #define PC4_WPORT   PORTC
279
 #define PC4_DDR     DDRC
279
 #define PC4_DDR     DDRC
280
-#define PC4_PWM     NULL
280
+#define PC4_PWM     nullptr
281
 
281
 
282
 #undef PC5
282
 #undef PC5
283
 #define PC5_PIN     PINC5
283
 #define PC5_PIN     PINC5
284
 #define PC5_RPORT   PINC
284
 #define PC5_RPORT   PINC
285
 #define PC5_WPORT   PORTC
285
 #define PC5_WPORT   PORTC
286
 #define PC5_DDR     DDRC
286
 #define PC5_DDR     DDRC
287
-#define PC5_PWM     NULL
287
+#define PC5_PWM     nullptr
288
 
288
 
289
 #undef PC6
289
 #undef PC6
290
 #define PC6_PIN     PINC6
290
 #define PC6_PIN     PINC6
291
 #define PC6_RPORT   PINC
291
 #define PC6_RPORT   PINC
292
 #define PC6_WPORT   PORTC
292
 #define PC6_WPORT   PORTC
293
 #define PC6_DDR     DDRC
293
 #define PC6_DDR     DDRC
294
-#define PC6_PWM     NULL
294
+#define PC6_PWM     nullptr
295
 
295
 
296
 #undef PC7
296
 #undef PC7
297
 #define PC7_PIN     PINC7
297
 #define PC7_PIN     PINC7
298
 #define PC7_RPORT   PINC
298
 #define PC7_RPORT   PINC
299
 #define PC7_WPORT   PORTC
299
 #define PC7_WPORT   PORTC
300
 #define PC7_DDR     DDRC
300
 #define PC7_DDR     DDRC
301
-#define PC7_PWM     NULL
301
+#define PC7_PWM     nullptr
302
 
302
 
303
 #undef PD0
303
 #undef PD0
304
 #define PD0_PIN     PIND0
304
 #define PD0_PIN     PIND0
305
 #define PD0_RPORT   PIND
305
 #define PD0_RPORT   PIND
306
 #define PD0_WPORT   PORTD
306
 #define PD0_WPORT   PORTD
307
 #define PD0_DDR     DDRD
307
 #define PD0_DDR     DDRD
308
-#define PD0_PWM     NULL
308
+#define PD0_PWM     nullptr
309
 
309
 
310
 #undef PD1
310
 #undef PD1
311
 #define PD1_PIN     PIND1
311
 #define PD1_PIN     PIND1
312
 #define PD1_RPORT   PIND
312
 #define PD1_RPORT   PIND
313
 #define PD1_WPORT   PORTD
313
 #define PD1_WPORT   PORTD
314
 #define PD1_DDR     DDRD
314
 #define PD1_DDR     DDRD
315
-#define PD1_PWM     NULL
315
+#define PD1_PWM     nullptr
316
 
316
 
317
 #undef PD2
317
 #undef PD2
318
 #define PD2_PIN     PIND2
318
 #define PD2_PIN     PIND2
319
 #define PD2_RPORT   PIND
319
 #define PD2_RPORT   PIND
320
 #define PD2_WPORT   PORTD
320
 #define PD2_WPORT   PORTD
321
 #define PD2_DDR     DDRD
321
 #define PD2_DDR     DDRD
322
-#define PD2_PWM     NULL
322
+#define PD2_PWM     nullptr
323
 
323
 
324
 #undef PD3
324
 #undef PD3
325
 #define PD3_PIN     PIND3
325
 #define PD3_PIN     PIND3
333
 #define PD4_RPORT   PIND
333
 #define PD4_RPORT   PIND
334
 #define PD4_WPORT   PORTD
334
 #define PD4_WPORT   PORTD
335
 #define PD4_DDR     DDRD
335
 #define PD4_DDR     DDRD
336
-#define PD4_PWM     NULL
336
+#define PD4_PWM     nullptr
337
 
337
 
338
 #undef PD5
338
 #undef PD5
339
 #define PD5_PIN     PIND5
339
 #define PD5_PIN     PIND5
354
 #define PD7_RPORT   PIND
354
 #define PD7_RPORT   PIND
355
 #define PD7_WPORT   PORTD
355
 #define PD7_WPORT   PORTD
356
 #define PD7_DDR     DDRD
356
 #define PD7_DDR     DDRD
357
-#define PD7_PWM     NULL
357
+#define PD7_PWM     nullptr

+ 72
- 72
Marlin/src/HAL/HAL_AVR/fastio_644.h 查看文件

91
 #define DIO0_RPORT  PINB
91
 #define DIO0_RPORT  PINB
92
 #define DIO0_WPORT  PORTB
92
 #define DIO0_WPORT  PORTB
93
 #define DIO0_DDR    DDRB
93
 #define DIO0_DDR    DDRB
94
-#define DIO0_PWM    NULL
94
+#define DIO0_PWM    nullptr
95
 
95
 
96
 #define DIO1_PIN    PINB1
96
 #define DIO1_PIN    PINB1
97
 #define DIO1_RPORT  PINB
97
 #define DIO1_RPORT  PINB
98
 #define DIO1_WPORT  PORTB
98
 #define DIO1_WPORT  PORTB
99
 #define DIO1_DDR    DDRB
99
 #define DIO1_DDR    DDRB
100
-#define DIO1_PWM    NULL
100
+#define DIO1_PWM    nullptr
101
 
101
 
102
 #define DIO2_PIN    PINB2
102
 #define DIO2_PIN    PINB2
103
 #define DIO2_RPORT  PINB
103
 #define DIO2_RPORT  PINB
104
 #define DIO2_WPORT  PORTB
104
 #define DIO2_WPORT  PORTB
105
 #define DIO2_DDR    DDRB
105
 #define DIO2_DDR    DDRB
106
-#define DIO2_PWM    NULL
106
+#define DIO2_PWM    nullptr
107
 
107
 
108
 #define DIO3_PIN    PINB3
108
 #define DIO3_PIN    PINB3
109
 #define DIO3_RPORT  PINB
109
 #define DIO3_RPORT  PINB
110
 #define DIO3_WPORT  PORTB
110
 #define DIO3_WPORT  PORTB
111
 #define DIO3_DDR    DDRB
111
 #define DIO3_DDR    DDRB
112
-#define DIO3_PWM    OCR0A
112
+#define DIO3_PWM    &OCR0A
113
 
113
 
114
 #define DIO4_PIN    PINB4
114
 #define DIO4_PIN    PINB4
115
 #define DIO4_RPORT  PINB
115
 #define DIO4_RPORT  PINB
116
 #define DIO4_WPORT  PORTB
116
 #define DIO4_WPORT  PORTB
117
 #define DIO4_DDR    DDRB
117
 #define DIO4_DDR    DDRB
118
-#define DIO4_PWM    OCR0B
118
+#define DIO4_PWM    &OCR0B
119
 
119
 
120
 #define DIO5_PIN    PINB5
120
 #define DIO5_PIN    PINB5
121
 #define DIO5_RPORT  PINB
121
 #define DIO5_RPORT  PINB
122
 #define DIO5_WPORT  PORTB
122
 #define DIO5_WPORT  PORTB
123
 #define DIO5_DDR    DDRB
123
 #define DIO5_DDR    DDRB
124
-#define DIO5_PWM    NULL
124
+#define DIO5_PWM    nullptr
125
 
125
 
126
 #define DIO6_PIN    PINB6
126
 #define DIO6_PIN    PINB6
127
 #define DIO6_RPORT  PINB
127
 #define DIO6_RPORT  PINB
128
 #define DIO6_WPORT  PORTB
128
 #define DIO6_WPORT  PORTB
129
 #define DIO6_DDR    DDRB
129
 #define DIO6_DDR    DDRB
130
-#define DIO6_PWM    NULL
130
+#define DIO6_PWM    nullptr
131
 
131
 
132
 #define DIO7_PIN    PINB7
132
 #define DIO7_PIN    PINB7
133
 #define DIO7_RPORT  PINB
133
 #define DIO7_RPORT  PINB
134
 #define DIO7_WPORT  PORTB
134
 #define DIO7_WPORT  PORTB
135
 #define DIO7_DDR    DDRB
135
 #define DIO7_DDR    DDRB
136
-#define DIO7_PWM    NULL
136
+#define DIO7_PWM    nullptr
137
 
137
 
138
 #define DIO8_PIN    PIND0
138
 #define DIO8_PIN    PIND0
139
 #define DIO8_RPORT  PIND
139
 #define DIO8_RPORT  PIND
140
 #define DIO8_WPORT  PORTD
140
 #define DIO8_WPORT  PORTD
141
 #define DIO8_DDR    DDRD
141
 #define DIO8_DDR    DDRD
142
-#define DIO8_PWM    NULL
142
+#define DIO8_PWM    nullptr
143
 
143
 
144
 #define DIO9_PIN    PIND1
144
 #define DIO9_PIN    PIND1
145
 #define DIO9_RPORT  PIND
145
 #define DIO9_RPORT  PIND
146
 #define DIO9_WPORT  PORTD
146
 #define DIO9_WPORT  PORTD
147
 #define DIO9_DDR    DDRD
147
 #define DIO9_DDR    DDRD
148
-#define DIO9_PWM    NULL
148
+#define DIO9_PWM    nullptr
149
 
149
 
150
 #define DIO10_PIN   PIND2
150
 #define DIO10_PIN   PIND2
151
 #define DIO10_RPORT PIND
151
 #define DIO10_RPORT PIND
152
 #define DIO10_WPORT PORTD
152
 #define DIO10_WPORT PORTD
153
 #define DIO10_DDR   DDRD
153
 #define DIO10_DDR   DDRD
154
-#define DIO10_PWM   NULL
154
+#define DIO10_PWM   nullptr
155
 
155
 
156
 #define DIO11_PIN   PIND3
156
 #define DIO11_PIN   PIND3
157
 #define DIO11_RPORT PIND
157
 #define DIO11_RPORT PIND
158
 #define DIO11_WPORT PORTD
158
 #define DIO11_WPORT PORTD
159
 #define DIO11_DDR   DDRD
159
 #define DIO11_DDR   DDRD
160
-#define DIO11_PWM   NULL
160
+#define DIO11_PWM   nullptr
161
 
161
 
162
 #define DIO12_PIN   PIND4
162
 #define DIO12_PIN   PIND4
163
 #define DIO12_RPORT PIND
163
 #define DIO12_RPORT PIND
164
 #define DIO12_WPORT PORTD
164
 #define DIO12_WPORT PORTD
165
 #define DIO12_DDR   DDRD
165
 #define DIO12_DDR   DDRD
166
-#define DIO12_PWM   OCR1B
166
+#define DIO12_PWM   &OCR1B
167
 
167
 
168
 #define DIO13_PIN   PIND5
168
 #define DIO13_PIN   PIND5
169
 #define DIO13_RPORT PIND
169
 #define DIO13_RPORT PIND
170
 #define DIO13_WPORT PORTD
170
 #define DIO13_WPORT PORTD
171
 #define DIO13_DDR   DDRD
171
 #define DIO13_DDR   DDRD
172
-#define DIO13_PWM   OCR1A
172
+#define DIO13_PWM   &OCR1A
173
 
173
 
174
 #define DIO14_PIN   PIND6
174
 #define DIO14_PIN   PIND6
175
 #define DIO14_RPORT PIND
175
 #define DIO14_RPORT PIND
176
 #define DIO14_WPORT PORTD
176
 #define DIO14_WPORT PORTD
177
 #define DIO14_DDR   DDRD
177
 #define DIO14_DDR   DDRD
178
-#define DIO14_PWM   OCR2B
178
+#define DIO14_PWM   &OCR2B
179
 
179
 
180
 #define DIO15_PIN   PIND7
180
 #define DIO15_PIN   PIND7
181
 #define DIO15_RPORT PIND
181
 #define DIO15_RPORT PIND
182
 #define DIO15_WPORT PORTD
182
 #define DIO15_WPORT PORTD
183
 #define DIO15_DDR   DDRD
183
 #define DIO15_DDR   DDRD
184
-#define DIO15_PWM   OCR2A
184
+#define DIO15_PWM   &OCR2A
185
 
185
 
186
 #define DIO16_PIN   PINC0
186
 #define DIO16_PIN   PINC0
187
 #define DIO16_RPORT PINC
187
 #define DIO16_RPORT PINC
188
 #define DIO16_WPORT PORTC
188
 #define DIO16_WPORT PORTC
189
 #define DIO16_DDR   DDRC
189
 #define DIO16_DDR   DDRC
190
-#define DIO16_PWM   NULL
190
+#define DIO16_PWM   nullptr
191
 
191
 
192
 #define DIO17_PIN   PINC1
192
 #define DIO17_PIN   PINC1
193
 #define DIO17_RPORT PINC
193
 #define DIO17_RPORT PINC
194
 #define DIO17_WPORT PORTC
194
 #define DIO17_WPORT PORTC
195
 #define DIO17_DDR   DDRC
195
 #define DIO17_DDR   DDRC
196
-#define DIO17_PWM   NULL
196
+#define DIO17_PWM   nullptr
197
 
197
 
198
 #define DIO18_PIN   PINC2
198
 #define DIO18_PIN   PINC2
199
 #define DIO18_RPORT PINC
199
 #define DIO18_RPORT PINC
200
 #define DIO18_WPORT PORTC
200
 #define DIO18_WPORT PORTC
201
 #define DIO18_DDR   DDRC
201
 #define DIO18_DDR   DDRC
202
-#define DIO18_PWM   NULL
202
+#define DIO18_PWM   nullptr
203
 
203
 
204
 #define DIO19_PIN   PINC3
204
 #define DIO19_PIN   PINC3
205
 #define DIO19_RPORT PINC
205
 #define DIO19_RPORT PINC
206
 #define DIO19_WPORT PORTC
206
 #define DIO19_WPORT PORTC
207
 #define DIO19_DDR   DDRC
207
 #define DIO19_DDR   DDRC
208
-#define DIO19_PWM   NULL
208
+#define DIO19_PWM   nullptr
209
 
209
 
210
 #define DIO20_PIN   PINC4
210
 #define DIO20_PIN   PINC4
211
 #define DIO20_RPORT PINC
211
 #define DIO20_RPORT PINC
212
 #define DIO20_WPORT PORTC
212
 #define DIO20_WPORT PORTC
213
 #define DIO20_DDR   DDRC
213
 #define DIO20_DDR   DDRC
214
-#define DIO20_PWM   NULL
214
+#define DIO20_PWM   nullptr
215
 
215
 
216
 #define DIO21_PIN   PINC5
216
 #define DIO21_PIN   PINC5
217
 #define DIO21_RPORT PINC
217
 #define DIO21_RPORT PINC
218
 #define DIO21_WPORT PORTC
218
 #define DIO21_WPORT PORTC
219
 #define DIO21_DDR   DDRC
219
 #define DIO21_DDR   DDRC
220
-#define DIO21_PWM   NULL
220
+#define DIO21_PWM   nullptr
221
 
221
 
222
 #define DIO22_PIN   PINC6
222
 #define DIO22_PIN   PINC6
223
 #define DIO22_RPORT PINC
223
 #define DIO22_RPORT PINC
224
 #define DIO22_WPORT PORTC
224
 #define DIO22_WPORT PORTC
225
 #define DIO22_DDR   DDRC
225
 #define DIO22_DDR   DDRC
226
-#define DIO22_PWM   NULL
226
+#define DIO22_PWM   nullptr
227
 
227
 
228
 #define DIO23_PIN   PINC7
228
 #define DIO23_PIN   PINC7
229
 #define DIO23_RPORT PINC
229
 #define DIO23_RPORT PINC
230
 #define DIO23_WPORT PORTC
230
 #define DIO23_WPORT PORTC
231
 #define DIO23_DDR   DDRC
231
 #define DIO23_DDR   DDRC
232
-#define DIO23_PWM   NULL
232
+#define DIO23_PWM   nullptr
233
 
233
 
234
 #define DIO24_PIN   PINA7
234
 #define DIO24_PIN   PINA7
235
 #define DIO24_RPORT PINA
235
 #define DIO24_RPORT PINA
236
 #define DIO24_WPORT PORTA
236
 #define DIO24_WPORT PORTA
237
 #define DIO24_DDR   DDRA
237
 #define DIO24_DDR   DDRA
238
-#define DIO24_PWM   NULL
238
+#define DIO24_PWM   nullptr
239
 
239
 
240
 #define DIO25_PIN   PINA6
240
 #define DIO25_PIN   PINA6
241
 #define DIO25_RPORT PINA
241
 #define DIO25_RPORT PINA
242
 #define DIO25_WPORT PORTA
242
 #define DIO25_WPORT PORTA
243
 #define DIO25_DDR   DDRA
243
 #define DIO25_DDR   DDRA
244
-#define DIO25_PWM   NULL
244
+#define DIO25_PWM   nullptr
245
 
245
 
246
 #define DIO26_PIN   PINA5
246
 #define DIO26_PIN   PINA5
247
 #define DIO26_RPORT PINA
247
 #define DIO26_RPORT PINA
248
 #define DIO26_WPORT PORTA
248
 #define DIO26_WPORT PORTA
249
 #define DIO26_DDR   DDRA
249
 #define DIO26_DDR   DDRA
250
-#define DIO26_PWM   NULL
250
+#define DIO26_PWM   nullptr
251
 
251
 
252
 #define DIO27_PIN   PINA4
252
 #define DIO27_PIN   PINA4
253
 #define DIO27_RPORT PINA
253
 #define DIO27_RPORT PINA
254
 #define DIO27_WPORT PORTA
254
 #define DIO27_WPORT PORTA
255
 #define DIO27_DDR   DDRA
255
 #define DIO27_DDR   DDRA
256
-#define DIO27_PWM   NULL
256
+#define DIO27_PWM   nullptr
257
 
257
 
258
 #define DIO28_PIN   PINA3
258
 #define DIO28_PIN   PINA3
259
 #define DIO28_RPORT PINA
259
 #define DIO28_RPORT PINA
260
 #define DIO28_WPORT PORTA
260
 #define DIO28_WPORT PORTA
261
 #define DIO28_DDR   DDRA
261
 #define DIO28_DDR   DDRA
262
-#define DIO28_PWM   NULL
262
+#define DIO28_PWM   nullptr
263
 
263
 
264
 #define DIO29_PIN   PINA2
264
 #define DIO29_PIN   PINA2
265
 #define DIO29_RPORT PINA
265
 #define DIO29_RPORT PINA
266
 #define DIO29_WPORT PORTA
266
 #define DIO29_WPORT PORTA
267
 #define DIO29_DDR   DDRA
267
 #define DIO29_DDR   DDRA
268
-#define DIO29_PWM   NULL
268
+#define DIO29_PWM   nullptr
269
 
269
 
270
 #define DIO30_PIN   PINA1
270
 #define DIO30_PIN   PINA1
271
 #define DIO30_RPORT PINA
271
 #define DIO30_RPORT PINA
272
 #define DIO30_WPORT PORTA
272
 #define DIO30_WPORT PORTA
273
 #define DIO30_DDR   DDRA
273
 #define DIO30_DDR   DDRA
274
-#define DIO30_PWM   NULL
274
+#define DIO30_PWM   nullptr
275
 
275
 
276
 #define DIO31_PIN   PINA0
276
 #define DIO31_PIN   PINA0
277
 #define DIO31_RPORT PINA
277
 #define DIO31_RPORT PINA
278
 #define DIO31_WPORT PORTA
278
 #define DIO31_WPORT PORTA
279
 #define DIO31_DDR   DDRA
279
 #define DIO31_DDR   DDRA
280
-#define DIO31_PWM   NULL
280
+#define DIO31_PWM   nullptr
281
 
281
 
282
 #define AIO0_PIN    PINA0
282
 #define AIO0_PIN    PINA0
283
 #define AIO0_RPORT  PINA
283
 #define AIO0_RPORT  PINA
284
 #define AIO0_WPORT  PORTA
284
 #define AIO0_WPORT  PORTA
285
 #define AIO0_DDR    DDRA
285
 #define AIO0_DDR    DDRA
286
-#define AIO0_PWM    NULL
286
+#define AIO0_PWM    nullptr
287
 
287
 
288
 #define AIO1_PIN    PINA1
288
 #define AIO1_PIN    PINA1
289
 #define AIO1_RPORT  PINA
289
 #define AIO1_RPORT  PINA
290
 #define AIO1_WPORT  PORTA
290
 #define AIO1_WPORT  PORTA
291
 #define AIO1_DDR    DDRA
291
 #define AIO1_DDR    DDRA
292
-#define AIO1_PWM    NULL
292
+#define AIO1_PWM    nullptr
293
 
293
 
294
 #define AIO2_PIN    PINA2
294
 #define AIO2_PIN    PINA2
295
 #define AIO2_RPORT  PINA
295
 #define AIO2_RPORT  PINA
296
 #define AIO2_WPORT  PORTA
296
 #define AIO2_WPORT  PORTA
297
 #define AIO2_DDR    DDRA
297
 #define AIO2_DDR    DDRA
298
-#define AIO2_PWM    NULL
298
+#define AIO2_PWM    nullptr
299
 
299
 
300
 #define AIO3_PIN    PINA3
300
 #define AIO3_PIN    PINA3
301
 #define AIO3_RPORT  PINA
301
 #define AIO3_RPORT  PINA
302
 #define AIO3_WPORT  PORTA
302
 #define AIO3_WPORT  PORTA
303
 #define AIO3_DDR    DDRA
303
 #define AIO3_DDR    DDRA
304
-#define AIO3_PWM    NULL
304
+#define AIO3_PWM    nullptr
305
 
305
 
306
 #define AIO4_PIN    PINA4
306
 #define AIO4_PIN    PINA4
307
 #define AIO4_RPORT  PINA
307
 #define AIO4_RPORT  PINA
308
 #define AIO4_WPORT  PORTA
308
 #define AIO4_WPORT  PORTA
309
 #define AIO4_DDR    DDRA
309
 #define AIO4_DDR    DDRA
310
-#define AIO4_PWM    NULL
310
+#define AIO4_PWM    nullptr
311
 
311
 
312
 #define AIO5_PIN    PINA5
312
 #define AIO5_PIN    PINA5
313
 #define AIO5_RPORT  PINA
313
 #define AIO5_RPORT  PINA
314
 #define AIO5_WPORT  PORTA
314
 #define AIO5_WPORT  PORTA
315
 #define AIO5_DDR    DDRA
315
 #define AIO5_DDR    DDRA
316
-#define AIO5_PWM    NULL
316
+#define AIO5_PWM    nullptr
317
 
317
 
318
 #define AIO6_PIN    PINA6
318
 #define AIO6_PIN    PINA6
319
 #define AIO6_RPORT  PINA
319
 #define AIO6_RPORT  PINA
320
 #define AIO6_WPORT  PORTA
320
 #define AIO6_WPORT  PORTA
321
 #define AIO6_DDR    DDRA
321
 #define AIO6_DDR    DDRA
322
-#define AIO6_PWM    NULL
322
+#define AIO6_PWM    nullptr
323
 
323
 
324
 #define AIO7_PIN    PINA7
324
 #define AIO7_PIN    PINA7
325
 #define AIO7_RPORT  PINA
325
 #define AIO7_RPORT  PINA
326
 #define AIO7_WPORT  PORTA
326
 #define AIO7_WPORT  PORTA
327
 #define AIO7_DDR    DDRA
327
 #define AIO7_DDR    DDRA
328
-#define AIO7_PWM    NULL
328
+#define AIO7_PWM    nullptr
329
 
329
 
330
 #undef PA0
330
 #undef PA0
331
 #define PA0_PIN     PINA0
331
 #define PA0_PIN     PINA0
332
 #define PA0_RPORT   PINA
332
 #define PA0_RPORT   PINA
333
 #define PA0_WPORT   PORTA
333
 #define PA0_WPORT   PORTA
334
 #define PA0_DDR     DDRA
334
 #define PA0_DDR     DDRA
335
-#define PA0_PWM     NULL
335
+#define PA0_PWM     nullptr
336
 
336
 
337
 #undef PA1
337
 #undef PA1
338
 #define PA1_PIN     PINA1
338
 #define PA1_PIN     PINA1
339
 #define PA1_RPORT   PINA
339
 #define PA1_RPORT   PINA
340
 #define PA1_WPORT   PORTA
340
 #define PA1_WPORT   PORTA
341
 #define PA1_DDR     DDRA
341
 #define PA1_DDR     DDRA
342
-#define PA1_PWM     NULL
342
+#define PA1_PWM     nullptr
343
 
343
 
344
 #undef PA2
344
 #undef PA2
345
 #define PA2_PIN     PINA2
345
 #define PA2_PIN     PINA2
346
 #define PA2_RPORT   PINA
346
 #define PA2_RPORT   PINA
347
 #define PA2_WPORT   PORTA
347
 #define PA2_WPORT   PORTA
348
 #define PA2_DDR     DDRA
348
 #define PA2_DDR     DDRA
349
-#define PA2_PWM     NULL
349
+#define PA2_PWM     nullptr
350
 
350
 
351
 #undef PA3
351
 #undef PA3
352
 #define PA3_PIN     PINA3
352
 #define PA3_PIN     PINA3
353
 #define PA3_RPORT   PINA
353
 #define PA3_RPORT   PINA
354
 #define PA3_WPORT   PORTA
354
 #define PA3_WPORT   PORTA
355
 #define PA3_DDR     DDRA
355
 #define PA3_DDR     DDRA
356
-#define PA3_PWM     NULL
356
+#define PA3_PWM     nullptr
357
 
357
 
358
 #undef PA4
358
 #undef PA4
359
 #define PA4_PIN     PINA4
359
 #define PA4_PIN     PINA4
360
 #define PA4_RPORT   PINA
360
 #define PA4_RPORT   PINA
361
 #define PA4_WPORT   PORTA
361
 #define PA4_WPORT   PORTA
362
 #define PA4_DDR     DDRA
362
 #define PA4_DDR     DDRA
363
-#define PA4_PWM     NULL
363
+#define PA4_PWM     nullptr
364
 
364
 
365
 #undef PA5
365
 #undef PA5
366
 #define PA5_PIN     PINA5
366
 #define PA5_PIN     PINA5
367
 #define PA5_RPORT   PINA
367
 #define PA5_RPORT   PINA
368
 #define PA5_WPORT   PORTA
368
 #define PA5_WPORT   PORTA
369
 #define PA5_DDR     DDRA
369
 #define PA5_DDR     DDRA
370
-#define PA5_PWM     NULL
370
+#define PA5_PWM     nullptr
371
 
371
 
372
 #undef PA6
372
 #undef PA6
373
 #define PA6_PIN     PINA6
373
 #define PA6_PIN     PINA6
374
 #define PA6_RPORT   PINA
374
 #define PA6_RPORT   PINA
375
 #define PA6_WPORT   PORTA
375
 #define PA6_WPORT   PORTA
376
 #define PA6_DDR     DDRA
376
 #define PA6_DDR     DDRA
377
-#define PA6_PWM     NULL
377
+#define PA6_PWM     nullptr
378
 
378
 
379
 #undef PA7
379
 #undef PA7
380
 #define PA7_PIN     PINA7
380
 #define PA7_PIN     PINA7
381
 #define PA7_RPORT   PINA
381
 #define PA7_RPORT   PINA
382
 #define PA7_WPORT   PORTA
382
 #define PA7_WPORT   PORTA
383
 #define PA7_DDR     DDRA
383
 #define PA7_DDR     DDRA
384
-#define PA7_PWM     NULL
384
+#define PA7_PWM     nullptr
385
 
385
 
386
 #undef PB0
386
 #undef PB0
387
 #define PB0_PIN     PINB0
387
 #define PB0_PIN     PINB0
388
 #define PB0_RPORT   PINB
388
 #define PB0_RPORT   PINB
389
 #define PB0_WPORT   PORTB
389
 #define PB0_WPORT   PORTB
390
 #define PB0_DDR     DDRB
390
 #define PB0_DDR     DDRB
391
-#define PB0_PWM     NULL
391
+#define PB0_PWM     nullptr
392
 
392
 
393
 #undef PB1
393
 #undef PB1
394
 #define PB1_PIN     PINB1
394
 #define PB1_PIN     PINB1
395
 #define PB1_RPORT   PINB
395
 #define PB1_RPORT   PINB
396
 #define PB1_WPORT   PORTB
396
 #define PB1_WPORT   PORTB
397
 #define PB1_DDR     DDRB
397
 #define PB1_DDR     DDRB
398
-#define PB1_PWM     NULL
398
+#define PB1_PWM     nullptr
399
 
399
 
400
 #undef PB2
400
 #undef PB2
401
 #define PB2_PIN     PINB2
401
 #define PB2_PIN     PINB2
402
 #define PB2_RPORT   PINB
402
 #define PB2_RPORT   PINB
403
 #define PB2_WPORT   PORTB
403
 #define PB2_WPORT   PORTB
404
 #define PB2_DDR     DDRB
404
 #define PB2_DDR     DDRB
405
-#define PB2_PWM     NULL
405
+#define PB2_PWM     nullptr
406
 
406
 
407
 #undef PB3
407
 #undef PB3
408
 #define PB3_PIN     PINB3
408
 #define PB3_PIN     PINB3
409
 #define PB3_RPORT   PINB
409
 #define PB3_RPORT   PINB
410
 #define PB3_WPORT   PORTB
410
 #define PB3_WPORT   PORTB
411
 #define PB3_DDR     DDRB
411
 #define PB3_DDR     DDRB
412
-#define PB3_PWM     OCR0A
412
+#define PB3_PWM     &OCR0A
413
 
413
 
414
 #undef PB4
414
 #undef PB4
415
 #define PB4_PIN     PINB4
415
 #define PB4_PIN     PINB4
416
 #define PB4_RPORT   PINB
416
 #define PB4_RPORT   PINB
417
 #define PB4_WPORT   PORTB
417
 #define PB4_WPORT   PORTB
418
 #define PB4_DDR     DDRB
418
 #define PB4_DDR     DDRB
419
-#define PB4_PWM     OCR0B
419
+#define PB4_PWM     &OCR0B
420
 
420
 
421
 #undef PB5
421
 #undef PB5
422
 #define PB5_PIN     PINB5
422
 #define PB5_PIN     PINB5
423
 #define PB5_RPORT   PINB
423
 #define PB5_RPORT   PINB
424
 #define PB5_WPORT   PORTB
424
 #define PB5_WPORT   PORTB
425
 #define PB5_DDR     DDRB
425
 #define PB5_DDR     DDRB
426
-#define PB5_PWM     NULL
426
+#define PB5_PWM     nullptr
427
 
427
 
428
 #undef PB6
428
 #undef PB6
429
 #define PB6_PIN     PINB6
429
 #define PB6_PIN     PINB6
430
 #define PB6_RPORT   PINB
430
 #define PB6_RPORT   PINB
431
 #define PB6_WPORT   PORTB
431
 #define PB6_WPORT   PORTB
432
 #define PB6_DDR     DDRB
432
 #define PB6_DDR     DDRB
433
-#define PB6_PWM     NULL
433
+#define PB6_PWM     nullptr
434
 
434
 
435
 #undef PB7
435
 #undef PB7
436
 #define PB7_PIN     PINB7
436
 #define PB7_PIN     PINB7
437
 #define PB7_RPORT   PINB
437
 #define PB7_RPORT   PINB
438
 #define PB7_WPORT   PORTB
438
 #define PB7_WPORT   PORTB
439
 #define PB7_DDR     DDRB
439
 #define PB7_DDR     DDRB
440
-#define PB7_PWM     NULL
440
+#define PB7_PWM     nullptr
441
 
441
 
442
 #undef PC0
442
 #undef PC0
443
 #define PC0_PIN     PINC0
443
 #define PC0_PIN     PINC0
444
 #define PC0_RPORT   PINC
444
 #define PC0_RPORT   PINC
445
 #define PC0_WPORT   PORTC
445
 #define PC0_WPORT   PORTC
446
 #define PC0_DDR     DDRC
446
 #define PC0_DDR     DDRC
447
-#define PC0_PWM     NULL
447
+#define PC0_PWM     nullptr
448
 
448
 
449
 #undef PC1
449
 #undef PC1
450
 #define PC1_PIN     PINC1
450
 #define PC1_PIN     PINC1
451
 #define PC1_RPORT   PINC
451
 #define PC1_RPORT   PINC
452
 #define PC1_WPORT   PORTC
452
 #define PC1_WPORT   PORTC
453
 #define PC1_DDR     DDRC
453
 #define PC1_DDR     DDRC
454
-#define PC1_PWM     NULL
454
+#define PC1_PWM     nullptr
455
 
455
 
456
 #undef PC2
456
 #undef PC2
457
 #define PC2_PIN     PINC2
457
 #define PC2_PIN     PINC2
458
 #define PC2_RPORT   PINC
458
 #define PC2_RPORT   PINC
459
 #define PC2_WPORT   PORTC
459
 #define PC2_WPORT   PORTC
460
 #define PC2_DDR     DDRC
460
 #define PC2_DDR     DDRC
461
-#define PC2_PWM     NULL
461
+#define PC2_PWM     nullptr
462
 
462
 
463
 #undef PC3
463
 #undef PC3
464
 #define PC3_PIN     PINC3
464
 #define PC3_PIN     PINC3
465
 #define PC3_RPORT   PINC
465
 #define PC3_RPORT   PINC
466
 #define PC3_WPORT   PORTC
466
 #define PC3_WPORT   PORTC
467
 #define PC3_DDR     DDRC
467
 #define PC3_DDR     DDRC
468
-#define PC3_PWM     NULL
468
+#define PC3_PWM     nullptr
469
 
469
 
470
 #undef PC4
470
 #undef PC4
471
 #define PC4_PIN     PINC4
471
 #define PC4_PIN     PINC4
472
 #define PC4_RPORT   PINC
472
 #define PC4_RPORT   PINC
473
 #define PC4_WPORT   PORTC
473
 #define PC4_WPORT   PORTC
474
 #define PC4_DDR     DDRC
474
 #define PC4_DDR     DDRC
475
-#define PC4_PWM     NULL
475
+#define PC4_PWM     nullptr
476
 
476
 
477
 #undef PC5
477
 #undef PC5
478
 #define PC5_PIN     PINC5
478
 #define PC5_PIN     PINC5
479
 #define PC5_RPORT   PINC
479
 #define PC5_RPORT   PINC
480
 #define PC5_WPORT   PORTC
480
 #define PC5_WPORT   PORTC
481
 #define PC5_DDR     DDRC
481
 #define PC5_DDR     DDRC
482
-#define PC5_PWM     NULL
482
+#define PC5_PWM     nullptr
483
 
483
 
484
 #undef PC6
484
 #undef PC6
485
 #define PC6_PIN     PINC6
485
 #define PC6_PIN     PINC6
486
 #define PC6_RPORT   PINC
486
 #define PC6_RPORT   PINC
487
 #define PC6_WPORT   PORTC
487
 #define PC6_WPORT   PORTC
488
 #define PC6_DDR     DDRC
488
 #define PC6_DDR     DDRC
489
-#define PC6_PWM     NULL
489
+#define PC6_PWM     nullptr
490
 
490
 
491
 #undef PC7
491
 #undef PC7
492
 #define PC7_PIN     PINC7
492
 #define PC7_PIN     PINC7
493
 #define PC7_RPORT   PINC
493
 #define PC7_RPORT   PINC
494
 #define PC7_WPORT   PORTC
494
 #define PC7_WPORT   PORTC
495
 #define PC7_DDR     DDRC
495
 #define PC7_DDR     DDRC
496
-#define PC7_PWM     NULL
496
+#define PC7_PWM     nullptr
497
 
497
 
498
 #undef PD0
498
 #undef PD0
499
 #define PD0_PIN     PIND0
499
 #define PD0_PIN     PIND0
500
 #define PD0_RPORT   PIND
500
 #define PD0_RPORT   PIND
501
 #define PD0_WPORT   PORTD
501
 #define PD0_WPORT   PORTD
502
 #define PD0_DDR     DDRD
502
 #define PD0_DDR     DDRD
503
-#define PD0_PWM     NULL
503
+#define PD0_PWM     nullptr
504
 
504
 
505
 #undef PD1
505
 #undef PD1
506
 #define PD1_PIN     PIND1
506
 #define PD1_PIN     PIND1
507
 #define PD1_RPORT   PIND
507
 #define PD1_RPORT   PIND
508
 #define PD1_WPORT   PORTD
508
 #define PD1_WPORT   PORTD
509
 #define PD1_DDR     DDRD
509
 #define PD1_DDR     DDRD
510
-#define PD1_PWM     NULL
510
+#define PD1_PWM     nullptr
511
 
511
 
512
 #undef PD2
512
 #undef PD2
513
 #define PD2_PIN     PIND2
513
 #define PD2_PIN     PIND2
514
 #define PD2_RPORT   PIND
514
 #define PD2_RPORT   PIND
515
 #define PD2_WPORT   PORTD
515
 #define PD2_WPORT   PORTD
516
 #define PD2_DDR     DDRD
516
 #define PD2_DDR     DDRD
517
-#define PD2_PWM     NULL
517
+#define PD2_PWM     nullptr
518
 
518
 
519
 #undef PD3
519
 #undef PD3
520
 #define PD3_PIN     PIND3
520
 #define PD3_PIN     PIND3
521
 #define PD3_RPORT   PIND
521
 #define PD3_RPORT   PIND
522
 #define PD3_WPORT   PORTD
522
 #define PD3_WPORT   PORTD
523
 #define PD3_DDR     DDRD
523
 #define PD3_DDR     DDRD
524
-#define PD3_PWM     NULL
524
+#define PD3_PWM     nullptr
525
 
525
 
526
 #undef PD4
526
 #undef PD4
527
 #define PD4_PIN     PIND4
527
 #define PD4_PIN     PIND4
528
 #define PD4_RPORT   PIND
528
 #define PD4_RPORT   PIND
529
 #define PD4_WPORT   PORTD
529
 #define PD4_WPORT   PORTD
530
 #define PD4_DDR     DDRD
530
 #define PD4_DDR     DDRD
531
-#define PD4_PWM     NULL
531
+#define PD4_PWM     nullptr
532
 
532
 
533
 #undef PD5
533
 #undef PD5
534
 #define PD5_PIN     PIND5
534
 #define PD5_PIN     PIND5
535
 #define PD5_RPORT   PIND
535
 #define PD5_RPORT   PIND
536
 #define PD5_WPORT   PORTD
536
 #define PD5_WPORT   PORTD
537
 #define PD5_DDR     DDRD
537
 #define PD5_DDR     DDRD
538
-#define PD5_PWM     NULL
538
+#define PD5_PWM     nullptr
539
 
539
 
540
 #undef PD6
540
 #undef PD6
541
 #define PD6_PIN     PIND6
541
 #define PD6_PIN     PIND6
542
 #define PD6_RPORT   PIND
542
 #define PD6_RPORT   PIND
543
 #define PD6_WPORT   PORTD
543
 #define PD6_WPORT   PORTD
544
 #define PD6_DDR     DDRD
544
 #define PD6_DDR     DDRD
545
-#define PD6_PWM     OCR2B
545
+#define PD6_PWM     &OCR2B
546
 
546
 
547
 #undef PD7
547
 #undef PD7
548
 #define PD7_PIN     PIND7
548
 #define PD7_PIN     PIND7
549
 #define PD7_RPORT   PIND
549
 #define PD7_RPORT   PIND
550
 #define PD7_WPORT   PORTD
550
 #define PD7_WPORT   PORTD
551
 #define PD7_DDR     DDRD
551
 #define PD7_DDR     DDRD
552
-#define PD7_PWM     OCR2A
552
+#define PD7_PWM     &OCR2A

+ 106
- 106
Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h 查看文件

45
 #define DIO0_PIN    PIND0
45
 #define DIO0_PIN    PIND0
46
 #define DIO0_RPORT  PIND
46
 #define DIO0_RPORT  PIND
47
 #define DIO0_WPORT  PORTD
47
 #define DIO0_WPORT  PORTD
48
-#define DIO0_PWM    NULL
48
+#define DIO0_PWM    0
49
 #define DIO0_DDR    DDRD
49
 #define DIO0_DDR    DDRD
50
 
50
 
51
 #define DIO1_PIN    PIND1
51
 #define DIO1_PIN    PIND1
52
 #define DIO1_RPORT  PIND
52
 #define DIO1_RPORT  PIND
53
 #define DIO1_WPORT  PORTD
53
 #define DIO1_WPORT  PORTD
54
-#define DIO1_PWM    NULL
54
+#define DIO1_PWM    0
55
 #define DIO1_DDR    DDRD
55
 #define DIO1_DDR    DDRD
56
 
56
 
57
 #define DIO2_PIN    PIND2
57
 #define DIO2_PIN    PIND2
58
 #define DIO2_RPORT  PIND
58
 #define DIO2_RPORT  PIND
59
 #define DIO2_WPORT  PORTD
59
 #define DIO2_WPORT  PORTD
60
-#define DIO2_PWM    NULL
60
+#define DIO2_PWM    0
61
 #define DIO2_DDR    DDRD
61
 #define DIO2_DDR    DDRD
62
 
62
 
63
 #define DIO3_PIN    PIND3
63
 #define DIO3_PIN    PIND3
64
 #define DIO3_RPORT  PIND
64
 #define DIO3_RPORT  PIND
65
 #define DIO3_WPORT  PORTD
65
 #define DIO3_WPORT  PORTD
66
-#define DIO3_PWM    NULL
66
+#define DIO3_PWM    0
67
 #define DIO3_DDR    DDRD
67
 #define DIO3_DDR    DDRD
68
 
68
 
69
 #define DIO4_PIN    PIND4
69
 #define DIO4_PIN    PIND4
70
 #define DIO4_RPORT  PIND
70
 #define DIO4_RPORT  PIND
71
 #define DIO4_WPORT  PORTD
71
 #define DIO4_WPORT  PORTD
72
-#define DIO4_PWM    NULL
72
+#define DIO4_PWM    0
73
 #define DIO4_DDR    DDRD
73
 #define DIO4_DDR    DDRD
74
 
74
 
75
 #define DIO5_PIN    PIND5
75
 #define DIO5_PIN    PIND5
76
 #define DIO5_RPORT  PIND
76
 #define DIO5_RPORT  PIND
77
 #define DIO5_WPORT  PORTD
77
 #define DIO5_WPORT  PORTD
78
-#define DIO5_PWM    NULL
78
+#define DIO5_PWM    0
79
 #define DIO5_DDR    DDRD
79
 #define DIO5_DDR    DDRD
80
 
80
 
81
 #define DIO6_PIN    PIND6
81
 #define DIO6_PIN    PIND6
82
 #define DIO6_RPORT  PIND
82
 #define DIO6_RPORT  PIND
83
 #define DIO6_WPORT  PORTD
83
 #define DIO6_WPORT  PORTD
84
-#define DIO6_PWM    NULL
84
+#define DIO6_PWM    0
85
 #define DIO6_DDR    DDRD
85
 #define DIO6_DDR    DDRD
86
 
86
 
87
 #define DIO7_PIN    PIND7
87
 #define DIO7_PIN    PIND7
88
 #define DIO7_RPORT  PIND
88
 #define DIO7_RPORT  PIND
89
 #define DIO7_WPORT  PORTD
89
 #define DIO7_WPORT  PORTD
90
-#define DIO7_PWM    NULL
90
+#define DIO7_PWM    0
91
 #define DIO7_DDR    DDRD
91
 #define DIO7_DDR    DDRD
92
 
92
 
93
 #define DIO8_PIN    PINE0
93
 #define DIO8_PIN    PINE0
94
 #define DIO8_RPORT  PINE
94
 #define DIO8_RPORT  PINE
95
 #define DIO8_WPORT  PORTE
95
 #define DIO8_WPORT  PORTE
96
-#define DIO8_PWM    NULL
96
+#define DIO8_PWM    0
97
 #define DIO8_DDR    DDRE
97
 #define DIO8_DDR    DDRE
98
 
98
 
99
 #define DIO9_PIN    PINE1
99
 #define DIO9_PIN    PINE1
100
 #define DIO9_RPORT  PINE
100
 #define DIO9_RPORT  PINE
101
 #define DIO9_WPORT  PORTE
101
 #define DIO9_WPORT  PORTE
102
-#define DIO9_PWM    NULL
102
+#define DIO9_PWM    0
103
 #define DIO9_DDR    DDRE
103
 #define DIO9_DDR    DDRE
104
 
104
 
105
 #define DIO10_PIN   PINC0
105
 #define DIO10_PIN   PINC0
106
 #define DIO10_RPORT PINC
106
 #define DIO10_RPORT PINC
107
 #define DIO10_WPORT PORTC
107
 #define DIO10_WPORT PORTC
108
-#define DIO10_PWM   NULL
108
+#define DIO10_PWM   0
109
 #define DIO10_DDR   DDRC
109
 #define DIO10_DDR   DDRC
110
 
110
 
111
 #define DIO11_PIN   PINC1
111
 #define DIO11_PIN   PINC1
112
 #define DIO11_RPORT PINC
112
 #define DIO11_RPORT PINC
113
 #define DIO11_WPORT PORTC
113
 #define DIO11_WPORT PORTC
114
-#define DIO11_PWM   NULL
114
+#define DIO11_PWM   0
115
 #define DIO11_DDR   DDRC
115
 #define DIO11_DDR   DDRC
116
 
116
 
117
 #define DIO12_PIN   PINC2
117
 #define DIO12_PIN   PINC2
118
 #define DIO12_RPORT PINC
118
 #define DIO12_RPORT PINC
119
 #define DIO12_WPORT PORTC
119
 #define DIO12_WPORT PORTC
120
-#define DIO12_PWM   NULL
120
+#define DIO12_PWM   0
121
 #define DIO12_DDR   DDRC
121
 #define DIO12_DDR   DDRC
122
 
122
 
123
 #define DIO13_PIN   PINC3
123
 #define DIO13_PIN   PINC3
124
 #define DIO13_RPORT PINC
124
 #define DIO13_RPORT PINC
125
 #define DIO13_WPORT PORTC
125
 #define DIO13_WPORT PORTC
126
-#define DIO13_PWM   NULL
126
+#define DIO13_PWM   0
127
 #define DIO13_DDR   DDRC
127
 #define DIO13_DDR   DDRC
128
 
128
 
129
 #define DIO14_PIN   PINC4
129
 #define DIO14_PIN   PINC4
130
 #define DIO14_RPORT PINC
130
 #define DIO14_RPORT PINC
131
 #define DIO14_WPORT PORTC
131
 #define DIO14_WPORT PORTC
132
-#define DIO14_PWM   NULL
132
+#define DIO14_PWM   0 // OC3C
133
 #define DIO14_DDR   DDRC
133
 #define DIO14_DDR   DDRC
134
 
134
 
135
 #define DIO15_PIN   PINC5
135
 #define DIO15_PIN   PINC5
136
 #define DIO15_RPORT PINC
136
 #define DIO15_RPORT PINC
137
 #define DIO15_WPORT PORTC
137
 #define DIO15_WPORT PORTC
138
-#define DIO15_PWM   NULL
138
+#define DIO15_PWM   0 // OC3B
139
 #define DIO15_DDR   DDRC
139
 #define DIO15_DDR   DDRC
140
 
140
 
141
 #define DIO16_PIN   PINC6
141
 #define DIO16_PIN   PINC6
142
 #define DIO16_RPORT PINC
142
 #define DIO16_RPORT PINC
143
 #define DIO16_WPORT PORTC
143
 #define DIO16_WPORT PORTC
144
-#define DIO16_PWM   NULL
144
+#define DIO16_PWM   0 // OC3A
145
 #define DIO16_DDR   DDRC
145
 #define DIO16_DDR   DDRC
146
 
146
 
147
 #define DIO17_PIN   PINC7
147
 #define DIO17_PIN   PINC7
148
 #define DIO17_RPORT PINC
148
 #define DIO17_RPORT PINC
149
 #define DIO17_WPORT PORTC
149
 #define DIO17_WPORT PORTC
150
-#define DIO17_PWM   NULL
150
+#define DIO17_PWM   0
151
 #define DIO17_DDR   DDRC
151
 #define DIO17_DDR   DDRC
152
 
152
 
153
 #define DIO18_PIN   PINE6
153
 #define DIO18_PIN   PINE6
154
 #define DIO18_RPORT PINE
154
 #define DIO18_RPORT PINE
155
 #define DIO18_WPORT PORTE
155
 #define DIO18_WPORT PORTE
156
-#define DIO18_PWM   NULL
156
+#define DIO18_PWM   0
157
 #define DIO18_DDR   DDRE
157
 #define DIO18_DDR   DDRE
158
 
158
 
159
 #define DIO19_PIN   PINE7
159
 #define DIO19_PIN   PINE7
160
 #define DIO19_RPORT PINE
160
 #define DIO19_RPORT PINE
161
 #define DIO19_WPORT PORTE
161
 #define DIO19_WPORT PORTE
162
-#define DIO19_PWM   NULL
162
+#define DIO19_PWM   0
163
 #define DIO19_DDR   DDRE
163
 #define DIO19_DDR   DDRE
164
 
164
 
165
 #define DIO20_PIN   PINB0
165
 #define DIO20_PIN   PINB0
166
 #define DIO20_RPORT PINB
166
 #define DIO20_RPORT PINB
167
 #define DIO20_WPORT PORTB
167
 #define DIO20_WPORT PORTB
168
-#define DIO20_PWM   NULL
168
+#define DIO20_PWM   0
169
 #define DIO20_DDR   DDRB
169
 #define DIO20_DDR   DDRB
170
 
170
 
171
 #define DIO21_PIN   PINB1
171
 #define DIO21_PIN   PINB1
172
 #define DIO21_RPORT PINB
172
 #define DIO21_RPORT PINB
173
 #define DIO21_WPORT PORTB
173
 #define DIO21_WPORT PORTB
174
-#define DIO21_PWM   NULL
174
+#define DIO21_PWM   0
175
 #define DIO21_DDR   DDRB
175
 #define DIO21_DDR   DDRB
176
 
176
 
177
 #define DIO22_PIN   PINB2
177
 #define DIO22_PIN   PINB2
178
 #define DIO22_RPORT PINB
178
 #define DIO22_RPORT PINB
179
 #define DIO22_WPORT PORTB
179
 #define DIO22_WPORT PORTB
180
-#define DIO22_PWM   NULL
180
+#define DIO22_PWM   0
181
 #define DIO22_DDR   DDRB
181
 #define DIO22_DDR   DDRB
182
 
182
 
183
 #define DIO23_PIN   PINB3
183
 #define DIO23_PIN   PINB3
184
 #define DIO23_RPORT PINB
184
 #define DIO23_RPORT PINB
185
 #define DIO23_WPORT PORTB
185
 #define DIO23_WPORT PORTB
186
-#define DIO23_PWM   NULL
186
+#define DIO23_PWM   0
187
 #define DIO23_DDR   DDRB
187
 #define DIO23_DDR   DDRB
188
 
188
 
189
 #define DIO24_PIN   PINB4
189
 #define DIO24_PIN   PINB4
190
 #define DIO24_RPORT PINB
190
 #define DIO24_RPORT PINB
191
 #define DIO24_WPORT PORTB
191
 #define DIO24_WPORT PORTB
192
-#define DIO24_PWM   NULL
192
+#define DIO24_PWM   0 // OC2A
193
 #define DIO24_DDR   DDRB
193
 #define DIO24_DDR   DDRB
194
 
194
 
195
 #define DIO25_PIN   PINB5
195
 #define DIO25_PIN   PINB5
196
 #define DIO25_RPORT PINB
196
 #define DIO25_RPORT PINB
197
 #define DIO25_WPORT PORTB
197
 #define DIO25_WPORT PORTB
198
-#define DIO25_PWM   NULL
198
+#define DIO25_PWM   0 // OC1A
199
 #define DIO25_DDR   DDRB
199
 #define DIO25_DDR   DDRB
200
 
200
 
201
 #define DIO26_PIN   PINB6
201
 #define DIO26_PIN   PINB6
202
 #define DIO26_RPORT PINB
202
 #define DIO26_RPORT PINB
203
 #define DIO26_WPORT PORTB
203
 #define DIO26_WPORT PORTB
204
-#define DIO26_PWM   NULL
204
+#define DIO26_PWM   0 // OC1B
205
 #define DIO26_DDR   DDRB
205
 #define DIO26_DDR   DDRB
206
 
206
 
207
 #define DIO27_PIN   PINB7
207
 #define DIO27_PIN   PINB7
208
 #define DIO27_RPORT PINB
208
 #define DIO27_RPORT PINB
209
 #define DIO27_WPORT PORTB
209
 #define DIO27_WPORT PORTB
210
-#define DIO27_PWM   NULL
210
+#define DIO27_PWM   0 // OC1C
211
 #define DIO27_DDR   DDRB
211
 #define DIO27_DDR   DDRB
212
 
212
 
213
 #define DIO28_PIN   PINA0
213
 #define DIO28_PIN   PINA0
214
 #define DIO28_RPORT PINA
214
 #define DIO28_RPORT PINA
215
 #define DIO28_WPORT PORTA
215
 #define DIO28_WPORT PORTA
216
-#define DIO28_PWM   NULL
216
+#define DIO28_PWM   0
217
 #define DIO28_DDR   DDRA
217
 #define DIO28_DDR   DDRA
218
 
218
 
219
 #define DIO29_PIN   PINA1
219
 #define DIO29_PIN   PINA1
220
 #define DIO29_RPORT PINA
220
 #define DIO29_RPORT PINA
221
 #define DIO29_WPORT PORTA
221
 #define DIO29_WPORT PORTA
222
-#define DIO29_PWM   NULL
222
+#define DIO29_PWM   0
223
 #define DIO29_DDR   DDRA
223
 #define DIO29_DDR   DDRA
224
 
224
 
225
 #define DIO30_PIN   PINA2
225
 #define DIO30_PIN   PINA2
226
 #define DIO30_RPORT PINA
226
 #define DIO30_RPORT PINA
227
 #define DIO30_WPORT PORTA
227
 #define DIO30_WPORT PORTA
228
-#define DIO30_PWM   NULL
228
+#define DIO30_PWM   0
229
 #define DIO30_DDR   DDRA
229
 #define DIO30_DDR   DDRA
230
 
230
 
231
 #define DIO31_PIN   PINA3
231
 #define DIO31_PIN   PINA3
232
 #define DIO31_RPORT PINA
232
 #define DIO31_RPORT PINA
233
 #define DIO31_WPORT PORTA
233
 #define DIO31_WPORT PORTA
234
-#define DIO31_PWM   NULL
234
+#define DIO31_PWM   0
235
 #define DIO31_DDR   DDRA
235
 #define DIO31_DDR   DDRA
236
 
236
 
237
 #define DIO32_PIN   PINA4
237
 #define DIO32_PIN   PINA4
238
 #define DIO32_RPORT PINA
238
 #define DIO32_RPORT PINA
239
 #define DIO32_WPORT PORTA
239
 #define DIO32_WPORT PORTA
240
-#define DIO32_PWM   NULL
240
+#define DIO32_PWM   0
241
 #define DIO32_DDR   DDRA
241
 #define DIO32_DDR   DDRA
242
 
242
 
243
 #define DIO33_PIN   PINA5
243
 #define DIO33_PIN   PINA5
244
 #define DIO33_RPORT PINA
244
 #define DIO33_RPORT PINA
245
 #define DIO33_WPORT PORTA
245
 #define DIO33_WPORT PORTA
246
-#define DIO33_PWM   NULL
246
+#define DIO33_PWM   0
247
 #define DIO33_DDR   DDRA
247
 #define DIO33_DDR   DDRA
248
 
248
 
249
 #define DIO34_PIN   PINA6
249
 #define DIO34_PIN   PINA6
250
 #define DIO34_RPORT PINA
250
 #define DIO34_RPORT PINA
251
 #define DIO34_WPORT PORTA
251
 #define DIO34_WPORT PORTA
252
-#define DIO34_PWM   NULL
252
+#define DIO34_PWM   0
253
 #define DIO34_DDR   DDRA
253
 #define DIO34_DDR   DDRA
254
 
254
 
255
 #define DIO35_PIN   PINA7
255
 #define DIO35_PIN   PINA7
256
 #define DIO35_RPORT PINA
256
 #define DIO35_RPORT PINA
257
 #define DIO35_WPORT PORTA
257
 #define DIO35_WPORT PORTA
258
-#define DIO35_PWM   NULL
258
+#define DIO35_PWM   0
259
 #define DIO35_DDR   DDRA
259
 #define DIO35_DDR   DDRA
260
 
260
 
261
 #define DIO36_PIN   PINE4
261
 #define DIO36_PIN   PINE4
262
 #define DIO36_RPORT PINE
262
 #define DIO36_RPORT PINE
263
 #define DIO36_WPORT PORTE
263
 #define DIO36_WPORT PORTE
264
-#define DIO36_PWM   NULL
264
+#define DIO36_PWM   0
265
 #define DIO36_DDR   DDRE
265
 #define DIO36_DDR   DDRE
266
 
266
 
267
 #define DIO37_PIN   PINE5
267
 #define DIO37_PIN   PINE5
268
 #define DIO37_RPORT PINE
268
 #define DIO37_RPORT PINE
269
 #define DIO37_WPORT PORTE
269
 #define DIO37_WPORT PORTE
270
-#define DIO37_PWM   NULL
270
+#define DIO37_PWM   0
271
 #define DIO37_DDR   DDRE
271
 #define DIO37_DDR   DDRE
272
 
272
 
273
 #define DIO38_PIN   PINF0
273
 #define DIO38_PIN   PINF0
274
 #define DIO38_RPORT PINF
274
 #define DIO38_RPORT PINF
275
 #define DIO38_WPORT PORTF
275
 #define DIO38_WPORT PORTF
276
-#define DIO38_PWM   NULL
276
+#define DIO38_PWM   0
277
 #define DIO38_DDR   DDRF
277
 #define DIO38_DDR   DDRF
278
 
278
 
279
 #define DIO39_PIN   PINF1
279
 #define DIO39_PIN   PINF1
280
 #define DIO39_RPORT PINF
280
 #define DIO39_RPORT PINF
281
 #define DIO39_WPORT PORTF
281
 #define DIO39_WPORT PORTF
282
-#define DIO39_PWM   NULL
282
+#define DIO39_PWM   0
283
 #define DIO39_DDR   DDRF
283
 #define DIO39_DDR   DDRF
284
 
284
 
285
 #define DIO40_PIN   PINF2
285
 #define DIO40_PIN   PINF2
286
 #define DIO40_RPORT PINF
286
 #define DIO40_RPORT PINF
287
 #define DIO40_WPORT PORTF
287
 #define DIO40_WPORT PORTF
288
-#define DIO40_PWM   NULL
288
+#define DIO40_PWM   0
289
 #define DIO40_DDR   DDRF
289
 #define DIO40_DDR   DDRF
290
 
290
 
291
 #define DIO41_PIN   PINF3
291
 #define DIO41_PIN   PINF3
292
 #define DIO41_RPORT PINF
292
 #define DIO41_RPORT PINF
293
 #define DIO41_WPORT PORTF
293
 #define DIO41_WPORT PORTF
294
-#define DIO41_PWM   NULL
294
+#define DIO41_PWM   0
295
 #define DIO41_DDR   DDRF
295
 #define DIO41_DDR   DDRF
296
 
296
 
297
 #define DIO42_PIN   PINF4
297
 #define DIO42_PIN   PINF4
298
 #define DIO42_RPORT PINF
298
 #define DIO42_RPORT PINF
299
 #define DIO42_WPORT PORTF
299
 #define DIO42_WPORT PORTF
300
-#define DIO42_PWM   NULL
300
+#define DIO42_PWM   0
301
 #define DIO42_DDR   DDRF
301
 #define DIO42_DDR   DDRF
302
 
302
 
303
 #define DIO43_PIN   PINF5
303
 #define DIO43_PIN   PINF5
304
 #define DIO43_RPORT PINF
304
 #define DIO43_RPORT PINF
305
 #define DIO43_WPORT PORTF
305
 #define DIO43_WPORT PORTF
306
-#define DIO43_PWM   NULL
306
+#define DIO43_PWM   0
307
 #define DIO43_DDR   DDRF
307
 #define DIO43_DDR   DDRF
308
 
308
 
309
 #define DIO44_PIN   PINF6
309
 #define DIO44_PIN   PINF6
310
 #define DIO44_RPORT PINF
310
 #define DIO44_RPORT PINF
311
 #define DIO44_WPORT PORTF
311
 #define DIO44_WPORT PORTF
312
-#define DIO44_PWM   NULL
312
+#define DIO44_PWM   0
313
 #define DIO44_DDR   DDRF
313
 #define DIO44_DDR   DDRF
314
 
314
 
315
 #define DIO45_PIN   PINF7
315
 #define DIO45_PIN   PINF7
316
 #define DIO45_RPORT PINF
316
 #define DIO45_RPORT PINF
317
 #define DIO45_WPORT PORTF
317
 #define DIO45_WPORT PORTF
318
-#define DIO45_PWM   NULL
318
+#define DIO45_PWM   0
319
 #define DIO45_DDR   DDRF
319
 #define DIO45_DDR   DDRF
320
 
320
 
321
 #define AIO0_PIN    PINF0
321
 #define AIO0_PIN    PINF0
322
 #define AIO0_RPORT  PINF
322
 #define AIO0_RPORT  PINF
323
 #define AIO0_WPORT  PORTF
323
 #define AIO0_WPORT  PORTF
324
-#define AIO0_PWM    NULL
324
+#define AIO0_PWM    0
325
 #define AIO0_DDR    DDRF
325
 #define AIO0_DDR    DDRF
326
 
326
 
327
 #define AIO1_PIN    PINF1
327
 #define AIO1_PIN    PINF1
328
 #define AIO1_RPORT  PINF
328
 #define AIO1_RPORT  PINF
329
 #define AIO1_WPORT  PORTF
329
 #define AIO1_WPORT  PORTF
330
-#define AIO1_PWM    NULL
330
+#define AIO1_PWM    0
331
 #define AIO1_DDR    DDRF
331
 #define AIO1_DDR    DDRF
332
 
332
 
333
 #define AIO2_PIN    PINF2
333
 #define AIO2_PIN    PINF2
334
 #define AIO2_RPORT  PINF
334
 #define AIO2_RPORT  PINF
335
 #define AIO2_WPORT  PORTF
335
 #define AIO2_WPORT  PORTF
336
-#define AIO2_PWM    NULL
336
+#define AIO2_PWM    0
337
 #define AIO2_DDR    DDRF
337
 #define AIO2_DDR    DDRF
338
 
338
 
339
 #define AIO3_PIN    PINF3
339
 #define AIO3_PIN    PINF3
340
 #define AIO3_RPORT  PINF
340
 #define AIO3_RPORT  PINF
341
 #define AIO3_WPORT  PORTF
341
 #define AIO3_WPORT  PORTF
342
-#define AIO3_PWM    NULL
342
+#define AIO3_PWM    0
343
 #define AIO3_DDR    DDRF
343
 #define AIO3_DDR    DDRF
344
 
344
 
345
 #define AIO4_PIN    PINF4
345
 #define AIO4_PIN    PINF4
346
 #define AIO4_RPORT  PINF
346
 #define AIO4_RPORT  PINF
347
 #define AIO4_WPORT  PORTF
347
 #define AIO4_WPORT  PORTF
348
-#define AIO4_PWM    NULL
348
+#define AIO4_PWM    0
349
 #define AIO4_DDR    DDRF
349
 #define AIO4_DDR    DDRF
350
 
350
 
351
 #define AIO5_PIN    PINF5
351
 #define AIO5_PIN    PINF5
352
 #define AIO5_RPORT  PINF
352
 #define AIO5_RPORT  PINF
353
 #define AIO5_WPORT  PORTF
353
 #define AIO5_WPORT  PORTF
354
-#define AIO5_PWM    NULL
354
+#define AIO5_PWM    0
355
 #define AIO5_DDR    DDRF
355
 #define AIO5_DDR    DDRF
356
 
356
 
357
 #define AIO6_PIN    PINF6
357
 #define AIO6_PIN    PINF6
358
 #define AIO6_RPORT  PINF
358
 #define AIO6_RPORT  PINF
359
 #define AIO6_WPORT  PORTF
359
 #define AIO6_WPORT  PORTF
360
-#define AIO6_PWM    NULL
360
+#define AIO6_PWM    0
361
 #define AIO6_DDR    DDRF
361
 #define AIO6_DDR    DDRF
362
 
362
 
363
 #define AIO7_PIN    PINF7
363
 #define AIO7_PIN    PINF7
364
 #define AIO7_RPORT  PINF
364
 #define AIO7_RPORT  PINF
365
 #define AIO7_WPORT  PORTF
365
 #define AIO7_WPORT  PORTF
366
-#define AIO7_PWM    NULL
366
+#define AIO7_PWM    0
367
 #define AIO7_DDR    DDRF
367
 #define AIO7_DDR    DDRF
368
 
368
 
369
 //-- Begin not supported by Teensyduino
369
 //-- Begin not supported by Teensyduino
371
 #define DIO46_PIN   PINE2
371
 #define DIO46_PIN   PINE2
372
 #define DIO46_RPORT PINE
372
 #define DIO46_RPORT PINE
373
 #define DIO46_WPORT PORTE
373
 #define DIO46_WPORT PORTE
374
-#define DIO46_PWM   NULL
374
+#define DIO46_PWM   0
375
 #define DIO46_DDR   DDRE
375
 #define DIO46_DDR   DDRE
376
 
376
 
377
 #define DIO47_PIN   PINE3
377
 #define DIO47_PIN   PINE3
378
 #define DIO47_RPORT PINE
378
 #define DIO47_RPORT PINE
379
 #define DIO47_WPORT PORTE
379
 #define DIO47_WPORT PORTE
380
-#define DIO47_PWM   NULL
380
+#define DIO47_PWM   0
381
 #define DIO47_DDR   DDRE
381
 #define DIO47_DDR   DDRE
382
 
382
 
383
 #define TEENSY_E2   46
383
 #define TEENSY_E2   46
389
 #define PA0_PIN     PINA0
389
 #define PA0_PIN     PINA0
390
 #define PA0_RPORT   PINA
390
 #define PA0_RPORT   PINA
391
 #define PA0_WPORT   PORTA
391
 #define PA0_WPORT   PORTA
392
-#define PA0_PWM     NULL
392
+#define PA0_PWM     0
393
 #define PA0_DDR     DDRA
393
 #define PA0_DDR     DDRA
394
 #undef PA1
394
 #undef PA1
395
 #define PA1_PIN     PINA1
395
 #define PA1_PIN     PINA1
396
 #define PA1_RPORT   PINA
396
 #define PA1_RPORT   PINA
397
 #define PA1_WPORT   PORTA
397
 #define PA1_WPORT   PORTA
398
-#define PA1_PWM     NULL
398
+#define PA1_PWM     0
399
 #define PA1_DDR     DDRA
399
 #define PA1_DDR     DDRA
400
 #undef PA2
400
 #undef PA2
401
 #define PA2_PIN     PINA2
401
 #define PA2_PIN     PINA2
402
 #define PA2_RPORT   PINA
402
 #define PA2_RPORT   PINA
403
 #define PA2_WPORT   PORTA
403
 #define PA2_WPORT   PORTA
404
-#define PA2_PWM     NULL
404
+#define PA2_PWM     0
405
 #define PA2_DDR     DDRA
405
 #define PA2_DDR     DDRA
406
 #undef PA3
406
 #undef PA3
407
 #define PA3_PIN     PINA3
407
 #define PA3_PIN     PINA3
408
 #define PA3_RPORT   PINA
408
 #define PA3_RPORT   PINA
409
 #define PA3_WPORT   PORTA
409
 #define PA3_WPORT   PORTA
410
-#define PA3_PWM     NULL
410
+#define PA3_PWM     0
411
 #define PA3_DDR     DDRA
411
 #define PA3_DDR     DDRA
412
 #undef PA4
412
 #undef PA4
413
 #define PA4_PIN     PINA4
413
 #define PA4_PIN     PINA4
414
 #define PA4_RPORT   PINA
414
 #define PA4_RPORT   PINA
415
 #define PA4_WPORT   PORTA
415
 #define PA4_WPORT   PORTA
416
-#define PA4_PWM     NULL
416
+#define PA4_PWM     0
417
 #define PA4_DDR     DDRA
417
 #define PA4_DDR     DDRA
418
 #undef PA5
418
 #undef PA5
419
 #define PA5_PIN     PINA5
419
 #define PA5_PIN     PINA5
420
 #define PA5_RPORT   PINA
420
 #define PA5_RPORT   PINA
421
 #define PA5_WPORT   PORTA
421
 #define PA5_WPORT   PORTA
422
-#define PA5_PWM     NULL
422
+#define PA5_PWM     0
423
 #define PA5_DDR     DDRA
423
 #define PA5_DDR     DDRA
424
 #undef PA6
424
 #undef PA6
425
 #define PA6_PIN     PINA6
425
 #define PA6_PIN     PINA6
426
 #define PA6_RPORT   PINA
426
 #define PA6_RPORT   PINA
427
 #define PA6_WPORT   PORTA
427
 #define PA6_WPORT   PORTA
428
-#define PA6_PWM     NULL
428
+#define PA6_PWM     0
429
 #define PA6_DDR     DDRA
429
 #define PA6_DDR     DDRA
430
 #undef PA7
430
 #undef PA7
431
 #define PA7_PIN     PINA7
431
 #define PA7_PIN     PINA7
432
 #define PA7_RPORT   PINA
432
 #define PA7_RPORT   PINA
433
 #define PA7_WPORT   PORTA
433
 #define PA7_WPORT   PORTA
434
-#define PA7_PWM     NULL
434
+#define PA7_PWM     0
435
 #define PA7_DDR     DDRA
435
 #define PA7_DDR     DDRA
436
 
436
 
437
 #undef PB0
437
 #undef PB0
438
 #define PB0_PIN     PINB0
438
 #define PB0_PIN     PINB0
439
 #define PB0_RPORT   PINB
439
 #define PB0_RPORT   PINB
440
 #define PB0_WPORT   PORTB
440
 #define PB0_WPORT   PORTB
441
-#define PB0_PWM     NULL
441
+#define PB0_PWM     0
442
 #define PB0_DDR     DDRB
442
 #define PB0_DDR     DDRB
443
 #undef PB1
443
 #undef PB1
444
 #define PB1_PIN     PINB1
444
 #define PB1_PIN     PINB1
445
 #define PB1_RPORT   PINB
445
 #define PB1_RPORT   PINB
446
 #define PB1_WPORT   PORTB
446
 #define PB1_WPORT   PORTB
447
-#define PB1_PWM     NULL
447
+#define PB1_PWM     0
448
 #define PB1_DDR     DDRB
448
 #define PB1_DDR     DDRB
449
 #undef PB2
449
 #undef PB2
450
 #define PB2_PIN     PINB2
450
 #define PB2_PIN     PINB2
451
 #define PB2_RPORT   PINB
451
 #define PB2_RPORT   PINB
452
 #define PB2_WPORT   PORTB
452
 #define PB2_WPORT   PORTB
453
-#define PB2_PWM     NULL
453
+#define PB2_PWM     0
454
 #define PB2_DDR     DDRB
454
 #define PB2_DDR     DDRB
455
 #undef PB3
455
 #undef PB3
456
 #define PB3_PIN     PINB3
456
 #define PB3_PIN     PINB3
457
 #define PB3_RPORT   PINB
457
 #define PB3_RPORT   PINB
458
 #define PB3_WPORT   PORTB
458
 #define PB3_WPORT   PORTB
459
-#define PB3_PWM     NULL
459
+#define PB3_PWM     0
460
 #define PB3_DDR     DDRB
460
 #define PB3_DDR     DDRB
461
 #undef PB4
461
 #undef PB4
462
 #define PB4_PIN     PINB4
462
 #define PB4_PIN     PINB4
463
 #define PB4_RPORT   PINB
463
 #define PB4_RPORT   PINB
464
 #define PB4_WPORT   PORTB
464
 #define PB4_WPORT   PORTB
465
-#define PB4_PWM     NULL
465
+#define PB4_PWM     0
466
 #define PB4_DDR     DDRB
466
 #define PB4_DDR     DDRB
467
 #undef PB5
467
 #undef PB5
468
 #define PB5_PIN     PINB5
468
 #define PB5_PIN     PINB5
469
 #define PB5_RPORT   PINB
469
 #define PB5_RPORT   PINB
470
 #define PB5_WPORT   PORTB
470
 #define PB5_WPORT   PORTB
471
-#define PB5_PWM     NULL
471
+#define PB5_PWM     0
472
 #define PB5_DDR     DDRB
472
 #define PB5_DDR     DDRB
473
 #undef PB6
473
 #undef PB6
474
 #define PB6_PIN     PINB6
474
 #define PB6_PIN     PINB6
475
 #define PB6_RPORT   PINB
475
 #define PB6_RPORT   PINB
476
 #define PB6_WPORT   PORTB
476
 #define PB6_WPORT   PORTB
477
-#define PB6_PWM     NULL
477
+#define PB6_PWM     0
478
 #define PB6_DDR     DDRB
478
 #define PB6_DDR     DDRB
479
 #undef PB7
479
 #undef PB7
480
 #define PB7_PIN     PINB7
480
 #define PB7_PIN     PINB7
481
 #define PB7_RPORT   PINB
481
 #define PB7_RPORT   PINB
482
 #define PB7_WPORT   PORTB
482
 #define PB7_WPORT   PORTB
483
-#define PB7_PWM     NULL
483
+#define PB7_PWM     0
484
 #define PB7_DDR     DDRB
484
 #define PB7_DDR     DDRB
485
 
485
 
486
 #undef PC0
486
 #undef PC0
487
 #define PC0_PIN     PINC0
487
 #define PC0_PIN     PINC0
488
 #define PC0_RPORT   PINC
488
 #define PC0_RPORT   PINC
489
 #define PC0_WPORT   PORTC
489
 #define PC0_WPORT   PORTC
490
-#define PC0_PWM     NULL
490
+#define PC0_PWM     0
491
 #define PC0_DDR     DDRC
491
 #define PC0_DDR     DDRC
492
 #undef PC1
492
 #undef PC1
493
 #define PC1_PIN     PINC1
493
 #define PC1_PIN     PINC1
494
 #define PC1_RPORT   PINC
494
 #define PC1_RPORT   PINC
495
 #define PC1_WPORT   PORTC
495
 #define PC1_WPORT   PORTC
496
-#define PC1_PWM     NULL
496
+#define PC1_PWM     0
497
 #define PC1_DDR     DDRC
497
 #define PC1_DDR     DDRC
498
 #undef PC2
498
 #undef PC2
499
 #define PC2_PIN     PINC2
499
 #define PC2_PIN     PINC2
500
 #define PC2_RPORT   PINC
500
 #define PC2_RPORT   PINC
501
 #define PC2_WPORT   PORTC
501
 #define PC2_WPORT   PORTC
502
-#define PC2_PWM     NULL
502
+#define PC2_PWM     0
503
 #define PC2_DDR     DDRC
503
 #define PC2_DDR     DDRC
504
 #undef PC3
504
 #undef PC3
505
 #define PC3_PIN     PINC3
505
 #define PC3_PIN     PINC3
506
 #define PC3_RPORT   PINC
506
 #define PC3_RPORT   PINC
507
 #define PC3_WPORT   PORTC
507
 #define PC3_WPORT   PORTC
508
-#define PC3_PWM     NULL
508
+#define PC3_PWM     0
509
 #define PC3_DDR     DDRC
509
 #define PC3_DDR     DDRC
510
 #undef PC4
510
 #undef PC4
511
 #define PC4_PIN     PINC4
511
 #define PC4_PIN     PINC4
512
 #define PC4_RPORT   PINC
512
 #define PC4_RPORT   PINC
513
 #define PC4_WPORT   PORTC
513
 #define PC4_WPORT   PORTC
514
-#define PC4_PWM     NULL
514
+#define PC4_PWM     0
515
 #define PC4_DDR     DDRC
515
 #define PC4_DDR     DDRC
516
 #undef PC5
516
 #undef PC5
517
 #define PC5_PIN     PINC5
517
 #define PC5_PIN     PINC5
518
 #define PC5_RPORT   PINC
518
 #define PC5_RPORT   PINC
519
 #define PC5_WPORT   PORTC
519
 #define PC5_WPORT   PORTC
520
-#define PC5_PWM     NULL
520
+#define PC5_PWM     0
521
 #define PC5_DDR     DDRC
521
 #define PC5_DDR     DDRC
522
 #undef PC6
522
 #undef PC6
523
 #define PC6_PIN     PINC6
523
 #define PC6_PIN     PINC6
524
 #define PC6_RPORT   PINC
524
 #define PC6_RPORT   PINC
525
 #define PC6_WPORT   PORTC
525
 #define PC6_WPORT   PORTC
526
-#define PC6_PWM     NULL
526
+#define PC6_PWM     0
527
 #define PC6_DDR     DDRC
527
 #define PC6_DDR     DDRC
528
 #undef PC7
528
 #undef PC7
529
 #define PC7_PIN     PINC7
529
 #define PC7_PIN     PINC7
530
 #define PC7_RPORT   PINC
530
 #define PC7_RPORT   PINC
531
 #define PC7_WPORT   PORTC
531
 #define PC7_WPORT   PORTC
532
-#define PC7_PWM     NULL
532
+#define PC7_PWM     0
533
 #define PC7_DDR     DDRC
533
 #define PC7_DDR     DDRC
534
 
534
 
535
 #undef PD0
535
 #undef PD0
536
 #define PD0_PIN     PIND0
536
 #define PD0_PIN     PIND0
537
 #define PD0_RPORT   PIND
537
 #define PD0_RPORT   PIND
538
 #define PD0_WPORT   PORTD
538
 #define PD0_WPORT   PORTD
539
-#define PD0_PWM     NULL
539
+#define PD0_PWM     0 // OC0B
540
 #define PD0_DDR     DDRD
540
 #define PD0_DDR     DDRD
541
 #undef PD1
541
 #undef PD1
542
 #define PD1_PIN     PIND1
542
 #define PD1_PIN     PIND1
543
 #define PD1_RPORT   PIND
543
 #define PD1_RPORT   PIND
544
 #define PD1_WPORT   PORTD
544
 #define PD1_WPORT   PORTD
545
-#define PD1_PWM     NULL
545
+#define PD1_PWM     0 // OC2B
546
 #define PD1_DDR     DDRD
546
 #define PD1_DDR     DDRD
547
 #undef PD2
547
 #undef PD2
548
 #define PD2_PIN     PIND2
548
 #define PD2_PIN     PIND2
549
 #define PD2_RPORT   PIND
549
 #define PD2_RPORT   PIND
550
 #define PD2_WPORT   PORTD
550
 #define PD2_WPORT   PORTD
551
-#define PD2_PWM     NULL
551
+#define PD2_PWM     0
552
 #define PD2_DDR     DDRD
552
 #define PD2_DDR     DDRD
553
 #undef PD3
553
 #undef PD3
554
 #define PD3_PIN     PIND3
554
 #define PD3_PIN     PIND3
555
 #define PD3_RPORT   PIND
555
 #define PD3_RPORT   PIND
556
 #define PD3_WPORT   PORTD
556
 #define PD3_WPORT   PORTD
557
-#define PD3_PWM     NULL
557
+#define PD3_PWM     0
558
 #define PD3_DDR     DDRD
558
 #define PD3_DDR     DDRD
559
 #undef PD4
559
 #undef PD4
560
 #define PD4_PIN     PIND4
560
 #define PD4_PIN     PIND4
561
 #define PD4_RPORT   PIND
561
 #define PD4_RPORT   PIND
562
 #define PD4_WPORT   PORTD
562
 #define PD4_WPORT   PORTD
563
-#define PD4_PWM     NULL
563
+#define PD4_PWM     0
564
 #define PD4_DDR     DDRD
564
 #define PD4_DDR     DDRD
565
 #undef PD5
565
 #undef PD5
566
 #define PD5_PIN     PIND5
566
 #define PD5_PIN     PIND5
567
 #define PD5_RPORT   PIND
567
 #define PD5_RPORT   PIND
568
 #define PD5_WPORT   PORTD
568
 #define PD5_WPORT   PORTD
569
-#define PD5_PWM     NULL
569
+#define PD5_PWM     0
570
 #define PD5_DDR     DDRD
570
 #define PD5_DDR     DDRD
571
 #undef PD6
571
 #undef PD6
572
 #define PD6_PIN     PIND6
572
 #define PD6_PIN     PIND6
573
 #define PD6_RPORT   PIND
573
 #define PD6_RPORT   PIND
574
 #define PD6_WPORT   PORTD
574
 #define PD6_WPORT   PORTD
575
-#define PD6_PWM     NULL
575
+#define PD6_PWM     0
576
 #define PD6_DDR     DDRD
576
 #define PD6_DDR     DDRD
577
 #undef PD7
577
 #undef PD7
578
 #define PD7_PIN     PIND7
578
 #define PD7_PIN     PIND7
579
 #define PD7_RPORT   PIND
579
 #define PD7_RPORT   PIND
580
 #define PD7_WPORT   PORTD
580
 #define PD7_WPORT   PORTD
581
-#define PD7_PWM     NULL
581
+#define PD7_PWM     0
582
 #define PD7_DDR     DDRD
582
 #define PD7_DDR     DDRD
583
 
583
 
584
 #undef PE0
584
 #undef PE0
585
 #define PE0_PIN     PINE0
585
 #define PE0_PIN     PINE0
586
 #define PE0_RPORT   PINE
586
 #define PE0_RPORT   PINE
587
 #define PE0_WPORT   PORTE
587
 #define PE0_WPORT   PORTE
588
-#define PE0_PWM     NULL
588
+#define PE0_PWM     0
589
 #define PE0_DDR     DDRE
589
 #define PE0_DDR     DDRE
590
 #undef PE1
590
 #undef PE1
591
 #define PE1_PIN     PINE1
591
 #define PE1_PIN     PINE1
592
 #define PE1_RPORT   PINE
592
 #define PE1_RPORT   PINE
593
 #define PE1_WPORT   PORTE
593
 #define PE1_WPORT   PORTE
594
-#define PE1_PWM     NULL
594
+#define PE1_PWM     0
595
 #define PE1_DDR     DDRE
595
 #define PE1_DDR     DDRE
596
 #undef PE2
596
 #undef PE2
597
 #define PE2_PIN     PINE2
597
 #define PE2_PIN     PINE2
598
 #define PE2_RPORT   PINE
598
 #define PE2_RPORT   PINE
599
 #define PE2_WPORT   PORTE
599
 #define PE2_WPORT   PORTE
600
-#define PE2_PWM     NULL
600
+#define PE2_PWM     0
601
 #define PE2_DDR     DDRE
601
 #define PE2_DDR     DDRE
602
 #undef PE3
602
 #undef PE3
603
 #define PE3_PIN     PINE3
603
 #define PE3_PIN     PINE3
604
 #define PE3_RPORT   PINE
604
 #define PE3_RPORT   PINE
605
 #define PE3_WPORT   PORTE
605
 #define PE3_WPORT   PORTE
606
-#define PE3_PWM     NULL
606
+#define PE3_PWM     0
607
 #define PE3_DDR     DDRE
607
 #define PE3_DDR     DDRE
608
 #undef PE4
608
 #undef PE4
609
 #define PE4_PIN     PINE4
609
 #define PE4_PIN     PINE4
610
 #define PE4_RPORT   PINE
610
 #define PE4_RPORT   PINE
611
 #define PE4_WPORT   PORTE
611
 #define PE4_WPORT   PORTE
612
-#define PE4_PWM     NULL
612
+#define PE4_PWM     0
613
 #define PE4_DDR     DDRE
613
 #define PE4_DDR     DDRE
614
 #undef PE5
614
 #undef PE5
615
 #define PE5_PIN     PINE5
615
 #define PE5_PIN     PINE5
616
 #define PE5_RPORT   PINE
616
 #define PE5_RPORT   PINE
617
 #define PE5_WPORT   PORTE
617
 #define PE5_WPORT   PORTE
618
-#define PE5_PWM     NULL
618
+#define PE5_PWM     0
619
 #define PE5_DDR     DDRE
619
 #define PE5_DDR     DDRE
620
 #undef PE6
620
 #undef PE6
621
 #define PE6_PIN     PINE6
621
 #define PE6_PIN     PINE6
622
 #define PE6_RPORT   PINE
622
 #define PE6_RPORT   PINE
623
 #define PE6_WPORT   PORTE
623
 #define PE6_WPORT   PORTE
624
-#define PE6_PWM     NULL
624
+#define PE6_PWM     0
625
 #define PE6_DDR     DDRE
625
 #define PE6_DDR     DDRE
626
 #undef PE7
626
 #undef PE7
627
 #define PE7_PIN     PINE7
627
 #define PE7_PIN     PINE7
628
 #define PE7_RPORT   PINE
628
 #define PE7_RPORT   PINE
629
 #define PE7_WPORT   PORTE
629
 #define PE7_WPORT   PORTE
630
-#define PE7_PWM     NULL
630
+#define PE7_PWM     0
631
 #define PE7_DDR     DDRE
631
 #define PE7_DDR     DDRE
632
 
632
 
633
 #undef PF0
633
 #undef PF0
634
 #define PF0_PIN     PINF0
634
 #define PF0_PIN     PINF0
635
 #define PF0_RPORT   PINF
635
 #define PF0_RPORT   PINF
636
 #define PF0_WPORT   PORTF
636
 #define PF0_WPORT   PORTF
637
-#define PF0_PWM     NULL
637
+#define PF0_PWM     0
638
 #define PF0_DDR     DDRF
638
 #define PF0_DDR     DDRF
639
 #undef PF1
639
 #undef PF1
640
 #define PF1_PIN     PINF1
640
 #define PF1_PIN     PINF1
641
 #define PF1_RPORT   PINF
641
 #define PF1_RPORT   PINF
642
 #define PF1_WPORT   PORTF
642
 #define PF1_WPORT   PORTF
643
-#define PF1_PWM     NULL
643
+#define PF1_PWM     0
644
 #define PF1_DDR     DDRF
644
 #define PF1_DDR     DDRF
645
 #undef PF2
645
 #undef PF2
646
 #define PF2_PIN     PINF2
646
 #define PF2_PIN     PINF2
647
 #define PF2_RPORT   PINF
647
 #define PF2_RPORT   PINF
648
 #define PF2_WPORT   PORTF
648
 #define PF2_WPORT   PORTF
649
-#define PF2_PWM     NULL
649
+#define PF2_PWM     0
650
 #define PF2_DDR     DDRF
650
 #define PF2_DDR     DDRF
651
 #undef PF3
651
 #undef PF3
652
 #define PF3_PIN     PINF3
652
 #define PF3_PIN     PINF3
653
 #define PF3_RPORT   PINF
653
 #define PF3_RPORT   PINF
654
 #define PF3_WPORT   PORTF
654
 #define PF3_WPORT   PORTF
655
-#define PF3_PWM     NULL
655
+#define PF3_PWM     0
656
 #define PF3_DDR     DDRF
656
 #define PF3_DDR     DDRF
657
 #undef PF4
657
 #undef PF4
658
 #define PF4_PIN     PINF4
658
 #define PF4_PIN     PINF4
659
 #define PF4_RPORT   PINF
659
 #define PF4_RPORT   PINF
660
 #define PF4_WPORT   PORTF
660
 #define PF4_WPORT   PORTF
661
-#define PF4_PWM     NULL
661
+#define PF4_PWM     0
662
 #define PF4_DDR     DDRF
662
 #define PF4_DDR     DDRF
663
 #undef PF5
663
 #undef PF5
664
 #define PF5_PIN     PINF5
664
 #define PF5_PIN     PINF5
665
 #define PF5_RPORT   PINF
665
 #define PF5_RPORT   PINF
666
 #define PF5_WPORT   PORTF
666
 #define PF5_WPORT   PORTF
667
-#define PF5_PWM     NULL
667
+#define PF5_PWM     0
668
 #define PF5_DDR     DDRF
668
 #define PF5_DDR     DDRF
669
 #undef PF6
669
 #undef PF6
670
 #define PF6_PIN     PINF6
670
 #define PF6_PIN     PINF6
671
 #define PF6_RPORT   PINF
671
 #define PF6_RPORT   PINF
672
 #define PF6_WPORT   PORTF
672
 #define PF6_WPORT   PORTF
673
-#define PF6_PWM     NULL
673
+#define PF6_PWM     0
674
 #define PF6_DDR     DDRF
674
 #define PF6_DDR     DDRF
675
 #undef PF7
675
 #undef PF7
676
 #define PF7_PIN     PINF7
676
 #define PF7_PIN     PINF7
677
 #define PF7_RPORT   PINF
677
 #define PF7_RPORT   PINF
678
 #define PF7_WPORT   PORTF
678
 #define PF7_WPORT   PORTF
679
-#define PF7_PWM     NULL
679
+#define PF7_PWM     0
680
 #define PF7_DDR     DDRF
680
 #define PF7_DDR     DDRF
681
 
681
 
682
 
682
 
683
 /**
683
 /**
684
- *  some of the pin mapping functions of the Teensduino extension to the Arduino IDE
685
- *  do not function the same as the other Arduino extensions
684
+ * Some of the pin mapping functions of the Teensduino extension to the Arduino IDE
685
+ * do not function the same as the other Arduino extensions.
686
  */
686
  */
687
 
687
 
688
 //digitalPinToTimer(pin) function works like Arduino but Timers are not defined
688
 //digitalPinToTimer(pin) function works like Arduino but Timers are not defined

+ 1
- 1
Marlin/src/HAL/HAL_AVR/fastio_AVR.h 查看文件

83
 
83
 
84
 #define _IS_INPUT(IO)        !TEST(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
84
 #define _IS_INPUT(IO)        !TEST(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
85
 #define _IS_OUTPUT(IO)        TEST(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
85
 #define _IS_OUTPUT(IO)        TEST(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
86
-#define _HAS_TIMER(IO)        DIO ## IO ## _PWM
86
+#define _HAS_TIMER(IO)        bool(DIO ## IO ## _PWM)
87
 
87
 
88
 // digitalRead/Write wrappers
88
 // digitalRead/Write wrappers
89
 #ifdef FASTIO_EXT_START
89
 #ifdef FASTIO_EXT_START

+ 1
- 1
Marlin/src/HAL/HAL_DUE/G2_pins.h 查看文件

248
   { PIOB, PIO_PB15A_CANRX1|PIO_PB14A_CANTX1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM,  NOT_ON_TIMER },
248
   { PIOB, PIO_PB15A_CANRX1|PIO_PB14A_CANTX1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM,  NOT_ON_TIMER },
249
 
249
 
250
   // END
250
   // END
251
-  { NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }
251
+  { nullptr, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }
252
 };
252
 };
253
 
253
 
254
 // This section replaces the FASTIO definitions of pins 34-41
254
 // This section replaces the FASTIO definitions of pins 34-41

+ 1
- 1
Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp 查看文件

41
    practice, we need alignment to 256 bytes to make this work in all
41
    practice, we need alignment to 256 bytes to make this work in all
42
    cases */
42
    cases */
43
 __attribute__ ((aligned(256)))
43
 __attribute__ ((aligned(256)))
44
-static DeviceVectors ram_tab = { NULL };
44
+static DeviceVectors ram_tab = { nullptr };
45
 
45
 
46
 /**
46
 /**
47
  * This function checks if the exception/interrupt table is already in SRAM or not.
47
  * This function checks if the exception/interrupt table is already in SRAM or not.

+ 3
- 3
Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp 查看文件

64
 const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
64
 const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = {
65
   { TIMER_GROUP_0, TIMER_0, STEPPER_TIMER_PRESCALE, stepTC_Handler }, // 0 - Stepper
65
   { TIMER_GROUP_0, TIMER_0, STEPPER_TIMER_PRESCALE, stepTC_Handler }, // 0 - Stepper
66
   { TIMER_GROUP_0, TIMER_1,    TEMP_TIMER_PRESCALE, tempTC_Handler }, // 1 - Temperature
66
   { TIMER_GROUP_0, TIMER_1,    TEMP_TIMER_PRESCALE, tempTC_Handler }, // 1 - Temperature
67
-  { TIMER_GROUP_1, TIMER_0,                      1, NULL }, // 2
68
-  { TIMER_GROUP_1, TIMER_1,                      1, NULL }, // 3
67
+  { TIMER_GROUP_1, TIMER_0,                      1, nullptr }, // 2
68
+  { TIMER_GROUP_1, TIMER_1,                      1, nullptr }, // 3
69
 };
69
 };
70
 
70
 
71
 // --------------------------------------------------------------------------
71
 // --------------------------------------------------------------------------
132
   timer_enable_intr(timer.group, timer.idx);
132
   timer_enable_intr(timer.group, timer.idx);
133
 
133
 
134
   // TODO need to deal with timer_group1_isr
134
   // TODO need to deal with timer_group1_isr
135
-  timer_isr_register(timer.group, timer.idx, timer_group0_isr, (void*)timer.idx, NULL, NULL);
135
+  timer_isr_register(timer.group, timer.idx, timer_group0_isr, (void*)timer.idx, ESP_INTR_FLAG_INTRDISABLED, nullptr);
136
 
136
 
137
   timer_start(timer.group, timer.idx);
137
   timer_start(timer.group, timer.idx);
138
 }
138
 }

+ 6
- 6
Marlin/src/HAL/HAL_ESP32/i2s.cpp 查看文件

183
 
183
 
184
   // Allocate the array of pointers to the buffers
184
   // Allocate the array of pointers to the buffers
185
   dma.buffers = (uint32_t **)malloc(sizeof(uint32_t*) * DMA_BUF_COUNT);
185
   dma.buffers = (uint32_t **)malloc(sizeof(uint32_t*) * DMA_BUF_COUNT);
186
-  if (dma.buffers == NULL) return -1;
186
+  if (dma.buffers == nullptr) return -1;
187
 
187
 
188
   // Allocate each buffer that can be used by the DMA controller
188
   // Allocate each buffer that can be used by the DMA controller
189
   for (int buf_idx = 0; buf_idx < DMA_BUF_COUNT; buf_idx++) {
189
   for (int buf_idx = 0; buf_idx < DMA_BUF_COUNT; buf_idx++) {
190
     dma.buffers[buf_idx] = (uint32_t*) heap_caps_calloc(1, DMA_BUF_LEN, MALLOC_CAP_DMA);
190
     dma.buffers[buf_idx] = (uint32_t*) heap_caps_calloc(1, DMA_BUF_LEN, MALLOC_CAP_DMA);
191
-    if (dma.buffers[buf_idx] == NULL) return -1;
191
+    if (dma.buffers[buf_idx] == nullptr) return -1;
192
   }
192
   }
193
 
193
 
194
   // Allocate the array of DMA descriptors
194
   // Allocate the array of DMA descriptors
195
   dma.desc = (lldesc_t**) malloc(sizeof(lldesc_t*) * DMA_BUF_COUNT);
195
   dma.desc = (lldesc_t**) malloc(sizeof(lldesc_t*) * DMA_BUF_COUNT);
196
-  if (dma.desc == NULL) return -1;
196
+  if (dma.desc == nullptr) return -1;
197
 
197
 
198
   // Allocate each DMA descriptor that will be used by the DMA controller
198
   // Allocate each DMA descriptor that will be used by the DMA controller
199
   for (int buf_idx = 0; buf_idx < DMA_BUF_COUNT; buf_idx++) {
199
   for (int buf_idx = 0; buf_idx < DMA_BUF_COUNT; buf_idx++) {
200
     dma.desc[buf_idx] = (lldesc_t*) heap_caps_malloc(sizeof(lldesc_t), MALLOC_CAP_DMA);
200
     dma.desc[buf_idx] = (lldesc_t*) heap_caps_malloc(sizeof(lldesc_t), MALLOC_CAP_DMA);
201
-    if (dma.desc[buf_idx] == NULL) return -1;
201
+    if (dma.desc[buf_idx] == nullptr) return -1;
202
   }
202
   }
203
 
203
 
204
   // Initialize
204
   // Initialize
297
 
297
 
298
   // Allocate and Enable the I2S interrupt
298
   // Allocate and Enable the I2S interrupt
299
   intr_handle_t i2s_isr_handle;
299
   intr_handle_t i2s_isr_handle;
300
-  esp_intr_alloc(ETS_I2S0_INTR_SOURCE, 0, i2s_intr_handler_default, NULL, &i2s_isr_handle);
300
+  esp_intr_alloc(ETS_I2S0_INTR_SOURCE, 0, i2s_intr_handler_default, nullptr, &i2s_isr_handle);
301
   esp_intr_enable(i2s_isr_handle);
301
   esp_intr_enable(i2s_isr_handle);
302
 
302
 
303
   // Create the task that will feed the buffer
303
   // Create the task that will feed the buffer
304
-  xTaskCreate(stepperTask, "StepperTask", 10000, NULL, 1, NULL);
304
+  xTaskCreate(stepperTask, "StepperTask", 10000, nullptr, 1, nullptr);
305
 
305
 
306
   // Route the i2s pins to the appropriate GPIO
306
   // Route the i2s pins to the appropriate GPIO
307
   gpio_matrix_out_check(I2S_DATA, I2S0O_DATA_OUT23_IDX, 0, 0);
307
   gpio_matrix_out_check(I2S_DATA, I2S0O_DATA_OUT23_IDX, 0, 0);

+ 4
- 4
Marlin/src/HAL/HAL_LINUX/hardware/Timer.cpp 查看文件

51
   sa.sa_flags = SA_SIGINFO;
51
   sa.sa_flags = SA_SIGINFO;
52
   sa.sa_sigaction = Timer::handler;
52
   sa.sa_sigaction = Timer::handler;
53
   sigemptyset(&sa.sa_mask);
53
   sigemptyset(&sa.sa_mask);
54
-  if (sigaction(SIGRTMIN, &sa, NULL) == -1) {
54
+  if (sigaction(SIGRTMIN, &sa, nullptr) == -1) {
55
     return; // todo: handle error
55
     return; // todo: handle error
56
   }
56
   }
57
 
57
 
74
 }
74
 }
75
 
75
 
76
 void Timer::enable() {
76
 void Timer::enable() {
77
-  if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1) {
77
+  if (sigprocmask(SIG_UNBLOCK, &mask, nullptr) == -1) {
78
     return; // todo: handle error
78
     return; // todo: handle error
79
   }
79
   }
80
   active = true;
80
   active = true;
82
 }
82
 }
83
 
83
 
84
 void Timer::disable() {
84
 void Timer::disable() {
85
-  if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1) {
85
+  if (sigprocmask(SIG_SETMASK, &mask, nullptr) == -1) {
86
     return; // todo: handle error
86
     return; // todo: handle error
87
   }
87
   }
88
   active = false;
88
   active = false;
102
   its.it_interval.tv_sec = its.it_value.tv_sec;
102
   its.it_interval.tv_sec = its.it_value.tv_sec;
103
   its.it_interval.tv_nsec = its.it_value.tv_nsec;
103
   its.it_interval.tv_nsec = its.it_value.tv_nsec;
104
 
104
 
105
-  if (timer_settime(timerid, 0, &its, NULL) == -1) {
105
+  if (timer_settime(timerid, 0, &its, nullptr) == -1) {
106
     printf("timer(%ld) failed, compare: %d(%ld)\n", getID(), compare, its.it_value.tv_nsec);
106
     printf("timer(%ld) failed, compare: %d(%ld)\n", getID(), compare, its.it_value.tv_nsec);
107
     return; // todo: handle error
107
     return; // todo: handle error
108
   }
108
   }

+ 2
- 2
Marlin/src/HAL/HAL_LINUX/persistent_store_impl.cpp 查看文件

35
 bool PersistentStore::access_start() {
35
 bool PersistentStore::access_start() {
36
   const char eeprom_erase_value = 0xFF;
36
   const char eeprom_erase_value = 0xFF;
37
   FILE * eeprom_file = fopen(filename, "rb");
37
   FILE * eeprom_file = fopen(filename, "rb");
38
-  if (eeprom_file == NULL) return false;
38
+  if (eeprom_file == nullptr) return false;
39
 
39
 
40
   fseek(eeprom_file, 0L, SEEK_END);
40
   fseek(eeprom_file, 0L, SEEK_END);
41
   std::size_t file_size = ftell(eeprom_file);
41
   std::size_t file_size = ftell(eeprom_file);
54
 
54
 
55
 bool PersistentStore::access_finish() {
55
 bool PersistentStore::access_finish() {
56
   FILE * eeprom_file = fopen(filename, "wb");
56
   FILE * eeprom_file = fopen(filename, "wb");
57
-  if (eeprom_file == NULL) return false;
57
+  if (eeprom_file == nullptr) return false;
58
   fwrite(buffer, sizeof(uint8_t), sizeof(buffer), eeprom_file);
58
   fwrite(buffer, sizeof(uint8_t), sizeof(buffer), eeprom_file);
59
   fclose(eeprom_file);
59
   fclose(eeprom_file);
60
   return true;
60
   return true;

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/HAL.cpp 查看文件

270
   adc.calibrate();
270
   adc.calibrate();
271
   adc.setSampleRate(ADC_SMPR_41_5); // ?
271
   adc.setSampleRate(ADC_SMPR_41_5); // ?
272
   adc.setPins(adc_pins, ADC_PIN_COUNT);
272
   adc.setPins(adc_pins, ADC_PIN_COUNT);
273
-  adc.setDMA(HAL_adc_results, (uint16_t)ADC_PIN_COUNT, (uint32_t)(DMA_MINC_MODE | DMA_CIRC_MODE), (void (*)())NULL);
273
+  adc.setDMA(HAL_adc_results, (uint16_t)ADC_PIN_COUNT, (uint32_t)(DMA_MINC_MODE | DMA_CIRC_MODE), nullptr);
274
   adc.setScanMode();
274
   adc.setScanMode();
275
   adc.setContinuous();
275
   adc.setContinuous();
276
   adc.startConversion();
276
   adc.startConversion();

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/HAL.h 查看文件

129
 #endif
129
 #endif
130
 
130
 
131
 #ifndef digitalPinHasPWM
131
 #ifndef digitalPinHasPWM
132
-  #define digitalPinHasPWM(P) (PIN_MAP[P].timer_device != NULL)
132
+  #define digitalPinHasPWM(P) (PIN_MAP[P].timer_device != nullptr)
133
 #endif
133
 #endif
134
 
134
 
135
 #define CRITICAL_SECTION_START  uint32_t primask = __get_primask(); (void)__iCliRetVal()
135
 #define CRITICAL_SECTION_START  uint32_t primask = __get_primask(); (void)__iCliRetVal()

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h 查看文件

47
 
47
 
48
 #define IS_INPUT(IO)          (_GET_MODE(IO) == GPIO_INPUT_FLOATING || _GET_MODE(IO) == GPIO_INPUT_ANALOG || _GET_MODE(IO) == GPIO_INPUT_PU || _GET_MODE(IO) == GPIO_INPUT_PD)
48
 #define IS_INPUT(IO)          (_GET_MODE(IO) == GPIO_INPUT_FLOATING || _GET_MODE(IO) == GPIO_INPUT_ANALOG || _GET_MODE(IO) == GPIO_INPUT_PU || _GET_MODE(IO) == GPIO_INPUT_PD)
49
 #define IS_OUTPUT(IO)         (_GET_MODE(IO) == GPIO_OUTPUT_PP)
49
 #define IS_OUTPUT(IO)         (_GET_MODE(IO) == GPIO_OUTPUT_PP)
50
-#define HAS_TIMER(IO)         (PIN_MAP[IO].timer_device != NULL)
50
+#define HAS_TIMER(IO)         (PIN_MAP[IO].timer_device != nullptr)
51
 
51
 
52
 #define PWM_PIN(P)              HAS_TIMER(P)
52
 #define PWM_PIN(P)              HAS_TIMER(P)
53
 #define USEABLE_HARDWARE_PWM(P) PWM_PIN(P)
53
 #define USEABLE_HARDWARE_PWM(P) PWM_PIN(P)

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/u8g_com_stm32duino_fsmc.cpp 查看文件

67
       LCD_IO_Init(u8g->pin_list[U8G_PI_CS], u8g->pin_list[U8G_PI_A0]);
67
       LCD_IO_Init(u8g->pin_list[U8G_PI_CS], u8g->pin_list[U8G_PI_A0]);
68
       u8g_Delay(100);
68
       u8g_Delay(100);
69
 
69
 
70
-      if (arg_ptr != NULL)
70
+      if (arg_ptr != nullptr)
71
         *((uint32_t *)arg_ptr) = LCD_IO_ReadData(LCD_READ_ID, 3);
71
         *((uint32_t *)arg_ptr) = LCD_IO_ReadData(LCD_READ_ID, 3);
72
 
72
 
73
       isCommand = 0;
73
       isCommand = 0;

+ 1
- 1
Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp 查看文件

165
   #ifdef STM32GENERIC
165
   #ifdef STM32GENERIC
166
     SPI.dmaSend(const_cast<uint8_t*>(buf), 512);
166
     SPI.dmaSend(const_cast<uint8_t*>(buf), 512);
167
   #else
167
   #else
168
-    SPI.transfer((uint8_t*)buf, (uint8_t*)0, 512);
168
+    SPI.transfer((uint8_t*)buf, nullptr, 512);
169
   #endif
169
   #endif
170
 
170
 
171
   SPI.endTransaction();
171
   SPI.endTransaction();

+ 1
- 1
Marlin/src/HAL/shared/backtrace/unwarm.cpp 查看文件

93
   UnwReport entry;
93
   UnwReport entry;
94
 
94
 
95
   // We found two acceptable values.
95
   // We found two acceptable values.
96
-  entry.name = NULL;
96
+  entry.name = nullptr;
97
   entry.address = addr & 0xFFFFFFFE; // Remove Thumb bit
97
   entry.address = addr & 0xFFFFFFFE; // Remove Thumb bit
98
   entry.function = 0;
98
   entry.function = 0;
99
 
99
 

+ 3
- 3
Marlin/src/HAL/shared/backtrace/unwarmbytab.cpp 查看文件

47
 }
47
 }
48
 
48
 
49
 /*
49
 /*
50
- * Get the function name or NULL if not found
50
+ * Get the function name or nullptr if not found
51
  */
51
  */
52
 static const char *UnwTabGetFunctionName(const UnwindCallbacks *cb, uint32_t address) {
52
 static const char *UnwTabGetFunctionName(const UnwindCallbacks *cb, uint32_t address) {
53
   uint32_t flag_word = 0;
53
   uint32_t flag_word = 0;
54
   if (!cb->readW(address-4,&flag_word))
54
   if (!cb->readW(address-4,&flag_word))
55
-    return NULL;
55
+    return nullptr;
56
 
56
 
57
   if ((flag_word & 0xFF000000) == 0xFF000000) {
57
   if ((flag_word & 0xFF000000) == 0xFF000000) {
58
     return (const char *)(address - 4 - (flag_word & 0x00FFFFFF));
58
     return (const char *)(address - 4 - (flag_word & 0x00FFFFFF));
59
   }
59
   }
60
-  return NULL;
60
+  return nullptr;
61
 }
61
 }
62
 
62
 
63
 /**
63
 /**

+ 1
- 1
Marlin/src/Marlin.cpp 查看文件

728
  * Kill all activity and lock the machine.
728
  * Kill all activity and lock the machine.
729
  * After this the machine will need to be reset.
729
  * After this the machine will need to be reset.
730
  */
730
  */
731
-void kill(PGM_P const lcd_msg/*=NULL*/) {
731
+void kill(PGM_P const lcd_msg/*=nullptr*/) {
732
   thermalManager.disable_all_heaters();
732
   thermalManager.disable_all_heaters();
733
 
733
 
734
   SERIAL_ERROR_MSG(MSG_ERR_KILLED);
734
   SERIAL_ERROR_MSG(MSG_ERR_KILLED);

+ 1
- 1
Marlin/src/Marlin.h 查看文件

321
 void disable_e_steppers();
321
 void disable_e_steppers();
322
 void disable_all_steppers();
322
 void disable_all_steppers();
323
 
323
 
324
-void kill(PGM_P const lcd_msg=NULL);
324
+void kill(PGM_P const lcd_msg=nullptr);
325
 void minkill();
325
 void minkill();
326
 
326
 
327
 void quickstop_stepper();
327
 void quickstop_stepper();

+ 1
- 1
Marlin/src/core/serial.cpp 查看文件

50
 
50
 
51
 void serial_spaces(uint8_t count) { count *= (PROPORTIONAL_FONT_RATIO); while (count--) SERIAL_CHAR(' '); }
51
 void serial_spaces(uint8_t count) { count *= (PROPORTIONAL_FONT_RATIO); while (count--) SERIAL_CHAR(' '); }
52
 
52
 
53
-void serial_ternary(const bool onoff, PGM_P const pre, PGM_P const on, PGM_P const off, PGM_P const post/*=NULL*/) {
53
+void serial_ternary(const bool onoff, PGM_P const pre, PGM_P const on, PGM_P const off, PGM_P const post/*=nullptr*/) {
54
   if (pre) serialprintPGM(pre);
54
   if (pre) serialprintPGM(pre);
55
   serialprintPGM(onoff ? on : off);
55
   serialprintPGM(onoff ? on : off);
56
   if (post) serialprintPGM(post);
56
   if (post) serialprintPGM(post);

+ 2
- 2
Marlin/src/core/serial.h 查看文件

174
 void serialprintPGM(PGM_P str);
174
 void serialprintPGM(PGM_P str);
175
 void serial_echo_start();
175
 void serial_echo_start();
176
 void serial_error_start();
176
 void serial_error_start();
177
-void serial_ternary(const bool onoff, PGM_P const pre, PGM_P const on, PGM_P const off, PGM_P const post=NULL);
177
+void serial_ternary(const bool onoff, PGM_P const pre, PGM_P const on, PGM_P const off, PGM_P const post=nullptr);
178
 void serialprint_onoff(const bool onoff);
178
 void serialprint_onoff(const bool onoff);
179
 void serialprintln_onoff(const bool onoff);
179
 void serialprintln_onoff(const bool onoff);
180
 void serialprint_truefalse(const bool tf);
180
 void serialprint_truefalse(const bool tf);
185
 void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z);
185
 void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z);
186
 void print_xyz(PGM_P const prefix, PGM_P const suffix, const float xyz[]);
186
 void print_xyz(PGM_P const prefix, PGM_P const suffix, const float xyz[]);
187
 #define SERIAL_POS(SUFFIX,VAR) do { print_xyz(PSTR("  " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); } while(0)
187
 #define SERIAL_POS(SUFFIX,VAR) do { print_xyz(PSTR("  " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); } while(0)
188
-#define SERIAL_XYZ(PREFIX,...) do { print_xyz(PSTR(PREFIX), NULL, __VA_ARGS__); } while(0)
188
+#define SERIAL_XYZ(PREFIX,...) do { print_xyz(PSTR(PREFIX), nullptr, __VA_ARGS__); } while(0)

+ 5
- 5
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp 查看文件

330
       else {
330
       else {
331
         while (g29_repetition_cnt--) {
331
         while (g29_repetition_cnt--) {
332
           if (cnt > 20) { cnt = 0; idle(); }
332
           if (cnt > 20) { cnt = 0; idle(); }
333
-          const mesh_index_pair location = find_closest_mesh_point_of_type(REAL, g29_x_pos, g29_y_pos, USE_NOZZLE_AS_REFERENCE, NULL);
333
+          const mesh_index_pair location = find_closest_mesh_point_of_type(REAL, g29_x_pos, g29_y_pos, USE_NOZZLE_AS_REFERENCE, nullptr);
334
           if (location.x_index < 0) {
334
           if (location.x_index < 0) {
335
             // No more REACHABLE mesh points to invalidate, so we ASSUME the user
335
             // No more REACHABLE mesh points to invalidate, so we ASSUME the user
336
             // meant to invalidate the ENTIRE mesh, which cannot be done with
336
             // meant to invalidate the ENTIRE mesh, which cannot be done with
528
             }
528
             }
529
             else {
529
             else {
530
               while (g29_repetition_cnt--) {  // this only populates reachable mesh points near
530
               while (g29_repetition_cnt--) {  // this only populates reachable mesh points near
531
-                const mesh_index_pair location = find_closest_mesh_point_of_type(INVALID, g29_x_pos, g29_y_pos, USE_NOZZLE_AS_REFERENCE, NULL);
531
+                const mesh_index_pair location = find_closest_mesh_point_of_type(INVALID, g29_x_pos, g29_y_pos, USE_NOZZLE_AS_REFERENCE, nullptr);
532
                 if (location.x_index < 0) {
532
                 if (location.x_index < 0) {
533
                   // No more REACHABLE INVALID mesh points to populate, so we ASSUME
533
                   // No more REACHABLE INVALID mesh points to populate, so we ASSUME
534
                   // user meant to populate ALL INVALID mesh points to value
534
                   // user meant to populate ALL INVALID mesh points to value
759
         if (do_furthest)
759
         if (do_furthest)
760
           location = find_furthest_invalid_mesh_point();
760
           location = find_furthest_invalid_mesh_point();
761
         else
761
         else
762
-          location = find_closest_mesh_point_of_type(INVALID, rx, ry, USE_PROBE_AS_REFERENCE, NULL);
762
+          location = find_closest_mesh_point_of_type(INVALID, rx, ry, USE_PROBE_AS_REFERENCE, nullptr);
763
 
763
 
764
         if (location.x_index >= 0) {    // mesh point found and is reachable by probe
764
         if (location.x_index >= 0) {    // mesh point found and is reachable by probe
765
           const float rawx = mesh_index_to_xpos(location.x_index),
765
           const float rawx = mesh_index_to_xpos(location.x_index),
793
 
793
 
794
     typedef void (*clickFunc_t)();
794
     typedef void (*clickFunc_t)();
795
 
795
 
796
-    bool click_and_hold(const clickFunc_t func=NULL) {
796
+    bool click_and_hold(const clickFunc_t func=nullptr) {
797
       if (ui.button_pressed()) {
797
       if (ui.button_pressed()) {
798
         ui.quick_feedback(false);                // Preserve button state for click-and-hold
798
         ui.quick_feedback(false);                // Preserve button state for click-and-hold
799
         const millis_t nxt = millis() + 1500UL;
799
         const millis_t nxt = millis() + 1500UL;
891
 
891
 
892
       mesh_index_pair location;
892
       mesh_index_pair location;
893
       do {
893
       do {
894
-        location = find_closest_mesh_point_of_type(INVALID, rx, ry, USE_NOZZLE_AS_REFERENCE, NULL);
894
+        location = find_closest_mesh_point_of_type(INVALID, rx, ry, USE_NOZZLE_AS_REFERENCE, nullptr);
895
         // It doesn't matter if the probe can't reach the NAN location. This is a manual probe.
895
         // It doesn't matter if the probe can't reach the NAN location. This is a manual probe.
896
         if (location.x_index < 0 && location.y_index < 0) continue;
896
         if (location.x_index < 0 && location.y_index < 0) continue;
897
 
897
 

+ 1
- 1
Marlin/src/feature/host_actions.cpp 查看文件

84
   void host_action_prompt_button(const char * const pstr) { host_action_prompt_plus(PSTR("button"), pstr); }
84
   void host_action_prompt_button(const char * const pstr) { host_action_prompt_plus(PSTR("button"), pstr); }
85
   void host_action_prompt_end() { host_action_prompt(PSTR("end")); }
85
   void host_action_prompt_end() { host_action_prompt(PSTR("end")); }
86
   void host_action_prompt_show() { host_action_prompt(PSTR("show")); }
86
   void host_action_prompt_show() { host_action_prompt(PSTR("show")); }
87
-  void host_prompt_do(const PromptReason reason, const char * const pstr, const char * const pbtn/*=NULL*/) {
87
+  void host_prompt_do(const PromptReason reason, const char * const pstr, const char * const pbtn/*=nullptr*/) {
88
     host_prompt_reason = reason;
88
     host_prompt_reason = reason;
89
     host_action_prompt_end();
89
     host_action_prompt_end();
90
     host_action_prompt_begin(pstr);
90
     host_action_prompt_begin(pstr);

+ 2
- 2
Marlin/src/feature/host_actions.h 查看文件

64
   void host_action_prompt_button(const char * const pstr);
64
   void host_action_prompt_button(const char * const pstr);
65
   void host_action_prompt_end();
65
   void host_action_prompt_end();
66
   void host_action_prompt_show();
66
   void host_action_prompt_show();
67
-  void host_prompt_do(const PromptReason type, const char * const pstr, const char * const pbtn=NULL);
68
-  inline void host_prompt_open(const PromptReason reason, const char * const pstr, const char * const pbtn=NULL) {
67
+  void host_prompt_do(const PromptReason type, const char * const pstr, const char * const pbtn=nullptr);
68
+  inline void host_prompt_open(const PromptReason reason, const char * const pstr, const char * const pbtn=nullptr) {
69
     if (host_prompt_reason == PROMPT_NOT_DEFINED) host_prompt_do(reason, pstr, pbtn);
69
     if (host_prompt_reason == PROMPT_NOT_DEFINED) host_prompt_do(reason, pstr, pbtn);
70
   }
70
   }
71
 
71
 

+ 1
- 1
Marlin/src/feature/twibus.cpp 查看文件

162
     echodata(bytes, PSTR("i2c-receive"), 0);
162
     echodata(bytes, PSTR("i2c-receive"), 0);
163
   }
163
   }
164
 
164
 
165
-  void TWIBus::reply(char str[]/*=NULL*/) {
165
+  void TWIBus::reply(char str[]/*=nullptr*/) {
166
     #if ENABLED(DEBUG_TWIBUS)
166
     #if ENABLED(DEBUG_TWIBUS)
167
       debug(PSTR("reply"), str);
167
       debug(PSTR("reply"), str);
168
     #endif
168
     #endif

+ 1
- 1
Marlin/src/feature/twibus.h 查看文件

217
        * @details Send the buffer and clear it.
217
        * @details Send the buffer and clear it.
218
        *          If a string is passed, write it into the buffer first.
218
        *          If a string is passed, write it into the buffer first.
219
        */
219
        */
220
-      void reply(char str[]=NULL);
220
+      void reply(char str[]=nullptr);
221
       inline void reply(const char str[]) { this->reply((char*)str); }
221
       inline void reply(const char str[]) { this->reply((char*)str); }
222
 
222
 
223
     #endif
223
     #endif

+ 1
- 1
Marlin/src/gcode/bedlevel/ubl/M421.cpp 查看文件

55
              hasQ = !hasZ && parser.seen('Q');
55
              hasQ = !hasZ && parser.seen('Q');
56
 
56
 
57
   if (hasC) {
57
   if (hasC) {
58
-    const mesh_index_pair location = ubl.find_closest_mesh_point_of_type(REAL, current_position[X_AXIS], current_position[Y_AXIS], USE_NOZZLE_AS_REFERENCE, NULL);
58
+    const mesh_index_pair location = ubl.find_closest_mesh_point_of_type(REAL, current_position[X_AXIS], current_position[Y_AXIS], USE_NOZZLE_AS_REFERENCE, nullptr);
59
     ix = location.x_index;
59
     ix = location.x_index;
60
     iy = location.y_index;
60
     iy = location.y_index;
61
   }
61
   }

+ 1
- 1
Marlin/src/gcode/calibrate/G425.cpp 查看文件

205
  *   axis               in     - Axis along which the measurement will take place
205
  *   axis               in     - Axis along which the measurement will take place
206
  *   dir                in     - Direction along that axis (-1 or 1)
206
  *   dir                in     - Direction along that axis (-1 or 1)
207
  *   stop_state         in     - Move until probe pin becomes this value
207
  *   stop_state         in     - Move until probe pin becomes this value
208
- *   backlash_ptr       in/out - When not NULL, measure and record axis backlash
208
+ *   backlash_ptr       in/out - When not nullptr, measure and record axis backlash
209
  *   uncertainty        in     - If uncertainty is CALIBRATION_MEASUREMENT_UNKNOWN, do a fast probe.
209
  *   uncertainty        in     - If uncertainty is CALIBRATION_MEASUREMENT_UNKNOWN, do a fast probe.
210
  */
210
  */
211
 inline float measure(const AxisEnum axis, const int dir, const bool stop_state, float * const backlash_ptr, const float uncertainty) {
211
 inline float measure(const AxisEnum axis, const int dir, const bool stop_state, float * const backlash_ptr, const float uncertainty) {

+ 2
- 2
Marlin/src/gcode/calibrate/M100.cpp 查看文件

194
   }
194
   }
195
   SERIAL_ECHOPAIR("  block_found=", block_cnt);
195
   SERIAL_ECHOPAIR("  block_found=", block_cnt);
196
 
196
 
197
-  if (block_cnt != 1 || __brkval != NULL)
197
+  if (block_cnt != 1 || __brkval != nullptr)
198
     SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area.");
198
     SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area.");
199
 
199
 
200
   if (block_cnt == 0)       // Make sure the special case of no free blocks shows up as an
200
   if (block_cnt == 0)       // Make sure the special case of no free blocks shows up as an
217
  */
217
  */
218
 inline void free_memory_pool_report(char * const ptr, const int32_t size) {
218
 inline void free_memory_pool_report(char * const ptr, const int32_t size) {
219
   int32_t max_cnt = -1, block_cnt = 0;
219
   int32_t max_cnt = -1, block_cnt = 0;
220
-  char *max_addr = NULL;
220
+  char *max_addr = nullptr;
221
   // Find the longest block of test bytes in the buffer
221
   // Find the longest block of test bytes in the buffer
222
   for (int32_t i = 0; i < size; i++) {
222
   for (int32_t i = 0; i < size; i++) {
223
     char *addr = ptr + i;
223
     char *addr = ptr + i;

+ 4
- 4
Marlin/src/gcode/parser.cpp 查看文件

80
  * this may be optimized by commenting out ZERO(param)
80
  * this may be optimized by commenting out ZERO(param)
81
  */
81
  */
82
 void GCodeParser::reset() {
82
 void GCodeParser::reset() {
83
-  string_arg = NULL;                    // No whole line argument
83
+  string_arg = nullptr;                 // No whole line argument
84
   command_letter = '?';                 // No command letter
84
   command_letter = '?';                 // No command letter
85
   codenum = 0;                          // No command code
85
   codenum = 0;                          // No command code
86
   #if USE_GCODE_SUBCODES
86
   #if USE_GCODE_SUBCODES
245
    * This allows M0/M1 with expire time to work: "M0 S5 You Win!"
245
    * This allows M0/M1 with expire time to work: "M0 S5 You Win!"
246
    * For 'M118' you must use 'E1' and 'A1' rather than just 'E' or 'A'
246
    * For 'M118' you must use 'E1' and 'A1' rather than just 'E' or 'A'
247
    */
247
    */
248
-  string_arg = NULL;
248
+  string_arg = nullptr;
249
   while (const char code = *p++) {                    // Get the next parameter. A NUL ends the loop
249
   while (const char code = *p++) {                    // Get the next parameter. A NUL ends the loop
250
 
250
 
251
     // Special handling for M32 [P] !/path/to/file.g#
251
     // Special handling for M32 [P] !/path/to/file.g#
289
       #endif
289
       #endif
290
 
290
 
291
       #if ENABLED(FASTER_GCODE_PARSER)
291
       #if ENABLED(FASTER_GCODE_PARSER)
292
-        set(code, has_num ? p : NULL);          // Set parameter exists and pointer (NULL for no number)
292
+        set(code, has_num ? p : nullptr);       // Set parameter exists and pointer (nullptr for no number)
293
       #endif
293
       #endif
294
     }
294
     }
295
     else if (!string_arg) {                     // Not A-Z? First time, keep as the string_arg
295
     else if (!string_arg) {                     // Not A-Z? First time, keep as the string_arg
315
       if (next_command) {
315
       if (next_command) {
316
         while (*next_command && *next_command != ' ') ++next_command;
316
         while (*next_command && *next_command != ' ') ++next_command;
317
         while (*next_command == ' ') ++next_command;
317
         while (*next_command == ' ') ++next_command;
318
-        if (!*next_command) next_command = NULL;
318
+        if (!*next_command) next_command = nullptr;
319
       }
319
       }
320
     #else
320
     #else
321
       const char *next_command = command_args;
321
       const char *next_command = command_args;

+ 7
- 7
Marlin/src/gcode/parser.h 查看文件

135
       const bool b = TEST32(codebits, ind);
135
       const bool b = TEST32(codebits, ind);
136
       if (b) {
136
       if (b) {
137
         char * const ptr = command_ptr + param[ind];
137
         char * const ptr = command_ptr + param[ind];
138
-        value_ptr = param[ind] && valid_float(ptr) ? ptr : (char*)NULL;
138
+        value_ptr = param[ind] && valid_float(ptr) ? ptr : nullptr;
139
       }
139
       }
140
       return b;
140
       return b;
141
     }
141
     }
178
     static inline bool seen(const char c) {
178
     static inline bool seen(const char c) {
179
       char *p = strchr(command_args, c);
179
       char *p = strchr(command_args, c);
180
       const bool b = !!p;
180
       const bool b = !!p;
181
-      if (b) value_ptr = valid_float(&p[1]) ? &p[1] : (char*)NULL;
181
+      if (b) value_ptr = valid_float(&p[1]) ? &p[1] : nullptr;
182
       return b;
182
       return b;
183
     }
183
     }
184
 
184
 
210
   #endif
210
   #endif
211
 
211
 
212
   // The code value pointer was set
212
   // The code value pointer was set
213
-  FORCE_INLINE static bool has_value() { return value_ptr != NULL; }
213
+  FORCE_INLINE static bool has_value() { return value_ptr != nullptr; }
214
 
214
 
215
   // Seen a parameter with a value
215
   // Seen a parameter with a value
216
   static inline bool seenval(const char c) { return seen(c) && has_value(); }
216
   static inline bool seenval(const char c) { return seen(c) && has_value(); }
224
         if (c == '\0' || c == ' ') break;
224
         if (c == '\0' || c == ' ') break;
225
         if (c == 'E' || c == 'e') {
225
         if (c == 'E' || c == 'e') {
226
           *e = '\0';
226
           *e = '\0';
227
-          const float ret = strtof(value_ptr, NULL);
227
+          const float ret = strtof(value_ptr, nullptr);
228
           *e = c;
228
           *e = c;
229
           return ret;
229
           return ret;
230
         }
230
         }
231
         ++e;
231
         ++e;
232
       }
232
       }
233
-      return strtof(value_ptr, NULL);
233
+      return strtof(value_ptr, nullptr);
234
     }
234
     }
235
     return 0;
235
     return 0;
236
   }
236
   }
237
 
237
 
238
   // Code value as a long or ulong
238
   // Code value as a long or ulong
239
-  static inline int32_t value_long() { return value_ptr ? strtol(value_ptr, NULL, 10) : 0L; }
240
-  static inline uint32_t value_ulong() { return value_ptr ? strtoul(value_ptr, NULL, 10) : 0UL; }
239
+  static inline int32_t value_long() { return value_ptr ? strtol(value_ptr, nullptr, 10) : 0L; }
240
+  static inline uint32_t value_ulong() { return value_ptr ? strtoul(value_ptr, nullptr, 10) : 0UL; }
241
 
241
 
242
   // Code value for use as time
242
   // Code value for use as time
243
   static inline millis_t value_millis() { return value_ulong(); }
243
   static inline millis_t value_millis() { return value_ulong(); }

+ 10
- 10
Marlin/src/gcode/queue.cpp 查看文件

76
 bool send_ok[BUFSIZE];
76
 bool send_ok[BUFSIZE];
77
 
77
 
78
 /**
78
 /**
79
- * Next Injected Command pointer. NULL if no commands are being injected.
79
+ * Next Injected Command pointer. nullptr if no commands are being injected.
80
  * Used by Marlin internally to ensure that commands initiated from within
80
  * Used by Marlin internally to ensure that commands initiated from within
81
  * are enqueued ahead of any pending serial or sd card commands.
81
  * are enqueued ahead of any pending serial or sd card commands.
82
  */
82
  */
83
-static PGM_P injected_commands_P = NULL;
83
+static PGM_P injected_commands_P = nullptr;
84
 
84
 
85
 void queue_setup() {
85
 void queue_setup() {
86
   // Send "ok" after commands by default
86
   // Send "ok" after commands by default
157
  * Return true if any immediate commands remain to inject.
157
  * Return true if any immediate commands remain to inject.
158
  */
158
  */
159
 static bool drain_injected_commands_P() {
159
 static bool drain_injected_commands_P() {
160
-  if (injected_commands_P != NULL) {
160
+  if (injected_commands_P != nullptr) {
161
     size_t i = 0;
161
     size_t i = 0;
162
     char c, cmd[60];
162
     char c, cmd[60];
163
     strncpy_P(cmd, injected_commands_P, sizeof(cmd) - 1);
163
     strncpy_P(cmd, injected_commands_P, sizeof(cmd) - 1);
165
     while ((c = cmd[i]) && c != '\n') i++; // find the end of this gcode command
165
     while ((c = cmd[i]) && c != '\n') i++; // find the end of this gcode command
166
     cmd[i] = '\0';
166
     cmd[i] = '\0';
167
     if (enqueue_and_echo_command(cmd))     // success?
167
     if (enqueue_and_echo_command(cmd))     // success?
168
-      injected_commands_P = c ? injected_commands_P + i + 1 : NULL; // next command or done
168
+      injected_commands_P = c ? injected_commands_P + i + 1 : nullptr; // next command or done
169
   }
169
   }
170
-  return (injected_commands_P != NULL);    // return whether any more remain
170
+  return (injected_commands_P != nullptr);    // return whether any more remain
171
 }
171
 }
172
 
172
 
173
 /**
173
 /**
597
         char* command = serial_line_buffer[i];
597
         char* command = serial_line_buffer[i];
598
 
598
 
599
         while (*command == ' ') command++;                // Skip leading spaces
599
         while (*command == ' ') command++;                // Skip leading spaces
600
-        char *npos = (*command == 'N') ? command : NULL;  // Require the N parameter to start the line
600
+        char *npos = (*command == 'N') ? command : nullptr;  // Require the N parameter to start the line
601
 
601
 
602
         if (npos) {
602
         if (npos) {
603
 
603
 
604
-          bool M110 = strstr_P(command, PSTR("M110")) != NULL;
604
+          bool M110 = strstr_P(command, PSTR("M110")) != nullptr;
605
 
605
 
606
           if (M110) {
606
           if (M110) {
607
             char* n2pos = strchr(command + 4, 'N');
607
             char* n2pos = strchr(command + 4, 'N');
608
             if (n2pos) npos = n2pos;
608
             if (n2pos) npos = n2pos;
609
           }
609
           }
610
 
610
 
611
-          gcode_N = strtol(npos + 1, NULL, 10);
611
+          gcode_N = strtol(npos + 1, nullptr, 10);
612
 
612
 
613
           if (gcode_N != gcode_LastN + 1 && !M110)
613
           if (gcode_N != gcode_LastN + 1 && !M110)
614
             return gcode_line_error(PSTR(MSG_ERR_LINE_NO), i);
614
             return gcode_line_error(PSTR(MSG_ERR_LINE_NO), i);
617
           if (apos) {
617
           if (apos) {
618
             uint8_t checksum = 0, count = uint8_t(apos - command);
618
             uint8_t checksum = 0, count = uint8_t(apos - command);
619
             while (count) checksum ^= command[--count];
619
             while (count) checksum ^= command[--count];
620
-            if (strtol(apos + 1, NULL, 10) != checksum)
620
+            if (strtol(apos + 1, nullptr, 10) != checksum)
621
               return gcode_line_error(PSTR(MSG_ERR_CHECKSUM_MISMATCH), i);
621
               return gcode_line_error(PSTR(MSG_ERR_CHECKSUM_MISMATCH), i);
622
           }
622
           }
623
           else
623
           else
635
         if (IsStopped()) {
635
         if (IsStopped()) {
636
           char* gpos = strchr(command, 'G');
636
           char* gpos = strchr(command, 'G');
637
           if (gpos) {
637
           if (gpos) {
638
-            switch (strtol(gpos + 1, NULL, 10)) {
638
+            switch (strtol(gpos + 1, nullptr, 10)) {
639
               case 0:
639
               case 0:
640
               case 1:
640
               case 1:
641
               #if ENABLED(ARC_SUPPORT)
641
               #if ENABLED(ARC_SUPPORT)

+ 3
- 3
Marlin/src/inc/SanityCheck.h 查看文件

560
 #endif
560
 #endif
561
 
561
 
562
 #if defined(EVENT_GCODE_SD_STOP) && DISABLED(NOZZLE_PARK_FEATURE)
562
 #if defined(EVENT_GCODE_SD_STOP) && DISABLED(NOZZLE_PARK_FEATURE)
563
-  static_assert(NULL == strstr(EVENT_GCODE_SD_STOP, "G27"), "NOZZLE_PARK_FEATURE is required to use G27 in EVENT_GCODE_SD_STOP.");
563
+  static_assert(nullptr == strstr(EVENT_GCODE_SD_STOP, "G27"), "NOZZLE_PARK_FEATURE is required to use G27 in EVENT_GCODE_SD_STOP.");
564
 #endif
564
 #endif
565
 
565
 
566
 /**
566
 /**
620
   #elif FILAMENT_RUNOUT_DISTANCE_MM < 0
620
   #elif FILAMENT_RUNOUT_DISTANCE_MM < 0
621
     #error "FILAMENT_RUNOUT_DISTANCE_MM must be greater than or equal to zero."
621
     #error "FILAMENT_RUNOUT_DISTANCE_MM must be greater than or equal to zero."
622
   #elif DISABLED(ADVANCED_PAUSE_FEATURE)
622
   #elif DISABLED(ADVANCED_PAUSE_FEATURE)
623
-    static_assert(NULL == strstr(FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with FILAMENT_RUNOUT_SENSOR.");
623
+    static_assert(nullptr == strstr(FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with FILAMENT_RUNOUT_SENSOR.");
624
   #endif
624
   #endif
625
 #endif
625
 #endif
626
 
626
 
2176
   #elif EXTRUDERS != 5
2176
   #elif EXTRUDERS != 5
2177
     #error "PRUSA_MMU2 requires EXTRUDERS = 5."
2177
     #error "PRUSA_MMU2 requires EXTRUDERS = 5."
2178
   #elif DISABLED(ADVANCED_PAUSE_FEATURE)
2178
   #elif DISABLED(ADVANCED_PAUSE_FEATURE)
2179
-    static_assert(NULL == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with PRUSA_MMU2.");
2179
+    static_assert(nullptr == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with PRUSA_MMU2.");
2180
   #endif
2180
   #endif
2181
 #endif
2181
 #endif
2182
 
2182
 

+ 2
- 2
Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp 查看文件

889
   int ret;
889
   int ret;
890
   size_t idx = 0;
890
   size_t idx = 0;
891
   hd44780_charmap_t pinval;
891
   hd44780_charmap_t pinval;
892
-  hd44780_charmap_t *copy_address = NULL;
892
+  hd44780_charmap_t *copy_address = nullptr;
893
   pinval.uchar = c;
893
   pinval.uchar = c;
894
   pinval.idx = -1;
894
   pinval.idx = -1;
895
 
895
 
900
     lcd.write((uint8_t)c);
900
     lcd.write((uint8_t)c);
901
     return 1;
901
     return 1;
902
   }
902
   }
903
-  copy_address = NULL;
903
+  copy_address = nullptr;
904
   ret = pf_bsearch_r((void *)g_hd44780_charmap_device, COUNT(g_hd44780_charmap_device), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx);
904
   ret = pf_bsearch_r((void *)g_hd44780_charmap_device, COUNT(g_hd44780_charmap_device), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx);
905
   if (ret >= 0) {
905
   if (ret >= 0) {
906
     copy_address = (hd44780_charmap_t *)(g_hd44780_charmap_device + idx);
906
     copy_address = (hd44780_charmap_t *)(g_hd44780_charmap_device + idx);

+ 3
- 3
Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp 查看文件

992
 
992
 
993
   #endif // ADVANCED_PAUSE_FEATURE
993
   #endif // ADVANCED_PAUSE_FEATURE
994
 
994
 
995
-  void draw_menu_item_static(const uint8_t row, PGM_P pstr, const bool center/*=true*/, const bool invert/*=false*/, const char *valstr/*=NULL*/) {
995
+  void draw_menu_item_static(const uint8_t row, PGM_P pstr, const bool center/*=true*/, const bool invert/*=false*/, const char *valstr/*=nullptr*/) {
996
     UNUSED(invert);
996
     UNUSED(invert);
997
     int8_t n = LCD_WIDTH;
997
     int8_t n = LCD_WIDTH;
998
     lcd_moveto(0, row);
998
     lcd_moveto(0, row);
1024
     if (pgm) lcd_put_u8str_P(data); else lcd_put_u8str(data);
1024
     if (pgm) lcd_put_u8str_P(data); else lcd_put_u8str(data);
1025
   }
1025
   }
1026
 
1026
 
1027
-  void draw_edit_screen(PGM_P const pstr, const char* const value/*=NULL*/) {
1027
+  void draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) {
1028
     lcd_moveto(0, 1);
1028
     lcd_moveto(0, 1);
1029
     lcd_put_u8str_P(pstr);
1029
     lcd_put_u8str_P(pstr);
1030
-    if (value != NULL) {
1030
+    if (value != nullptr) {
1031
       lcd_put_wchar(':');
1031
       lcd_put_wchar(':');
1032
       int len = utf8_strlen(value);
1032
       int len = utf8_strlen(value);
1033
       const uint8_t valrow = (utf8_strlen_P(pstr) + 1 + len + 1) > (LCD_WIDTH - 2) ? 2 : 1;   // Value on the next row if it won't fit
1033
       const uint8_t valrow = (utf8_strlen_P(pstr) + 1 + len + 1) > (LCD_WIDTH - 2) ? 2 : 1;   // Value on the next row if it won't fit

+ 6
- 6
Marlin/src/lcd/dogm/u8g_fontutf8.cpp 查看文件

64
   uxg_fontinfo_t vcmp = {(uint16_t)(val / 128), (uint8_t)(val % 128 + 128), (uint8_t)(val % 128 + 128), 0, 0};
64
   uxg_fontinfo_t vcmp = {(uint16_t)(val / 128), (uint8_t)(val % 128 + 128), (uint8_t)(val % 128 + 128), 0, 0};
65
   size_t idx = 0;
65
   size_t idx = 0;
66
 
66
 
67
-  if (val < 256) return NULL;
67
+  if (val < 256) return nullptr;
68
 
68
 
69
   if (pf_bsearch_r((void*)root->m_fntifo, root->m_fntinfo_num, pf_bsearch_cb_comp_fntifo_pgm, (void*)&vcmp, &idx) < 0)
69
   if (pf_bsearch_r((void*)root->m_fntifo, root->m_fntinfo_num, pf_bsearch_cb_comp_fntifo_pgm, (void*)&vcmp, &idx) < 0)
70
-    return NULL;
70
+    return nullptr;
71
 
71
 
72
   memcpy_P(&vcmp, root->m_fntifo + idx, sizeof(vcmp));
72
   memcpy_P(&vcmp, root->m_fntifo + idx, sizeof(vcmp));
73
   return vcmp.fntdata;
73
   return vcmp.fntdata;
114
 }
114
 }
115
 
115
 
116
 static bool flag_fontgroup_was_inited = false;
116
 static bool flag_fontgroup_was_inited = false;
117
-static font_group_t g_fontgroup_root = {NULL, 0};
117
+static font_group_t g_fontgroup_root = { nullptr, 0 };
118
 
118
 
119
 /**
119
 /**
120
  * @brief check if font is loaded
120
  * @brief check if font is loaded
176
   data.y = y;
176
   data.y = y;
177
   data.adv = 0;
177
   data.adv = 0;
178
   data.max_width = max_width;
178
   data.max_width = max_width;
179
-  data.fnt_prev = NULL;
179
+  data.fnt_prev = nullptr;
180
   fontgroup_drawwchar(group, fnt_default, ch, (void*)&data, fontgroup_cb_draw_u8g);
180
   fontgroup_drawwchar(group, fnt_default, ch, (void*)&data, fontgroup_cb_draw_u8g);
181
   u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default);
181
   u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default);
182
 
182
 
210
   data.y = y;
210
   data.y = y;
211
   data.adv = 0;
211
   data.adv = 0;
212
   data.max_width = max_width;
212
   data.max_width = max_width;
213
-  data.fnt_prev = NULL;
213
+  data.fnt_prev = nullptr;
214
   fontgroup_drawstring(group, fnt_default, utf8_msg, read_byte_ram, (void*)&data, fontgroup_cb_draw_u8g);
214
   fontgroup_drawstring(group, fnt_default, utf8_msg, read_byte_ram, (void*)&data, fontgroup_cb_draw_u8g);
215
   u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default);
215
   u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default);
216
 
216
 
244
   data.y = y;
244
   data.y = y;
245
   data.adv = 0;
245
   data.adv = 0;
246
   data.max_width = max_width;
246
   data.max_width = max_width;
247
-  data.fnt_prev = NULL;
247
+  data.fnt_prev = nullptr;
248
   fontgroup_drawstring(group, fnt_default, utf8_msg, read_byte_rom, (void*)&data, fontgroup_cb_draw_u8g);
248
   fontgroup_drawstring(group, fnt_default, utf8_msg, read_byte_rom, (void*)&data, fontgroup_cb_draw_u8g);
249
   u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default);
249
   u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default);
250
 
250
 

+ 3
- 3
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp 查看文件

330
   }
330
   }
331
 
331
 
332
   // Draw a static line of text in the same idiom as a menu item
332
   // Draw a static line of text in the same idiom as a menu item
333
-  void draw_menu_item_static(const uint8_t row, PGM_P pstr, const bool center/*=true*/, const bool invert/*=false*/, const char* valstr/*=NULL*/) {
333
+  void draw_menu_item_static(const uint8_t row, PGM_P pstr, const bool center/*=true*/, const bool invert/*=false*/, const char* valstr/*=nullptr*/) {
334
 
334
 
335
     if (mark_as_selected(row, invert)) {
335
     if (mark_as_selected(row, invert)) {
336
 
336
 
373
     }
373
     }
374
   }
374
   }
375
 
375
 
376
-  void draw_edit_screen(PGM_P const pstr, const char* const value/*=NULL*/) {
376
+  void draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) {
377
     const uint8_t labellen = utf8_strlen_P(pstr), vallen = utf8_strlen(value);
377
     const uint8_t labellen = utf8_strlen_P(pstr), vallen = utf8_strlen(value);
378
 
378
 
379
     bool extra_row = labellen > LCD_WIDTH - 2 - vallen;
379
     bool extra_row = labellen > LCD_WIDTH - 2 - vallen;
410
     }
410
     }
411
 
411
 
412
     // If a value is included, print a colon, then print the value right-justified
412
     // If a value is included, print a colon, then print the value right-justified
413
-    if (value != NULL) {
413
+    if (value != nullptr) {
414
       lcd_put_wchar(':');
414
       lcd_put_wchar(':');
415
       if (extra_row) {
415
       if (extra_row) {
416
         // Assume that value is numeric (with no descender)
416
         // Assume that value is numeric (with no descender)

+ 1
- 1
Marlin/src/lcd/menu/game/invaders.cpp 查看文件

302
         if (invader_count && !random(0, 20)) {
302
         if (invader_count && !random(0, 20)) {
303
 
303
 
304
           // Find a free bullet
304
           // Find a free bullet
305
-          laser_t *b = NULL;
305
+          laser_t *b = nullptr;
306
           LOOP_L_N(i, COUNT(bullet)) if (!bullet[i].v) { b = &bullet[i]; break; }
306
           LOOP_L_N(i, COUNT(bullet)) if (!bullet[i].v) { b = &bullet[i]; break; }
307
           if (b) {
307
           if (b) {
308
             // Pick a random shooter and update the bullet
308
             // Pick a random shooter and update the bullet

+ 3
- 3
Marlin/src/lcd/menu/menu.cpp 查看文件

136
   if (ui.should_draw())
136
   if (ui.should_draw())
137
     draw_edit_screen(editLabel, strfunc(ui.encoderPosition + minEditValue));
137
     draw_edit_screen(editLabel, strfunc(ui.encoderPosition + minEditValue));
138
   if (ui.lcd_clicked || (liveEdit && ui.should_draw())) {
138
   if (ui.lcd_clicked || (liveEdit && ui.should_draw())) {
139
-    if (editValue != NULL) loadfunc(editValue, ui.encoderPosition + minEditValue);
139
+    if (editValue != nullptr) loadfunc(editValue, ui.encoderPosition + minEditValue);
140
     if (callbackFunc && (liveEdit || ui.lcd_clicked)) (*callbackFunc)();
140
     if (callbackFunc && (liveEdit || ui.lcd_clicked)) (*callbackFunc)();
141
     if (ui.use_click()) ui.goto_previous_screen();
141
     if (ui.use_click()) ui.goto_previous_screen();
142
   }
142
   }
300
 
300
 
301
 // Display the synchronize screen with a custom message
301
 // Display the synchronize screen with a custom message
302
 // ** This blocks the command queue! **
302
 // ** This blocks the command queue! **
303
-void MarlinUI::synchronize(PGM_P const msg/*=NULL*/) {
303
+void MarlinUI::synchronize(PGM_P const msg/*=nullptr*/) {
304
   static const char moving[] PROGMEM = MSG_MOVING;
304
   static const char moving[] PROGMEM = MSG_MOVING;
305
   sync_message = msg ? msg : moving;
305
   sync_message = msg ? msg : moving;
306
   _synchronize();
306
   _synchronize();
445
 //
445
 //
446
 bool ui_selection; // = false
446
 bool ui_selection; // = false
447
 void set_ui_selection(const bool sel) { ui_selection = sel; }
447
 void set_ui_selection(const bool sel) { ui_selection = sel; }
448
-void do_select_screen(PGM_P const yes, PGM_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string/*=NULL*/, PGM_P const suff/*=NULL*/) {
448
+void do_select_screen(PGM_P const yes, PGM_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) {
449
   if (ui.encoderPosition) {
449
   if (ui.encoderPosition) {
450
     ui_selection = int16_t(ui.encoderPosition) > 0;
450
     ui_selection = int16_t(ui.encoderPosition) > 0;
451
     ui.encoderPosition = 0;
451
     ui.encoderPosition = 0;

+ 6
- 6
Marlin/src/lcd/menu/menu.h 查看文件

70
 typedef void (*selectFunc_t)();
70
 typedef void (*selectFunc_t)();
71
 void draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string, PGM_P const suff);
71
 void draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string, PGM_P const suff);
72
 void set_ui_selection(const bool sel);
72
 void set_ui_selection(const bool sel);
73
-void do_select_screen(PGM_P const yes, PGM_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string=NULL, PGM_P const suff=NULL);
74
-inline void do_select_screen_yn(selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string=NULL, PGM_P const suff=NULL) {
73
+void do_select_screen(PGM_P const yes, PGM_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr);
74
+inline void do_select_screen_yn(selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr) {
75
   do_select_screen(PSTR(MSG_YES), PSTR(MSG_NO), yesFunc, noFunc, pref, string, suff);
75
   do_select_screen(PSTR(MSG_YES), PSTR(MSG_NO), yesFunc, noFunc, pref, string, suff);
76
 }
76
 }
77
 
77
 
78
-void draw_edit_screen(PGM_P const pstr, const char* const value=NULL);
78
+void draw_edit_screen(PGM_P const pstr, const char* const value=nullptr);
79
 void draw_menu_item(const bool sel, const uint8_t row, PGM_P const pstr, const char pre_char, const char post_char);
79
 void draw_menu_item(const bool sel, const uint8_t row, PGM_P const pstr, const char pre_char, const char post_char);
80
-void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const bool center=true, const bool invert=false, const char *valstr=NULL);
80
+void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const bool center=true, const bool invert=false, const char *valstr=nullptr);
81
 void _draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm);
81
 void _draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm);
82
 FORCE_INLINE void draw_menu_item_back(const bool sel, const uint8_t row, PGM_P const pstr) { draw_menu_item(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]); }
82
 FORCE_INLINE void draw_menu_item_back(const bool sel, const uint8_t row, PGM_P const pstr) { draw_menu_item(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]); }
83
 FORCE_INLINE void draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data) { _draw_menu_item_edit(sel, row, pstr, data, false); }
83
 FORCE_INLINE void draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data) { _draw_menu_item_edit(sel, row, pstr, data, false); }
187
     static void load(void *ptr, const int16_t value)  { *((type_t*)ptr) = unscale(value);     }
187
     static void load(void *ptr, const int16_t value)  { *((type_t*)ptr) = unscale(value);     }
188
     static char* to_string(const int16_t value)       { return NAME::strfunc(unscale(value)); }
188
     static char* to_string(const int16_t value)       { return NAME::strfunc(unscale(value)); }
189
   public:
189
   public:
190
-    static void action_edit(PGM_P const pstr, type_t * const ptr, const type_t minValue, const type_t maxValue, const screenFunc_t callback=NULL, const bool live=false) {
190
+    static void action_edit(PGM_P const pstr, type_t * const ptr, const type_t minValue, const type_t maxValue, const screenFunc_t callback=nullptr, const bool live=false) {
191
       // Make sure minv and maxv fit within int16_t
191
       // Make sure minv and maxv fit within int16_t
192
       const int16_t minv = MAX(scale(minValue), INT16_MIN),
192
       const int16_t minv = MAX(scale(minValue), INT16_MIN),
193
                     maxv = MIN(scale(maxValue), INT16_MAX);
193
                     maxv = MIN(scale(maxValue), INT16_MAX);
218
 
218
 
219
 class MenuItem_bool {
219
 class MenuItem_bool {
220
   public:
220
   public:
221
-    static void action_edit(PGM_P const pstr, bool* ptr, const screenFunc_t callbackFunc=NULL);
221
+    static void action_edit(PGM_P const pstr, bool* ptr, const screenFunc_t callbackFunc=nullptr);
222
 };
222
 };
223
 
223
 
224
 ////////////////////////////////////////////
224
 ////////////////////////////////////////////

+ 1
- 1
Marlin/src/lcd/menu/menu_advanced.cpp 查看文件

610
         PSTR(MSG_BUTTON_INIT), PSTR(MSG_BUTTON_CANCEL),
610
         PSTR(MSG_BUTTON_INIT), PSTR(MSG_BUTTON_CANCEL),
611
         []{ ui.completion_feedback(settings.init_eeprom()); },
611
         []{ ui.completion_feedback(settings.init_eeprom()); },
612
         ui.goto_previous_screen,
612
         ui.goto_previous_screen,
613
-        PSTR(MSG_INIT_EEPROM), NULL, PSTR("?")
613
+        PSTR(MSG_INIT_EEPROM), nullptr, PSTR("?")
614
       );
614
       );
615
     }
615
     }
616
 
616
 

+ 1
- 1
Marlin/src/lcd/menu/menu_bed_corners.cpp 查看文件

102
       #else
102
       #else
103
         MSG_NEXT_CORNER
103
         MSG_NEXT_CORNER
104
       #endif
104
       #endif
105
-    ), NULL, PSTR("?")
105
+    ), nullptr, PSTR("?")
106
   );
106
   );
107
 }
107
 }
108
 
108
 

+ 2
- 2
Marlin/src/lcd/menu/menu_filament.cpp 查看文件

367
 // ADVANCED_PAUSE_FEATURE message screens
367
 // ADVANCED_PAUSE_FEATURE message screens
368
 //
368
 //
369
 
369
 
370
-void _lcd_pause_message(PGM_P const msg1, PGM_P const msg2=NULL, PGM_P const msg3=NULL) {
370
+void _lcd_pause_message(PGM_P const msg1, PGM_P const msg2=nullptr, PGM_P const msg3=nullptr) {
371
   START_SCREEN();
371
   START_SCREEN();
372
   STATIC_ITEM_P(pause_header(), true, true);
372
   STATIC_ITEM_P(pause_header(), true, true);
373
   STATIC_ITEM_P(msg1);
373
   STATIC_ITEM_P(msg1);
516
     case PAUSE_MESSAGE_STATUS:
516
     case PAUSE_MESSAGE_STATUS:
517
     default: break;
517
     default: break;
518
   }
518
   }
519
-  return NULL;
519
+  return nullptr;
520
 }
520
 }
521
 
521
 
522
 void lcd_pause_show_message(
522
 void lcd_pause_show_message(

+ 5
- 5
Marlin/src/lcd/menu/menu_main.cpp 查看文件

101
   }
101
   }
102
 
102
 
103
   void menu_abort_confirm() {
103
   void menu_abort_confirm() {
104
-    do_select_screen(PSTR(MSG_BUTTON_STOP), PSTR(MSG_BACK), lcd_abort_job, ui.goto_previous_screen, PSTR(MSG_STOP_PRINT), NULL, PSTR("?"));
104
+    do_select_screen(PSTR(MSG_BUTTON_STOP), PSTR(MSG_BACK), lcd_abort_job, ui.goto_previous_screen, PSTR(MSG_STOP_PRINT), nullptr, PSTR("?"));
105
   }
105
   }
106
 
106
 
107
 #endif // MACHINE_CAN_STOP
107
 #endif // MACHINE_CAN_STOP
189
       }
189
       }
190
       else {
190
       else {
191
         #if PIN_EXISTS(SD_DETECT)
191
         #if PIN_EXISTS(SD_DETECT)
192
-          MENU_ITEM(function, MSG_NO_CARD, NULL);
192
+          MENU_ITEM(function, MSG_NO_CARD, nullptr);
193
         #else
193
         #else
194
           MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21"));
194
           MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21"));
195
-          MENU_ITEM(function, MSG_SD_RELEASED, NULL);
195
+          MENU_ITEM(function, MSG_SD_RELEASED, nullptr);
196
         #endif
196
         #endif
197
       }
197
       }
198
     #endif // !HAS_ENCODER_WHEEL && SDSUPPORT
198
     #endif // !HAS_ENCODER_WHEEL && SDSUPPORT
276
     }
276
     }
277
     else {
277
     else {
278
       #if PIN_EXISTS(SD_DETECT)
278
       #if PIN_EXISTS(SD_DETECT)
279
-        MENU_ITEM(function, MSG_NO_CARD, NULL);
279
+        MENU_ITEM(function, MSG_NO_CARD, nullptr);
280
       #else
280
       #else
281
         MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21"));
281
         MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21"));
282
-        MENU_ITEM(function, MSG_SD_RELEASED, NULL);
282
+        MENU_ITEM(function, MSG_SD_RELEASED, nullptr);
283
       #endif
283
       #endif
284
     }
284
     }
285
   #endif // HAS_ENCODER_WHEEL && SDSUPPORT
285
   #endif // HAS_ENCODER_WHEEL && SDSUPPORT

+ 1
- 1
Marlin/src/lcd/menu/menu_mixer.cpp 查看文件

259
       ui.return_to_status();
259
       ui.return_to_status();
260
     },
260
     },
261
     ui.goto_previous_screen,
261
     ui.goto_previous_screen,
262
-    PSTR(MSG_RESET_VTOOLS), NULL, PSTR("?")
262
+    PSTR(MSG_RESET_VTOOLS), nullptr, PSTR("?")
263
   );
263
   );
264
 }
264
 }
265
 
265
 

+ 1
- 1
Marlin/src/lcd/ultralcd.cpp 查看文件

211
     }
211
     }
212
   }
212
   }
213
 
213
 
214
-  void MarlinUI::draw_select_screen_prompt(PGM_P const pref, const char * const string/*=NULL*/, PGM_P const suff/*=NULL*/) {
214
+  void MarlinUI::draw_select_screen_prompt(PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) {
215
     const uint8_t plen = utf8_strlen_P(pref), slen = suff ? utf8_strlen_P(suff) : 0;
215
     const uint8_t plen = utf8_strlen_P(pref), slen = suff ? utf8_strlen_P(suff) : 0;
216
     uint8_t x = 0, y = 0;
216
     uint8_t x = 0, y = 0;
217
     if (!string && plen + slen <= LCD_WIDTH) {
217
     if (!string && plen + slen <= LCD_WIDTH) {

+ 2
- 2
Marlin/src/lcd/ultralcd.h 查看文件

419
     static bool lcd_clicked;
419
     static bool lcd_clicked;
420
     static bool use_click();
420
     static bool use_click();
421
 
421
 
422
-    static void synchronize(PGM_P const msg=NULL);
422
+    static void synchronize(PGM_P const msg=nullptr);
423
 
423
 
424
     static screenFunc_t currentScreen;
424
     static screenFunc_t currentScreen;
425
     static void goto_screen(const screenFunc_t screen, const uint16_t encoder=0, const uint8_t top=0, const uint8_t items=0);
425
     static void goto_screen(const screenFunc_t screen, const uint16_t encoder=0, const uint8_t top=0, const uint8_t items=0);
458
       static void ubl_plot(const uint8_t x, const uint8_t inverted_y);
458
       static void ubl_plot(const uint8_t x, const uint8_t inverted_y);
459
     #endif
459
     #endif
460
 
460
 
461
-    static void draw_select_screen_prompt(PGM_P const pref, const char * const string=NULL, PGM_P const suff=NULL);
461
+    static void draw_select_screen_prompt(PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr);
462
 
462
 
463
   #elif HAS_SPI_LCD
463
   #elif HAS_SPI_LCD
464
 
464
 

+ 1
- 1
Marlin/src/libs/L6470/L6470_Marlin.cpp 查看文件

624
     #endif
624
     #endif
625
   };
625
   };
626
 
626
 
627
-  inline void append_stepper_err(char * &p, const uint8_t stepper_index, const char * const err=NULL) {
627
+  inline void append_stepper_err(char * &p, const uint8_t stepper_index, const char * const err=nullptr) {
628
     p += sprintf_P(p, PSTR("Stepper %c%c "), char(index_to_axis[stepper_index][0]), char(index_to_axis[stepper_index][1]));
628
     p += sprintf_P(p, PSTR("Stepper %c%c "), char(index_to_axis[stepper_index][0]), char(index_to_axis[stepper_index][1]));
629
     if (err) p += sprintf_P(p, err);
629
     if (err) p += sprintf_P(p, err);
630
   }
630
   }

+ 1
- 1
Marlin/src/libs/vector_3.cpp 查看文件

140
 }
140
 }
141
 
141
 
142
 void matrix_3x3::debug(PGM_P const title) {
142
 void matrix_3x3::debug(PGM_P const title) {
143
-  if (title != NULL) {
143
+  if (title != nullptr) {
144
     serialprintPGM(title);
144
     serialprintPGM(title);
145
     SERIAL_EOL();
145
     SERIAL_EOL();
146
   }
146
   }

+ 2
- 2
Marlin/src/module/configuration_store.cpp 查看文件

2132
       #endif
2132
       #endif
2133
     }
2133
     }
2134
 
2134
 
2135
-    void MarlinSettings::load_mesh(const int8_t slot, void * const into/*=NULL*/) {
2135
+    void MarlinSettings::load_mesh(const int8_t slot, void * const into/*=nullptr*/) {
2136
 
2136
 
2137
       #if ENABLED(AUTO_BED_LEVELING_UBL)
2137
       #if ENABLED(AUTO_BED_LEVELING_UBL)
2138
 
2138
 
2545
   #if HAS_TRINAMIC
2545
   #if HAS_TRINAMIC
2546
     inline void say_M906(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM("  M906"); }
2546
     inline void say_M906(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM("  M906"); }
2547
     #if HAS_STEALTHCHOP
2547
     #if HAS_STEALTHCHOP
2548
-      void say_M569(const char * const etc=NULL) {
2548
+      void say_M569(const char * const etc=nullptr) {
2549
         SERIAL_ECHOPGM("  M569 S1");
2549
         SERIAL_ECHOPGM("  M569 S1");
2550
         if (etc) {
2550
         if (etc) {
2551
           SERIAL_CHAR(' ');
2551
           SERIAL_CHAR(' ');

+ 1
- 1
Marlin/src/module/configuration_store.h 查看文件

65
         static uint16_t calc_num_meshes();
65
         static uint16_t calc_num_meshes();
66
         static int mesh_slot_offset(const int8_t slot);
66
         static int mesh_slot_offset(const int8_t slot);
67
         static void store_mesh(const int8_t slot);
67
         static void store_mesh(const int8_t slot);
68
-        static void load_mesh(const int8_t slot, void * const into=NULL);
68
+        static void load_mesh(const int8_t slot, void * const into=nullptr);
69
 
69
 
70
         //static void delete_mesh();    // necessary if we have a MAT
70
         //static void delete_mesh();    // necessary if we have a MAT
71
         //static void defrag_meshes();  // "
71
         //static void defrag_meshes();  // "

+ 1
- 1
Marlin/src/module/endstops.cpp 查看文件

377
   prev_hit_state = hit_state;
377
   prev_hit_state = hit_state;
378
 }
378
 }
379
 
379
 
380
-static void print_es_state(const bool is_hit, PGM_P const label=NULL) {
380
+static void print_es_state(const bool is_hit, PGM_P const label=nullptr) {
381
   if (label) serialprintPGM(label);
381
   if (label) serialprintPGM(label);
382
   SERIAL_ECHOPGM(": ");
382
   SERIAL_ECHOPGM(": ");
383
   serialprintPGM(is_hit ? PSTR(MSG_ENDSTOP_HIT) : PSTR(MSG_ENDSTOP_OPEN));
383
   serialprintPGM(is_hit ? PSTR(MSG_ENDSTOP_HIT) : PSTR(MSG_ENDSTOP_OPEN));

+ 3
- 3
Marlin/src/module/planner.cpp 查看文件

900
   // Reverse Pass: Coarsely maximize all possible deceleration curves back-planning from the last
900
   // Reverse Pass: Coarsely maximize all possible deceleration curves back-planning from the last
901
   // block in buffer. Cease planning when the last optimal planned or tail pointer is reached.
901
   // block in buffer. Cease planning when the last optimal planned or tail pointer is reached.
902
   // NOTE: Forward pass will later refine and correct the reverse pass to create an optimal plan.
902
   // NOTE: Forward pass will later refine and correct the reverse pass to create an optimal plan.
903
-  const block_t *next = NULL;
903
+  const block_t *next = nullptr;
904
   while (block_index != planned_block_index) {
904
   while (block_index != planned_block_index) {
905
 
905
 
906
     // Perform the reverse pass
906
     // Perform the reverse pass
995
   uint8_t block_index = block_buffer_planned;
995
   uint8_t block_index = block_buffer_planned;
996
 
996
 
997
   block_t *current;
997
   block_t *current;
998
-  const block_t * previous = NULL;
998
+  const block_t * previous = nullptr;
999
   while (block_index != block_buffer_head) {
999
   while (block_index != block_buffer_head) {
1000
 
1000
 
1001
     // Perform the forward pass
1001
     // Perform the forward pass
1045
   }
1045
   }
1046
 
1046
 
1047
   // Go from the tail (currently executed block) to the first block, without including it)
1047
   // Go from the tail (currently executed block) to the first block, without including it)
1048
-  block_t *current = NULL, *next = NULL;
1048
+  block_t *current = nullptr, *next = nullptr;
1049
   float current_entry_speed = 0.0, next_entry_speed = 0.0;
1049
   float current_entry_speed = 0.0, next_entry_speed = 0.0;
1050
   while (block_index != head_block_index) {
1050
   while (block_index != head_block_index) {
1051
 
1051
 

+ 4
- 4
Marlin/src/module/planner.h 查看文件

746
     FORCE_INLINE static bool has_blocks_queued() { return (block_buffer_head != block_buffer_tail); }
746
     FORCE_INLINE static bool has_blocks_queued() { return (block_buffer_head != block_buffer_tail); }
747
 
747
 
748
     /**
748
     /**
749
-     * The current block. NULL if the buffer is empty.
749
+     * The current block. nullptr if the buffer is empty.
750
      * This also marks the block as busy.
750
      * This also marks the block as busy.
751
      * WARNING: Called from Stepper ISR context!
751
      * WARNING: Called from Stepper ISR context!
752
      */
752
      */
763
           --delay_before_delivering;
763
           --delay_before_delivering;
764
           // If the number of movements queued is less than 3, and there is still time
764
           // If the number of movements queued is less than 3, and there is still time
765
           //  to wait, do not deliver anything
765
           //  to wait, do not deliver anything
766
-          if (nr_moves < 3 && delay_before_delivering) return NULL;
766
+          if (nr_moves < 3 && delay_before_delivering) return nullptr;
767
           delay_before_delivering = 0;
767
           delay_before_delivering = 0;
768
         }
768
         }
769
 
769
 
771
         block_t * const block = &block_buffer[block_buffer_tail];
771
         block_t * const block = &block_buffer[block_buffer_tail];
772
 
772
 
773
         // No trapezoid calculated? Don't execute yet.
773
         // No trapezoid calculated? Don't execute yet.
774
-        if (TEST(block->flag, BLOCK_BIT_RECALCULATE)) return NULL;
774
+        if (TEST(block->flag, BLOCK_BIT_RECALCULATE)) return nullptr;
775
 
775
 
776
         #if ENABLED(ULTRA_LCD)
776
         #if ENABLED(ULTRA_LCD)
777
           block_buffer_runtime_us -= block->segment_time_us; // We can't be sure how long an active block will take, so don't count it.
777
           block_buffer_runtime_us -= block->segment_time_us; // We can't be sure how long an active block will take, so don't count it.
793
         clear_block_buffer_runtime(); // paranoia. Buffer is empty now - so reset accumulated time to zero.
793
         clear_block_buffer_runtime(); // paranoia. Buffer is empty now - so reset accumulated time to zero.
794
       #endif
794
       #endif
795
 
795
 
796
-      return NULL;
796
+      return nullptr;
797
     }
797
     }
798
 
798
 
799
     /**
799
     /**

+ 3
- 3
Marlin/src/module/stepper.cpp 查看文件

133
 
133
 
134
 // private:
134
 // private:
135
 
135
 
136
-block_t* Stepper::current_block; // (= NULL) A pointer to the block currently being traced
136
+block_t* Stepper::current_block; // (= nullptr) A pointer to the block currently being traced
137
 
137
 
138
 uint8_t Stepper::last_direction_bits, // = 0
138
 uint8_t Stepper::last_direction_bits, // = 0
139
         Stepper::axis_did_move; // = 0
139
         Stepper::axis_did_move; // = 0
1394
     abort_current_block = false;
1394
     abort_current_block = false;
1395
     if (current_block) {
1395
     if (current_block) {
1396
       axis_did_move = 0;
1396
       axis_did_move = 0;
1397
-      current_block = NULL;
1397
+      current_block = nullptr;
1398
       planner.discard_current_block();
1398
       planner.discard_current_block();
1399
     }
1399
     }
1400
   }
1400
   }
1541
         runout.block_completed(current_block);
1541
         runout.block_completed(current_block);
1542
       #endif
1542
       #endif
1543
       axis_did_move = 0;
1543
       axis_did_move = 0;
1544
-      current_block = NULL;
1544
+      current_block = nullptr;
1545
       planner.discard_current_block();
1545
       planner.discard_current_block();
1546
     }
1546
     }
1547
     else {
1547
     else {

+ 1
- 1
Marlin/src/module/temperature.cpp 查看文件

1264
       #if ENABLED(CHAMBER_USER_THERMISTOR)
1264
       #if ENABLED(CHAMBER_USER_THERMISTOR)
1265
         t_index == CTI_CHAMBER ? PSTR("CHAMBER") :
1265
         t_index == CTI_CHAMBER ? PSTR("CHAMBER") :
1266
       #endif
1266
       #endif
1267
-      NULL
1267
+      nullptr
1268
     );
1268
     );
1269
     SERIAL_EOL();
1269
     SERIAL_EOL();
1270
   }
1270
   }

+ 6
- 6
Marlin/src/module/thermistor/thermistors.h 查看文件

147
 #elif defined(HEATER_0_USES_THERMISTOR)
147
 #elif defined(HEATER_0_USES_THERMISTOR)
148
   #error "No heater 0 thermistor table specified"
148
   #error "No heater 0 thermistor table specified"
149
 #else
149
 #else
150
-  #define HEATER_0_TEMPTABLE NULL
150
+  #define HEATER_0_TEMPTABLE nullptr
151
   #define HEATER_0_TEMPTABLE_LEN 0
151
   #define HEATER_0_TEMPTABLE_LEN 0
152
 #endif
152
 #endif
153
 
153
 
157
 #elif defined(HEATER_1_USES_THERMISTOR)
157
 #elif defined(HEATER_1_USES_THERMISTOR)
158
   #error "No heater 1 thermistor table specified"
158
   #error "No heater 1 thermistor table specified"
159
 #else
159
 #else
160
-  #define HEATER_1_TEMPTABLE NULL
160
+  #define HEATER_1_TEMPTABLE nullptr
161
   #define HEATER_1_TEMPTABLE_LEN 0
161
   #define HEATER_1_TEMPTABLE_LEN 0
162
 #endif
162
 #endif
163
 
163
 
167
 #elif defined(HEATER_2_USES_THERMISTOR)
167
 #elif defined(HEATER_2_USES_THERMISTOR)
168
   #error "No heater 2 thermistor table specified"
168
   #error "No heater 2 thermistor table specified"
169
 #else
169
 #else
170
-  #define HEATER_2_TEMPTABLE NULL
170
+  #define HEATER_2_TEMPTABLE nullptr
171
   #define HEATER_2_TEMPTABLE_LEN 0
171
   #define HEATER_2_TEMPTABLE_LEN 0
172
 #endif
172
 #endif
173
 
173
 
177
 #elif defined(HEATER_3_USES_THERMISTOR)
177
 #elif defined(HEATER_3_USES_THERMISTOR)
178
   #error "No heater 3 thermistor table specified"
178
   #error "No heater 3 thermistor table specified"
179
 #else
179
 #else
180
-  #define HEATER_3_TEMPTABLE NULL
180
+  #define HEATER_3_TEMPTABLE nullptr
181
   #define HEATER_3_TEMPTABLE_LEN 0
181
   #define HEATER_3_TEMPTABLE_LEN 0
182
 #endif
182
 #endif
183
 
183
 
187
 #elif defined(HEATER_4_USES_THERMISTOR)
187
 #elif defined(HEATER_4_USES_THERMISTOR)
188
   #error "No heater 4 thermistor table specified"
188
   #error "No heater 4 thermistor table specified"
189
 #else
189
 #else
190
-  #define HEATER_4_TEMPTABLE NULL
190
+  #define HEATER_4_TEMPTABLE nullptr
191
   #define HEATER_4_TEMPTABLE_LEN 0
191
   #define HEATER_4_TEMPTABLE_LEN 0
192
 #endif
192
 #endif
193
 
193
 
197
 #elif defined(HEATER_5_USES_THERMISTOR)
197
 #elif defined(HEATER_5_USES_THERMISTOR)
198
   #error "No heater 5 thermistor table specified"
198
   #error "No heater 5 thermistor table specified"
199
 #else
199
 #else
200
-  #define HEATER_5_TEMPTABLE NULL
200
+  #define HEATER_5_TEMPTABLE nullptr
201
   #define HEATER_5_TEMPTABLE_LEN 0
201
   #define HEATER_5_TEMPTABLE_LEN 0
202
 #endif
202
 #endif
203
 
203
 

+ 2
- 2
Marlin/src/sd/SdBaseFile.cpp 查看文件

81
 // cache a file's directory entry
81
 // cache a file's directory entry
82
 // return pointer to cached entry or null for failure
82
 // return pointer to cached entry or null for failure
83
 dir_t* SdBaseFile::cacheDirEntry(uint8_t action) {
83
 dir_t* SdBaseFile::cacheDirEntry(uint8_t action) {
84
-  if (!vol_->cacheRawBlock(dirBlock_, action)) return NULL;
84
+  if (!vol_->cacheRawBlock(dirBlock_, action)) return nullptr;
85
   return vol_->cache()->dir + dirIndex_;
85
   return vol_->cache()->dir + dirIndex_;
86
 }
86
 }
87
 
87
 
841
 
841
 
842
   // search for parent in '../..'
842
   // search for parent in '../..'
843
   do {
843
   do {
844
-    if (file.readDir(&entry, NULL) != 32) return false;
844
+    if (file.readDir(&entry, nullptr) != 32) return false;
845
     c = entry.firstClusterLow;
845
     c = entry.firstClusterLow;
846
     c |= (uint32_t)entry.firstClusterHigh << 16;
846
     c |= (uint32_t)entry.firstClusterHigh << 16;
847
   } while (c != cluster);
847
   } while (c != cluster);

+ 15
- 15
Marlin/src/sd/cardreader.cpp 查看文件

158
 
158
 
159
 uint16_t nrFile_index;
159
 uint16_t nrFile_index;
160
 
160
 
161
-void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) {
161
+void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=nullptr*/) {
162
   dir_t p;
162
   dir_t p;
163
   uint8_t cnt = 0;
163
   uint8_t cnt = 0;
164
 
164
 
226
 
226
 
227
         case LS_GetFilename:
227
         case LS_GetFilename:
228
           createFilename(filename, p);
228
           createFilename(filename, p);
229
-          if (match != NULL) {
229
+          if (match != nullptr) {
230
             if (strcasecmp(match, filename) == 0) return;
230
             if (strcasecmp(match, filename) == 0) return;
231
           }
231
           }
232
           else if (cnt == nrFile_index) return;  // 0 based index
232
           else if (cnt == nrFile_index) return;  // 0 based index
241
 void CardReader::ls() {
241
 void CardReader::ls() {
242
   lsAction = LS_SerialPrint;
242
   lsAction = LS_SerialPrint;
243
   root.rewind();
243
   root.rewind();
244
-  lsDive(NULL, root);
244
+  lsDive(nullptr, root);
245
 }
245
 }
246
 
246
 
247
 #if ENABLED(LONG_FILENAME_HOST_SUPPORT)
247
 #if ENABLED(LONG_FILENAME_HOST_SUPPORT)
276
 
276
 
277
       // Find the item, setting the long filename
277
       // Find the item, setting the long filename
278
       diveDir.rewind();
278
       diveDir.rewind();
279
-      lsDive(NULL, diveDir, segment);
279
+      lsDive(nullptr, diveDir, segment);
280
 
280
 
281
       // Print /LongNamePart to serial output
281
       // Print /LongNamePart to serial output
282
       SERIAL_CHAR('/');
282
       SERIAL_CHAR('/');
528
 
528
 
529
 void CardReader::write_command(char *buf) {
529
 void CardReader::write_command(char *buf) {
530
   char* begin = buf;
530
   char* begin = buf;
531
-  char* npos = NULL;
531
+  char* npos = nullptr;
532
   char* end = buf + strlen(buf) - 1;
532
   char* end = buf + strlen(buf) - 1;
533
 
533
 
534
   file.writeError = false;
534
   file.writeError = false;
535
-  if ((npos = strchr(buf, 'N')) != NULL) {
535
+  if ((npos = strchr(buf, 'N')) != nullptr) {
536
     begin = strchr(npos, ' ') + 1;
536
     begin = strchr(npos, ' ') + 1;
537
     end = strchr(npos, '*') - 1;
537
     end = strchr(npos, '*') - 1;
538
   }
538
   }
566
     sprintf_P(autoname, PSTR("auto%c.g"), autostart_index + '0');
566
     sprintf_P(autoname, PSTR("auto%c.g"), autostart_index + '0');
567
     dir_t p;
567
     dir_t p;
568
     root.rewind();
568
     root.rewind();
569
-    while (root.readDir(&p, NULL) > 0) {
569
+    while (root.readDir(&p, nullptr) > 0) {
570
       for (int8_t i = (int8_t)strlen((char*)p.name); i--;) p.name[i] = tolower(p.name[i]);
570
       for (int8_t i = (int8_t)strlen((char*)p.name); i--;) p.name[i] = tolower(p.name[i]);
571
       if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
571
       if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
572
         openAndPrintFile(autoname);
572
         openAndPrintFile(autoname);
602
  * Get the name of a file in the current directory by index
602
  * Get the name of a file in the current directory by index
603
  * with optional name to match.
603
  * with optional name to match.
604
  */
604
  */
605
-void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/) {
605
+void CardReader::getfilename(uint16_t nr, const char * const match/*=nullptr*/) {
606
   #if ENABLED(SDSORT_CACHE_NAMES)
606
   #if ENABLED(SDSORT_CACHE_NAMES)
607
-    if (match != NULL) {
607
+    if (match != nullptr) {
608
       while (nr < sort_count) {
608
       while (nr < sort_count) {
609
         if (strcasecmp(match, sortshort[nr]) == 0) break;
609
         if (strcasecmp(match, sortshort[nr]) == 0) break;
610
         nr++;
610
         nr++;
620
   lsAction = LS_GetFilename;
620
   lsAction = LS_GetFilename;
621
   nrFile_index = nr;
621
   nrFile_index = nr;
622
   workDir.rewind();
622
   workDir.rewind();
623
-  lsDive(NULL, workDir, match);
623
+  lsDive(nullptr, workDir, match);
624
 }
624
 }
625
 
625
 
626
 uint16_t CardReader::getnrfilenames() {
626
 uint16_t CardReader::getnrfilenames() {
627
   lsAction = LS_Count;
627
   lsAction = LS_Count;
628
   nrFiles = 0;
628
   nrFiles = 0;
629
   workDir.rewind();
629
   workDir.rewind();
630
-  lsDive(NULL, workDir);
630
+  lsDive(nullptr, workDir);
631
   //SERIAL_ECHOLN(nrFiles);
631
   //SERIAL_ECHOLN(nrFiles);
632
   return nrFiles;
632
   return nrFiles;
633
 }
633
 }
639
  *
639
  *
640
  * Returns a pointer to the last segment (filename) of the given DOS 8.3 path.
640
  * Returns a pointer to the last segment (filename) of the given DOS 8.3 path.
641
  *
641
  *
642
- * A NULL result indicates an unrecoverable error.
642
+ * A nullptr result indicates an unrecoverable error.
643
  */
643
  */
644
 const char* CardReader::diveToFile(SdFile*& curDir, const char * const path, const bool echo/*=false*/) {
644
 const char* CardReader::diveToFile(SdFile*& curDir, const char * const path, const bool echo/*=false*/) {
645
   // Track both parent and subfolder
645
   // Track both parent and subfolder
647
   SdFile *sub = &newDir1, *startDir;
647
   SdFile *sub = &newDir1, *startDir;
648
 
648
 
649
   const char *dirname_start = path;
649
   const char *dirname_start = path;
650
-  if (path[0] == '/') { 
650
+  if (path[0] == '/') {
651
     curDir = &root;
651
     curDir = &root;
652
     workDirDepth = 0;
652
     workDirDepth = 0;
653
     dirname_start++;
653
     dirname_start++;
654
   }
654
   }
655
   else
655
   else
656
-    curDir = &workDir; 
656
+    curDir = &workDir;
657
 
657
 
658
   startDir = curDir;
658
   startDir = curDir;
659
 
659
 
674
     // Open curDir
674
     // Open curDir
675
     if (!sub->open(curDir, dosSubdirname, O_READ)) {
675
     if (!sub->open(curDir, dosSubdirname, O_READ)) {
676
       SERIAL_ECHOLNPAIR(MSG_SD_OPEN_FILE_FAIL, dosSubdirname, ".");
676
       SERIAL_ECHOLNPAIR(MSG_SD_OPEN_FILE_FAIL, dosSubdirname, ".");
677
-      return NULL;
677
+      return nullptr;
678
     }
678
     }
679
 
679
 
680
     // Close curDir if not at starting-point
680
     // Close curDir if not at starting-point

+ 2
- 2
Marlin/src/sd/cardreader.h 查看文件

78
     static void printLongPath(char *path);
78
     static void printLongPath(char *path);
79
   #endif
79
   #endif
80
 
80
 
81
-  static void getfilename(uint16_t nr, const char* const match=NULL);
81
+  static void getfilename(uint16_t nr, const char* const match=nullptr);
82
   static uint16_t getnrfilenames();
82
   static uint16_t getnrfilenames();
83
 
83
 
84
   static void getAbsFilename(char *t);
84
   static void getAbsFilename(char *t);
224
   static LsAction lsAction; //stored for recursion.
224
   static LsAction lsAction; //stored for recursion.
225
   static uint16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory.
225
   static uint16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory.
226
   static char *diveDirName;
226
   static char *diveDirName;
227
-  static void lsDive(const char *prepend, SdFile parent, const char * const match=NULL);
227
+  static void lsDive(const char *prepend, SdFile parent, const char * const match=nullptr);
228
 
228
 
229
   #if ENABLED(SDCARD_SORT_ALPHA)
229
   #if ENABLED(SDCARD_SORT_ALPHA)
230
     static void flush_presort();
230
     static void flush_presort();

+ 15
- 15
Marlin/src/sd/usb_flashdrive/lib/Usb.cpp 查看文件

57
   UsbDevice *p = addrPool.GetUsbDevicePtr(addr);
57
   UsbDevice *p = addrPool.GetUsbDevicePtr(addr);
58
 
58
 
59
   if (!p || !p->epinfo)
59
   if (!p || !p->epinfo)
60
-    return NULL;
60
+    return nullptr;
61
 
61
 
62
   EpInfo *pep = p->epinfo;
62
   EpInfo *pep = p->epinfo;
63
 
63
 
67
 
67
 
68
     pep++;
68
     pep++;
69
   }
69
   }
70
-  return NULL;
70
+  return nullptr;
71
 }
71
 }
72
 
72
 
73
 /* set device table entry */
73
 /* set device table entry */
141
   uint8_t rcode;
141
   uint8_t rcode;
142
   SETUP_PKT setup_pkt;
142
   SETUP_PKT setup_pkt;
143
 
143
 
144
-  EpInfo *pep = NULL;
144
+  EpInfo *pep = nullptr;
145
   uint16_t nak_limit = 0;
145
   uint16_t nak_limit = 0;
146
 
146
 
147
   rcode = SetAddress(addr, ep, &pep, &nak_limit);
147
   rcode = SetAddress(addr, ep, &pep, &nak_limit);
162
   rcode = dispatchPkt(tokSETUP, ep, nak_limit); //dispatch packet
162
   rcode = dispatchPkt(tokSETUP, ep, nak_limit); //dispatch packet
163
   if (rcode) return rcode; // Return HRSLT if not zero
163
   if (rcode) return rcode; // Return HRSLT if not zero
164
 
164
 
165
-  if (dataptr != NULL) { //data stage, if present
165
+  if (dataptr != nullptr) { //data stage, if present
166
     if (direction) { //IN transfer
166
     if (direction) { //IN transfer
167
       uint16_t left = total;
167
       uint16_t left = total;
168
       pep->bmRcvToggle = 1; //bmRCVTOG1;
168
       pep->bmRcvToggle = 1; //bmRCVTOG1;
205
 /* rcode 0 if no errors. rcode 01-0f is relayed from dispatchPkt(). Rcode f0 means RCVDAVIRQ error,
205
 /* rcode 0 if no errors. rcode 01-0f is relayed from dispatchPkt(). Rcode f0 means RCVDAVIRQ error,
206
       fe USB xfer timeout */
206
       fe USB xfer timeout */
207
 uint8_t USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data, uint8_t bInterval /*= 0*/) {
207
 uint8_t USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data, uint8_t bInterval /*= 0*/) {
208
-  EpInfo *pep = NULL;
208
+  EpInfo *pep = nullptr;
209
   uint16_t nak_limit = 0;
209
   uint16_t nak_limit = 0;
210
 
210
 
211
   uint8_t rcode = SetAddress(addr, ep, &pep, &nak_limit);
211
   uint8_t rcode = SetAddress(addr, ep, &pep, &nak_limit);
289
 
289
 
290
 /* rcode 0 if no errors. rcode 01-0f is relayed from HRSL                       */
290
 /* rcode 0 if no errors. rcode 01-0f is relayed from HRSL                       */
291
 uint8_t USB::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* data) {
291
 uint8_t USB::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* data) {
292
-  EpInfo *pep = NULL;
292
+  EpInfo *pep = nullptr;
293
   uint16_t nak_limit = 0;
293
   uint16_t nak_limit = 0;
294
 
294
 
295
   uint8_t rcode = SetAddress(addr, ep, &pep, &nak_limit);
295
   uint8_t rcode = SetAddress(addr, ep, &pep, &nak_limit);
529
 uint8_t USB::DefaultAddressing(uint8_t parent, uint8_t port, bool lowspeed) {
529
 uint8_t USB::DefaultAddressing(uint8_t parent, uint8_t port, bool lowspeed) {
530
   //uint8_t                buf[12];
530
   //uint8_t                buf[12];
531
   uint8_t rcode;
531
   uint8_t rcode;
532
-  UsbDevice *p0 = NULL, *p = NULL;
532
+  UsbDevice *p0 = nullptr, *p = nullptr;
533
 
533
 
534
   // Get pointer to pseudo device with address 0 assigned
534
   // Get pointer to pseudo device with address 0 assigned
535
   p0 = addrPool.GetUsbDevicePtr(0);
535
   p0 = addrPool.GetUsbDevicePtr(0);
649
   uint8_t rcode = 0;
649
   uint8_t rcode = 0;
650
   uint8_t buf[sizeof (USB_DEVICE_DESCRIPTOR)];
650
   uint8_t buf[sizeof (USB_DEVICE_DESCRIPTOR)];
651
   USB_DEVICE_DESCRIPTOR *udd = reinterpret_cast<USB_DEVICE_DESCRIPTOR *>(buf);
651
   USB_DEVICE_DESCRIPTOR *udd = reinterpret_cast<USB_DEVICE_DESCRIPTOR *>(buf);
652
-  UsbDevice *p = NULL;
653
-  EpInfo *oldep_ptr = NULL;
652
+  UsbDevice *p = nullptr;
653
+  EpInfo *oldep_ptr = nullptr;
654
   EpInfo epInfo;
654
   EpInfo epInfo;
655
 
655
 
656
   epInfo.epAddr = 0;
656
   epInfo.epAddr = 0;
749
 //get device descriptor
749
 //get device descriptor
750
 
750
 
751
 uint8_t USB::getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* dataptr) {
751
 uint8_t USB::getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* dataptr) {
752
-  return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, 0x00, USB_DESCRIPTOR_DEVICE, 0x0000, nbytes, nbytes, dataptr, NULL);
752
+  return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, 0x00, USB_DESCRIPTOR_DEVICE, 0x0000, nbytes, nbytes, dataptr, nullptr);
753
 }
753
 }
754
 //get configuration descriptor
754
 //get configuration descriptor
755
 
755
 
756
 uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) {
756
 uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) {
757
-  return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, conf, USB_DESCRIPTOR_CONFIGURATION, 0x0000, nbytes, nbytes, dataptr, NULL);
757
+  return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, conf, USB_DESCRIPTOR_CONFIGURATION, 0x0000, nbytes, nbytes, dataptr, nullptr);
758
 }
758
 }
759
 
759
 
760
 /* Requests Configuration Descriptor. Sends two Get Conf Descr requests. The first one gets the total length of all descriptors, then the second one requests this
760
 /* Requests Configuration Descriptor. Sends two Get Conf Descr requests. The first one gets the total length of all descriptors, then the second one requests this
777
 //get string descriptor
777
 //get string descriptor
778
 
778
 
779
 uint8_t USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t ns, uint8_t index, uint16_t langid, uint8_t* dataptr) {
779
 uint8_t USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t ns, uint8_t index, uint16_t langid, uint8_t* dataptr) {
780
-  return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, index, USB_DESCRIPTOR_STRING, langid, ns, ns, dataptr, NULL);
780
+  return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, index, USB_DESCRIPTOR_STRING, langid, ns, ns, dataptr, nullptr);
781
 }
781
 }
782
 //set address
782
 //set address
783
 
783
 
784
 uint8_t USB::setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr) {
784
 uint8_t USB::setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr) {
785
-  uint8_t rcode = ctrlReq(oldaddr, ep, bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, 0x0000, NULL, NULL);
785
+  uint8_t rcode = ctrlReq(oldaddr, ep, bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, 0x0000, nullptr, nullptr);
786
   //delay(2); //per USB 2.0 sect.9.2.6.3
786
   //delay(2); //per USB 2.0 sect.9.2.6.3
787
   delay(300); // Older spec says you should wait at least 200ms
787
   delay(300); // Older spec says you should wait at least 200ms
788
   return rcode;
788
   return rcode;
789
-  //return ctrlReq(oldaddr, ep, bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, 0x0000, NULL, NULL);
789
+  //return ctrlReq(oldaddr, ep, bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, 0x0000, nullptr, nullptr);
790
 }
790
 }
791
 //set configuration
791
 //set configuration
792
 
792
 
793
 uint8_t USB::setConf(uint8_t addr, uint8_t ep, uint8_t conf_value) {
793
 uint8_t USB::setConf(uint8_t addr, uint8_t ep, uint8_t conf_value) {
794
-  return ctrlReq(addr, ep, bmREQ_SET, USB_REQUEST_SET_CONFIGURATION, conf_value, 0x00, 0x0000, 0x0000, 0x0000, NULL, NULL);
794
+  return ctrlReq(addr, ep, bmREQ_SET, USB_REQUEST_SET_CONFIGURATION, conf_value, 0x00, 0x0000, 0x0000, 0x0000, nullptr, nullptr);
795
 }
795
 }
796
 
796
 
797
 #endif // defined(USB_METHODS_INLINE)
797
 #endif // defined(USB_METHODS_INLINE)

+ 2
- 2
Marlin/src/sd/usb_flashdrive/lib/UsbCore.h 查看文件

301
 //set address
301
 //set address
302
 
302
 
303
 inline uint8_t USB::setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr) {
303
 inline uint8_t USB::setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr) {
304
-  return ( ctrlReq(oldaddr, ep, bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, NULL));
304
+  return ( ctrlReq(oldaddr, ep, bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, nullptr));
305
 }
305
 }
306
 //set configuration
306
 //set configuration
307
 
307
 
308
 inline uint8_t USB::setConf(uint8_t addr, uint8_t ep, uint8_t conf_value) {
308
 inline uint8_t USB::setConf(uint8_t addr, uint8_t ep, uint8_t conf_value) {
309
-  return ( ctrlReq(addr, ep, bmREQ_SET, USB_REQUEST_SET_CONFIGURATION, conf_value, 0x00, 0x0000, 0x0000, NULL));
309
+  return ( ctrlReq(addr, ep, bmREQ_SET, USB_REQUEST_SET_CONFIGURATION, conf_value, 0x00, 0x0000, 0x0000, nullptr));
310
 }
310
 }
311
 
311
 
312
 #endif // defined(USB_METHODS_INLINE)
312
 #endif // defined(USB_METHODS_INLINE)

+ 1
- 1
Marlin/src/sd/usb_flashdrive/lib/address.h 查看文件

183
   virtual UsbDevice* GetUsbDevicePtr(uint8_t addr) {
183
   virtual UsbDevice* GetUsbDevicePtr(uint8_t addr) {
184
     if (!addr) return thePool;
184
     if (!addr) return thePool;
185
     uint8_t index = FindAddressIndex(addr);
185
     uint8_t index = FindAddressIndex(addr);
186
-    return index ? thePool + index : NULL;
186
+    return index ? thePool + index : nullptr;
187
   }
187
   }
188
 
188
 
189
   // Perform an operation specified by pfunc for each addressed device
189
   // Perform an operation specified by pfunc for each addressed device

+ 8
- 8
Marlin/src/sd/usb_flashdrive/lib/masstorage.cpp 查看文件

118
   Notify(PSTR("---------\r\n"), 0x80);
118
   Notify(PSTR("---------\r\n"), 0x80);
119
 
119
 
120
   CDB6_t cdb = CDB6_t(SCSI_CMD_PREVENT_REMOVAL, lun, (uint8_t)0, lock);
120
   CDB6_t cdb = CDB6_t(SCSI_CMD_PREVENT_REMOVAL, lun, (uint8_t)0, lock);
121
-  return SCSITransaction6(&cdb, (uint16_t)0, NULL, (uint8_t)MASS_CMD_DIR_IN);
121
+  return SCSITransaction6(&cdb, (uint16_t)0, nullptr, (uint8_t)MASS_CMD_DIR_IN);
122
 }
122
 }
123
 
123
 
124
 /**
124
 /**
136
   uint8_t rcode = MASS_ERR_UNIT_NOT_READY;
136
   uint8_t rcode = MASS_ERR_UNIT_NOT_READY;
137
   if (bAddress) {
137
   if (bAddress) {
138
     CDB6_t cdb = CDB6_t(SCSI_CMD_START_STOP_UNIT, lun, ctl & 0x03, 0);
138
     CDB6_t cdb = CDB6_t(SCSI_CMD_START_STOP_UNIT, lun, ctl & 0x03, 0);
139
-    rcode = SCSITransaction6(&cdb, (uint16_t)0, NULL, (uint8_t)MASS_CMD_DIR_OUT);
139
+    rcode = SCSITransaction6(&cdb, (uint16_t)0, nullptr, (uint8_t)MASS_CMD_DIR_OUT);
140
   }
140
   }
141
   else
141
   else
142
     SetCurLUN(lun);
142
     SetCurLUN(lun);
255
   uint8_t buf[constBufSize];
255
   uint8_t buf[constBufSize];
256
   USB_DEVICE_DESCRIPTOR * udd = reinterpret_cast<USB_DEVICE_DESCRIPTOR*>(buf);
256
   USB_DEVICE_DESCRIPTOR * udd = reinterpret_cast<USB_DEVICE_DESCRIPTOR*>(buf);
257
   uint8_t rcode;
257
   uint8_t rcode;
258
-  UsbDevice *p = NULL;
259
-  EpInfo *oldep_ptr = NULL;
258
+  UsbDevice *p = nullptr;
259
+  EpInfo *oldep_ptr = nullptr;
260
   USBTRACE("MS ConfigureDevice\r\n");
260
   USBTRACE("MS ConfigureDevice\r\n");
261
   ClearAllEP();
261
   ClearAllEP();
262
   AddressPool &addrPool = pUsb->GetAddressPool();
262
   AddressPool &addrPool = pUsb->GetAddressPool();
668
  * @return
668
  * @return
669
  */
669
  */
670
 uint8_t BulkOnly::GetMaxLUN(uint8_t *plun) {
670
 uint8_t BulkOnly::GetMaxLUN(uint8_t *plun) {
671
-        uint8_t ret = pUsb->ctrlReq(bAddress, 0, bmREQ_MASSIN, MASS_REQ_GET_MAX_LUN, 0, 0, bIface, 1, 1, plun, NULL);
671
+        uint8_t ret = pUsb->ctrlReq(bAddress, 0, bmREQ_MASSIN, MASS_REQ_GET_MAX_LUN, 0, 0, bIface, 1, 1, plun, nullptr);
672
 
672
 
673
         if (ret == hrSTALL)
673
         if (ret == hrSTALL)
674
                 *plun = 0;
674
                 *plun = 0;
709
         Notify(PSTR("-----------------\r\n"), 0x80);
709
         Notify(PSTR("-----------------\r\n"), 0x80);
710
 
710
 
711
         CDB6_t cdb = CDB6_t(SCSI_CMD_TEST_UNIT_READY, lun, (uint8_t)0, 0);
711
         CDB6_t cdb = CDB6_t(SCSI_CMD_TEST_UNIT_READY, lun, (uint8_t)0, 0);
712
-        return SCSITransaction6(&cdb, 0, NULL, (uint8_t)MASS_CMD_DIR_IN);
712
+        return SCSITransaction6(&cdb, 0, nullptr, (uint8_t)MASS_CMD_DIR_IN);
713
 
713
 
714
 }
714
 }
715
 
715
 
813
 
813
 
814
         uint8_t ret = 0;
814
         uint8_t ret = 0;
815
 
815
 
816
-        while ((ret = (pUsb->ctrlReq(bAddress, 0, USB_SETUP_HOST_TO_DEVICE | USB_SETUP_TYPE_STANDARD | USB_SETUP_RECIPIENT_ENDPOINT, USB_REQUEST_CLEAR_FEATURE, USB_FEATURE_ENDPOINT_HALT, 0, ((index == epDataInIndex) ? (0x80 | epInfo[index].epAddr) : epInfo[index].epAddr), 0, 0, NULL, NULL)) == 0x01))
816
+        while ((ret = (pUsb->ctrlReq(bAddress, 0, USB_SETUP_HOST_TO_DEVICE | USB_SETUP_TYPE_STANDARD | USB_SETUP_RECIPIENT_ENDPOINT, USB_REQUEST_CLEAR_FEATURE, USB_FEATURE_ENDPOINT_HALT, 0, ((index == epDataInIndex) ? (0x80 | epInfo[index].epAddr) : epInfo[index].epAddr), 0, 0, nullptr, nullptr)) == 0x01))
817
                 delay(6);
817
                 delay(6);
818
 
818
 
819
         if (ret) {
819
         if (ret) {
831
  *
831
  *
832
  */
832
  */
833
 void BulkOnly::Reset() {
833
 void BulkOnly::Reset() {
834
-        while (pUsb->ctrlReq(bAddress, 0, bmREQ_MASSOUT, MASS_REQ_BOMSR, 0, 0, bIface, 0, 0, NULL, NULL) == 0x01) delay(6);
834
+        while (pUsb->ctrlReq(bAddress, 0, bmREQ_MASSOUT, MASS_REQ_BOMSR, 0, 0, bIface, 0, 0, nullptr, nullptr) == 0x01) delay(6);
835
 }
835
 }
836
 
836
 
837
 /**
837
 /**

+ 4
- 4
Marlin/src/sd/usb_flashdrive/lib/parsetools.h 查看文件

40
 
40
 
41
 public:
41
 public:
42
 
42
 
43
-  MultiByteValueParser() : pBuf(NULL), countDown(0), valueSize(0) {
43
+  MultiByteValueParser() : pBuf(nullptr), countDown(0), valueSize(0) {
44
   };
44
   };
45
 
45
 
46
   const uint8_t* GetBuffer() { return pBuf; }
46
   const uint8_t* GetBuffer() { return pBuf; }
60
 
60
 
61
 public:
61
 public:
62
 
62
 
63
-  ByteSkipper() : pBuf(NULL), nStage(0), countDown(0) {
63
+  ByteSkipper() : pBuf(nullptr), nStage(0), countDown(0) {
64
   }
64
   }
65
 
65
 
66
   void Initialize(MultiValueBuffer *pbuf) {
66
   void Initialize(MultiValueBuffer *pbuf) {
119
     arLenCntdn(0),
119
     arLenCntdn(0),
120
     lenSize(0),
120
     lenSize(0),
121
     valSize(0),
121
     valSize(0),
122
-    pBuf(NULL),
122
+    pBuf(nullptr),
123
     prsMode(modeArray) { }
123
     prsMode(modeArray) { }
124
   ;
124
   ;
125
 
125
 
141
     theParser.Initialize(p);
141
     theParser.Initialize(p);
142
   }
142
   }
143
 
143
 
144
-  bool Parse(uint8_t **pp, uint16_t *pcntdn, PTP_ARRAY_EL_FUNC pf, const void *me = NULL);
144
+  bool Parse(uint8_t **pp, uint16_t *pcntdn, PTP_ARRAY_EL_FUNC pf, const void *me = nullptr);
145
 };
145
 };

+ 1
- 1
buildroot/share/pin_interrupt_test/pin_interrupt_test.ino 查看文件

5
     #undef  digitalPinToPCICR
5
     #undef  digitalPinToPCICR
6
     #define digitalPinToPCICR(p)    ( ((p) >= 10 && (p) <= 15) || \
6
     #define digitalPinToPCICR(p)    ( ((p) >= 10 && (p) <= 15) || \
7
                                       ((p) >= 50 && (p) <= 53) || \
7
                                       ((p) >= 50 && (p) <= 53) || \
8
-                                      ((p) >= 62 && (p) <= 69) ? &PCICR : (uint8_t *)0)
8
+                                      ((p) >= 62 && (p) <= 69) ? &PCICR : nullptr)
9
 #endif
9
 #endif
10
 
10
 
11
 void setup() {
11
 void setup() {

正在加载...
取消
保存