diff --git a/Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp b/Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp index ea5c489f65..36134f7b89 100644 --- a/Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp +++ b/Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp @@ -43,7 +43,7 @@ #include "MarlinSerial.h" #include "../../Marlin.h" - template typename MarlinSerial::ring_buffer_r MarlinSerial::rx_buffer = { 0 }; + template typename MarlinSerial::ring_buffer_r MarlinSerial::rx_buffer = { 0, 0, { 0 } }; template typename MarlinSerial::ring_buffer_t MarlinSerial::tx_buffer = { 0 }; template bool MarlinSerial::_written = false; template uint8_t MarlinSerial::xon_xoff_state = MarlinSerial::XON_XOFF_CHAR_SENT | MarlinSerial::XON_CHAR; diff --git a/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp b/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp index cbcd9dcd3f..ef72c38270 100644 --- a/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp +++ b/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp @@ -33,7 +33,7 @@ #include "InterruptVectors_Due.h" #include "../../Marlin.h" -template typename MarlinSerial::ring_buffer_r MarlinSerial::rx_buffer = { 0 }; +template typename MarlinSerial::ring_buffer_r MarlinSerial::rx_buffer = { 0, 0, { 0 } }; template typename MarlinSerial::ring_buffer_t MarlinSerial::tx_buffer = { 0 }; template bool MarlinSerial::_written = false; template uint8_t MarlinSerial::xon_xoff_state = MarlinSerial::XON_XOFF_CHAR_SENT | MarlinSerial::XON_CHAR; diff --git a/Marlin/src/HAL/shared/Delay.h b/Marlin/src/HAL/shared/Delay.h index 04771a2e03..4cdd479210 100644 --- a/Marlin/src/HAL/shared/Delay.h +++ b/Marlin/src/HAL/shared/Delay.h @@ -140,9 +140,9 @@ #endif // Delay in nanoseconds -#define DELAY_NS(x) DELAY_CYCLES( (x) * (F_CPU/1000000L) / 1000L ) +#define DELAY_NS(x) DELAY_CYCLES( (x) * (F_CPU / 1000000UL) / 1000UL ) // Delay in microseconds -#define DELAY_US(x) DELAY_CYCLES( (x) * (F_CPU/1000000L) ) +#define DELAY_US(x) DELAY_CYCLES( (x) * (F_CPU / 1000000UL) ) #endif // MARLIN_DELAY_H diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index 294d6213ca..945e983e97 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -49,7 +49,7 @@ // Clock speed factors #if !defined(CYCLES_PER_MICROSECOND) && !defined(__STM32F1__) - #define CYCLES_PER_MICROSECOND (F_CPU / 1000000L) // 16 or 20 on AVR + #define CYCLES_PER_MICROSECOND (F_CPU / 1000000UL) // 16 or 20 on AVR #endif // Nanoseconds per cycle diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index 66e65478c1..2e34fb3028 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -927,7 +927,7 @@ void MarlinSettings::postprocess() { // { #if DISABLED(ADVANCED_PAUSE_FEATURE) - const fil_change_settings_t fc_settings[EXTRUDERS] = { { 0 } }; + const fil_change_settings_t fc_settings[EXTRUDERS] = { 0, 0 }; #endif _FIELD_TEST(fc_settings); EEPROM_WRITE(fc_settings);