Skip to content

Commit a58f277

Browse files
ejtaglethinkyhead
authored andcommitted
🐛 Fix DUE compile and errors (MarlinFirmware#24809)
1 parent 5aca6ff commit a58f277

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

Marlin/src/HAL/DUE/HAL.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class MarlinHAL {
210210
static void adc_init() {}
211211

212212
// 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*/) {}
214214

215215
// Begin ADC sampling on the given channel. Called from Temperature::isr!
216216
static void adc_start(const uint8_t ch) { adc_result = analogRead(ch); }

Marlin/src/HAL/DUE/HAL_SPI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,12 @@
247247
b <<= 1; // little setup time
248248

249249
WRITE(SD_SCK_PIN, HIGH);
250-
DELAY_NS(spiDelayNS);
250+
DELAY_NS_VAR(spiDelayNS);
251251

252252
b |= (READ(SD_MISO_PIN) != 0);
253253

254254
WRITE(SD_SCK_PIN, LOW);
255-
DELAY_NS(spiDelayNS);
255+
DELAY_NS_VAR(spiDelayNS);
256256
} while (--bits);
257257
return b;
258258
}

Marlin/src/HAL/DUE/InterruptVectors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
practice, we need alignment to 256 bytes to make this work in all
4242
cases */
4343
__attribute__ ((aligned(256)))
44-
static DeviceVectors ram_tab = { nullptr };
44+
static DeviceVectors ram_tab[61] = { nullptr };
4545

4646
/**
4747
* This function checks if the exception/interrupt table is already in SRAM or not.

Marlin/src/HAL/DUE/usb/usb_task.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void usb_task_idle(void) {
6262
// Attend SD card access from the USB MSD -- Prioritize access to improve speed
6363
int delay = 2;
6464
while (main_b_msc_enable && --delay > 0) {
65-
if (udi_msc_process_trans()) delay = 10000;
65+
if (udi_msc_process_trans()) delay = 20;
6666

6767
// Reset the watchdog, just to be sure
6868
REG_WDT_CR = WDT_CR_WDRSTT | WDT_CR_KEY(0xA5);

Marlin/src/core/types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ struct Flags {
9999
void set(const int n) { b |= (bits_t)_BV(n); }
100100
void clear(const int n) { b &= ~(bits_t)_BV(n); }
101101
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); }
104104
int size() const { return sizeof(b); }
105105
};
106106

Marlin/src/module/planner.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ typedef struct PlannerBlock {
192192

193193
volatile block_flags_t flag; // Block flags
194194

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()); }
200200

201201
// Fields used by the motion planner to manage acceleration
202202
float nominal_speed, // The nominal speed for this block in (mm/sec)

0 commit comments

Comments
 (0)