Browse Source

🐛 Fix DUE compile and errors (#24809)

Eduardo José Tagle 1 year ago
parent
commit
35594a23de
No account linked to committer's email address

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

210
   static void adc_init() {}
210
   static void adc_init() {}
211
 
211
 
212
   // Called by Temperature::init for each sensor at startup
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
   // Begin ADC sampling on the given channel. Called from Temperature::isr!
215
   // Begin ADC sampling on the given channel. Called from Temperature::isr!
216
   static void adc_start(const uint8_t ch) { adc_result = analogRead(ch); }
216
   static void adc_start(const uint8_t ch) { adc_result = analogRead(ch); }

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

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

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

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 = { nullptr };
44
+static DeviceVectors ram_tab[61] = { 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.

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

62
     // Attend SD card access from the USB MSD -- Prioritize access to improve speed
62
     // Attend SD card access from the USB MSD -- Prioritize access to improve speed
63
     int delay = 2;
63
     int delay = 2;
64
     while (main_b_msc_enable && --delay > 0) {
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
       // Reset the watchdog, just to be sure
67
       // Reset the watchdog, just to be sure
68
       REG_WDT_CR = WDT_CR_WDRSTT | WDT_CR_KEY(0xA5);
68
       REG_WDT_CR = WDT_CR_WDRSTT | WDT_CR_KEY(0xA5);

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

99
   void set(const int n)                    { b |=  (bits_t)_BV(n); }
99
   void set(const int n)                    { b |=  (bits_t)_BV(n); }
100
   void clear(const int n)                  { b &= ~(bits_t)_BV(n); }
100
   void clear(const int n)                  { b &= ~(bits_t)_BV(n); }
101
   bool test(const int n) const             { return TEST(b, n); }
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
   int size() const                         { return sizeof(b); }
104
   int size() const                         { return sizeof(b); }
105
 };
105
 };
106
 
106
 

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

192
 
192
 
193
   volatile block_flags_t flag;              // Block flags
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
   // Fields used by the motion planner to manage acceleration
201
   // Fields used by the motion planner to manage acceleration
202
   float nominal_speed,                      // The nominal speed for this block in (mm/sec)
202
   float nominal_speed,                      // The nominal speed for this block in (mm/sec)

Loading…
Cancel
Save