🐛 Fix DUE compile and errors (#24809)
This commit is contained in:
parent
5aca6ff4f2
commit
a58f27763f
@ -210,7 +210,7 @@ public:
|
|||||||
static void adc_init() {}
|
static void adc_init() {}
|
||||||
|
|
||||||
// Called by Temperature::init for each sensor at startup
|
// Called by Temperature::init for each sensor at startup
|
||||||
static void adc_enable(const uint8_t ch) {}
|
static void adc_enable(const uint8_t /*ch*/) {}
|
||||||
|
|
||||||
// Begin ADC sampling on the given channel. Called from Temperature::isr!
|
// Begin ADC sampling on the given channel. Called from Temperature::isr!
|
||||||
static void adc_start(const uint8_t ch) { adc_result = analogRead(ch); }
|
static void adc_start(const uint8_t ch) { adc_result = analogRead(ch); }
|
||||||
|
@ -247,12 +247,12 @@
|
|||||||
b <<= 1; // little setup time
|
b <<= 1; // little setup time
|
||||||
|
|
||||||
WRITE(SD_SCK_PIN, HIGH);
|
WRITE(SD_SCK_PIN, HIGH);
|
||||||
DELAY_NS(spiDelayNS);
|
DELAY_NS_VAR(spiDelayNS);
|
||||||
|
|
||||||
b |= (READ(SD_MISO_PIN) != 0);
|
b |= (READ(SD_MISO_PIN) != 0);
|
||||||
|
|
||||||
WRITE(SD_SCK_PIN, LOW);
|
WRITE(SD_SCK_PIN, LOW);
|
||||||
DELAY_NS(spiDelayNS);
|
DELAY_NS_VAR(spiDelayNS);
|
||||||
} while (--bits);
|
} while (--bits);
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
practice, we need alignment to 256 bytes to make this work in all
|
practice, we need alignment to 256 bytes to make this work in all
|
||||||
cases */
|
cases */
|
||||||
__attribute__ ((aligned(256)))
|
__attribute__ ((aligned(256)))
|
||||||
static DeviceVectors ram_tab = { nullptr };
|
static DeviceVectors ram_tab[61] = { nullptr };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function checks if the exception/interrupt table is already in SRAM or not.
|
* This function checks if the exception/interrupt table is already in SRAM or not.
|
||||||
|
@ -62,7 +62,7 @@ void usb_task_idle(void) {
|
|||||||
// Attend SD card access from the USB MSD -- Prioritize access to improve speed
|
// Attend SD card access from the USB MSD -- Prioritize access to improve speed
|
||||||
int delay = 2;
|
int delay = 2;
|
||||||
while (main_b_msc_enable && --delay > 0) {
|
while (main_b_msc_enable && --delay > 0) {
|
||||||
if (udi_msc_process_trans()) delay = 10000;
|
if (udi_msc_process_trans()) delay = 20;
|
||||||
|
|
||||||
// Reset the watchdog, just to be sure
|
// Reset the watchdog, just to be sure
|
||||||
REG_WDT_CR = WDT_CR_WDRSTT | WDT_CR_KEY(0xA5);
|
REG_WDT_CR = WDT_CR_WDRSTT | WDT_CR_KEY(0xA5);
|
||||||
|
@ -99,8 +99,8 @@ struct Flags {
|
|||||||
void set(const int n) { b |= (bits_t)_BV(n); }
|
void set(const int n) { b |= (bits_t)_BV(n); }
|
||||||
void clear(const int n) { b &= ~(bits_t)_BV(n); }
|
void clear(const int n) { b &= ~(bits_t)_BV(n); }
|
||||||
bool test(const int n) const { return TEST(b, n); }
|
bool test(const int n) const { return TEST(b, n); }
|
||||||
const bool operator[](const int n) { return test(n); }
|
bool operator[](const int n) { return test(n); }
|
||||||
const bool operator[](const int n) const { return test(n); }
|
bool operator[](const int n) const { return test(n); }
|
||||||
int size() const { return sizeof(b); }
|
int size() const { return sizeof(b); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -192,11 +192,11 @@ typedef struct PlannerBlock {
|
|||||||
|
|
||||||
volatile block_flags_t flag; // Block flags
|
volatile block_flags_t flag; // Block flags
|
||||||
|
|
||||||
volatile bool is_fan_sync() { return TERN0(LASER_SYNCHRONOUS_M106_M107, flag.sync_fans); }
|
bool is_fan_sync() { return TERN0(LASER_SYNCHRONOUS_M106_M107, flag.sync_fans); }
|
||||||
volatile bool is_pwr_sync() { return TERN0(LASER_POWER_SYNC, flag.sync_laser_pwr); }
|
bool is_pwr_sync() { return TERN0(LASER_POWER_SYNC, flag.sync_laser_pwr); }
|
||||||
volatile bool is_sync() { return flag.sync_position || is_fan_sync() || is_pwr_sync(); }
|
bool is_sync() { return flag.sync_position || is_fan_sync() || is_pwr_sync(); }
|
||||||
volatile bool is_page() { return TERN0(DIRECT_STEPPING, flag.page); }
|
bool is_page() { return TERN0(DIRECT_STEPPING, flag.page); }
|
||||||
volatile bool is_move() { return !(is_sync() || is_page()); }
|
bool is_move() { return !(is_sync() || is_page()); }
|
||||||
|
|
||||||
// Fields used by the motion planner to manage acceleration
|
// Fields used by the motion planner to manage acceleration
|
||||||
float nominal_speed, // The nominal speed for this block in (mm/sec)
|
float nominal_speed, // The nominal speed for this block in (mm/sec)
|
||||||
|
Loading…
Reference in New Issue
Block a user