Sfoglia il codice sorgente

🐛 Fix DUE compile and errors (#24809)

Eduardo José Tagle 2 anni fa
parent
commit
35594a23de
Nessun account collegato all'indirizzo email del committer

+ 1
- 1
Marlin/src/HAL/DUE/HAL.h Vedi File

@@ -210,7 +210,7 @@ public:
210 210
   static void adc_init() {}
211 211
 
212 212
   // Called by Temperature::init for each sensor at startup
213
-  static void adc_enable(const uint8_t ch) {}
213
+  static void adc_enable(const uint8_t /*ch*/) {}
214 214
 
215 215
   // Begin ADC sampling on the given channel. Called from Temperature::isr!
216 216
   static void adc_start(const uint8_t ch) { adc_result = analogRead(ch); }

+ 2
- 2
Marlin/src/HAL/DUE/HAL_SPI.cpp Vedi File

@@ -247,12 +247,12 @@
247 247
       b <<= 1; // little setup time
248 248
 
249 249
       WRITE(SD_SCK_PIN, HIGH);
250
-      DELAY_NS(spiDelayNS);
250
+      DELAY_NS_VAR(spiDelayNS);
251 251
 
252 252
       b |= (READ(SD_MISO_PIN) != 0);
253 253
 
254 254
       WRITE(SD_SCK_PIN, LOW);
255
-      DELAY_NS(spiDelayNS);
255
+      DELAY_NS_VAR(spiDelayNS);
256 256
     } while (--bits);
257 257
     return b;
258 258
   }

+ 1
- 1
Marlin/src/HAL/DUE/InterruptVectors.cpp Vedi File

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

+ 1
- 1
Marlin/src/HAL/DUE/usb/usb_task.c Vedi File

@@ -62,7 +62,7 @@ void usb_task_idle(void) {
62 62
     // Attend SD card access from the USB MSD -- Prioritize access to improve speed
63 63
     int delay = 2;
64 64
     while (main_b_msc_enable && --delay > 0) {
65
-      if (udi_msc_process_trans()) delay = 10000;
65
+      if (udi_msc_process_trans()) delay = 20;
66 66
 
67 67
       // Reset the watchdog, just to be sure
68 68
       REG_WDT_CR = WDT_CR_WDRSTT | WDT_CR_KEY(0xA5);

+ 2
- 2
Marlin/src/core/types.h Vedi File

@@ -99,8 +99,8 @@ struct Flags {
99 99
   void set(const int n)                    { b |=  (bits_t)_BV(n); }
100 100
   void clear(const int n)                  { b &= ~(bits_t)_BV(n); }
101 101
   bool test(const int n) const             { return TEST(b, n); }
102
-  const bool operator[](const int n)       { return test(n); }
103
-  const bool operator[](const int n) const { return test(n); }
102
+  bool operator[](const int n)             { return test(n); }
103
+  bool operator[](const int n) const       { return test(n); }
104 104
   int size() const                         { return sizeof(b); }
105 105
 };
106 106
 

+ 5
- 5
Marlin/src/module/planner.h Vedi File

@@ -192,11 +192,11 @@ typedef struct PlannerBlock {
192 192
 
193 193
   volatile block_flags_t flag;              // Block flags
194 194
 
195
-  volatile bool is_fan_sync() { return TERN0(LASER_SYNCHRONOUS_M106_M107, flag.sync_fans); }
196
-  volatile bool is_pwr_sync() { return TERN0(LASER_POWER_SYNC, flag.sync_laser_pwr); }
197
-  volatile bool is_sync() { return flag.sync_position || is_fan_sync() || is_pwr_sync(); }
198
-  volatile bool is_page() { return TERN0(DIRECT_STEPPING, flag.page); }
199
-  volatile bool is_move() { return !(is_sync() || is_page()); }
195
+  bool is_fan_sync() { return TERN0(LASER_SYNCHRONOUS_M106_M107, flag.sync_fans); }
196
+  bool is_pwr_sync() { return TERN0(LASER_POWER_SYNC, flag.sync_laser_pwr); }
197
+  bool is_sync() { return flag.sync_position || is_fan_sync() || is_pwr_sync(); }
198
+  bool is_page() { return TERN0(DIRECT_STEPPING, flag.page); }
199
+  bool is_move() { return !(is_sync() || is_page()); }
200 200
 
201 201
   // Fields used by the motion planner to manage acceleration
202 202
   float nominal_speed,                      // The nominal speed for this block in (mm/sec)

Loading…
Annulla
Salva