Skip to content

Commit

Permalink
Bugfix 2.1.x (#1)
Browse files Browse the repository at this point in the history
* 🩹 Update KEDI / GODI LCD_PINS_EN pin (MarlinFirmware#25886)

* [cron] Bump distribution date (2023-05-29)

* 🩹 Fix and improve GT2560 pins (MarlinFirmware#25890)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* 🔨 Install 'heatshrink' if needed (MarlinFirmware#25896)

* [cron] Bump distribution date (2023-05-30)

* 🔧 Default has Heated Bed (MarlinFirmware#25895)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>

* 🚸 Probe Wizard display fix

* 🧑‍💻 ExtUI::onLevelingStart/Done for all leveling (MarlinFirmware#25913)

* 🌐 Update Russian translation (MarlinFirmware#25840)

* 🌐 Remove unused strings

* 🔧 Update LCD with NeoPixel Contrast (MarlinFirmware#25893)

* [cron] Bump distribution date (2023-06-02)

* 📝 M122 comment

* 🔨 Clarify env error (MarlinFirmware#25915)

* 🔨 Fix pins debugging for Simulator

* 🎨 Lowercase method / data member names (MarlinFirmware#25914)

* 🧑‍💻 numtostr use functions

* 🧑‍💻 Dump BOTH and EITHER macros (MarlinFirmware#25908)

* 🧑‍💻 Remove LOOP macros (MarlinFirmware#25917)

* [cron] Bump distribution date (2023-06-03)

* 🎨 Lowercase followup (MarlinFirmware#25923)

Followup to MarlinFirmware#25914

* 🔨 STM32H723VG (1024KB) (MarlinFirmware#25921)

* 🩹 Endstop hit state followup (MarlinFirmware#25885)

Followup to MarlinFirmware#25574

* 🧑‍💻 Fix narrowing conversions (MarlinFirmware#25924)

* 🔧 BTT SKR 3 has onboard endstop pullups (MarlinFirmware#24876)

* 🐛 Fix M25/M125 for LCDs with ui.resume_print (MarlinFirmware#24877)

* [cron] Bump distribution date (2023-06-04)

* ✏️ Fix LCD contrast typo (MarlinFirmware#25929)

* 🩹 Fix D576 buffer underrun reporting (MarlinFirmware#25931)

* [cron] Bump distribution date (2023-06-05)

* 🔧 TMC Driver axis baud for Soft Serial (MarlinFirmware#25664)

* 🎨 Detab C/C++

* 🧑‍💻 Dir change is AxisBits

Followup to MarlinFirmware#25761

* 🩹 Wrap HAS_DISPLAY for if()

Followup to MarlinFirmware#24877

* 🧑‍💻 Fix mfconfig trailing space

* [cron] Bump distribution date (2023-06-06)

* 🩹 Fix JyersUI corner pos

Followup to MarlinFirmware#25631

* 🧑‍💻 Bypass error in build_example

* 🧑‍💻 Suppress narrowing warnings

Followup to MarlinFirmware#25924

* ⚡️ Mixer label in PROGMEM

* 🩹 Conditional include probe.h

---------

Co-authored-by: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com>
Co-authored-by: thinkyhead <thinkyhead@users.noreply.github.com>
Co-authored-by: DejitaruJin <dejitarujin@gmail.com>
Co-authored-by: EvilGremlin <22657714+EvilGremlin@users.noreply.github.com>
Co-authored-by: I3DBeeTech <129617321+I3DBeeTech@users.noreply.github.com>
Co-authored-by: alextrical <35117191+alextrical@users.noreply.github.com>
Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com>
Co-authored-by: Manuel McLure <manuel@mclure.org>
Co-authored-by: Giuliano Zaro <3684609+GMagician@users.noreply.github.com>
Co-authored-by: Andrew <18502096+classicrocker883@users.noreply.github.com>
Co-authored-by: kisslorand <50251547+kisslorand@users.noreply.github.com>
Co-authored-by: Roi Rodríguez Huertas <roiamorin69@gmail.com>
  • Loading branch information
13 people authored Jun 7, 2023
1 parent cfe3e57 commit b372c22
Show file tree
Hide file tree
Showing 493 changed files with 7,275 additions and 5,613 deletions.
16 changes: 8 additions & 8 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
*/
//#define MAGNETIC_PARKING_EXTRUDER

#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER)
#if ANY(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER)

#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
Expand Down Expand Up @@ -419,7 +419,7 @@
#define POWER_TIMEOUT 30 // (s) Turn off power if the machine is idle for this duration
//#define POWER_OFF_DELAY 60 // (s) Delay of poweroff after M81 command. Useful to let fans run for extra time.
#endif
#if EITHER(AUTO_POWER_CONTROL, POWER_OFF_WAIT_FOR_COOLDOWN)
#if ANY(AUTO_POWER_CONTROL, POWER_OFF_WAIT_FOR_COOLDOWN)
//#define AUTO_POWER_E_TEMP 50 // (°C) PSU on if any extruder is over this temperature
//#define AUTO_POWER_CHAMBER_TEMP 30 // (°C) PSU on if the chamber is over this temperature
//#define AUTO_POWER_COOLER_TEMP 26 // (°C) PSU on if the cooler is over this temperature
Expand Down Expand Up @@ -921,7 +921,7 @@
#define DELTA_CALIBRATION_DEFAULT_POINTS 4
#endif

#if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU)
#if ANY(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU)
// Step size for paper-test probing
#define PROBE_MANUALLY_STEP 0.05 // (mm)
#endif
Expand Down Expand Up @@ -965,7 +965,7 @@
*/
//#define MORGAN_SCARA
//#define MP_SCARA
#if EITHER(MORGAN_SCARA, MP_SCARA)
#if ANY(MORGAN_SCARA, MP_SCARA)
// If movement is choppy try lowering this value
#define DEFAULT_SEGMENTS_PER_SECOND 200

Expand Down Expand Up @@ -1809,7 +1809,7 @@
#define MAX_SOFTWARE_ENDSTOP_W
#endif

#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
#if ANY(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
//#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
#endif

Expand Down Expand Up @@ -2046,7 +2046,7 @@

#endif

#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
#if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)

// Set the number of grid points per dimension.
#define GRID_MAX_POINTS_X 10
Expand Down Expand Up @@ -3340,7 +3340,7 @@
//#define TOUCH_OFFSET_Y 257
//#define TOUCH_ORIENTATION TOUCH_LANDSCAPE

#if BOTH(TOUCH_SCREEN_CALIBRATION, EEPROM_SETTINGS)
#if ALL(TOUCH_SCREEN_CALIBRATION, EEPROM_SETTINGS)
#define TOUCH_CALIBRATION_AUTO_SAVE // Auto save successful calibration values to EEPROM
#endif

Expand Down Expand Up @@ -3437,7 +3437,7 @@
//#define RGB_LED
//#define RGBW_LED

#if EITHER(RGB_LED, RGBW_LED)
#if ANY(RGB_LED, RGBW_LED)
//#define RGB_LED_R_PIN 34
//#define RGB_LED_G_PIN 43
//#define RGB_LED_B_PIN 35
Expand Down
42 changes: 21 additions & 21 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
//#define ADAPTIVE_FAN_SLOWING // Slow down the part-cooling fan if the temperature drops
#if ENABLED(ADAPTIVE_FAN_SLOWING)
//#define REPORT_ADAPTIVE_FAN_SLOWING // Report fan slowing activity to the console
#if EITHER(MPCTEMP, PIDTEMP)
#if ANY(MPCTEMP, PIDTEMP)
//#define TEMP_TUNING_MAINTAIN_FAN // Don't slow down the fan speed during M303 or M306 T
#endif
#endif
Expand Down Expand Up @@ -759,10 +759,10 @@
#if ENABLED(NEOPIXEL_LED)
//#define CASE_LIGHT_USE_NEOPIXEL // Use NeoPixel LED as case light
#endif
#if EITHER(RGB_LED, RGBW_LED)
#if ANY(RGB_LED, RGBW_LED)
//#define CASE_LIGHT_USE_RGB_LED // Use RGB / RGBW LED as case light
#endif
#if EITHER(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_USE_RGB_LED)
#if ANY(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_USE_RGB_LED)
#define CASE_LIGHT_DEFAULT_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
#endif
#endif
Expand Down Expand Up @@ -1175,7 +1175,7 @@
*/
//#define INPUT_SHAPING_X
//#define INPUT_SHAPING_Y
#if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y)
#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y)
#if ENABLED(INPUT_SHAPING_X)
#define SHAPING_FREQ_X 40 // (Hz) The default dominant resonant frequency on the X axis.
#define SHAPING_ZETA_X 0.15f // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping).
Expand Down Expand Up @@ -1417,7 +1417,7 @@
*/
//#define DIGIPOT_MCP4018 // Requires https://github.com/felias-fogg/SlowSoftI2CMaster
//#define DIGIPOT_MCP4451
#if EITHER(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
#if ANY(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT:4 AZTEEG_X3_PRO:8 MKS_SBASE:5 MIGHTYBOARD_REVE:5

// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
Expand Down Expand Up @@ -1474,7 +1474,7 @@
//
//#define LCD_BACKLIGHT_TIMEOUT_MINS 1 // (minutes) Timeout before turning off the backlight

#if HAS_BED_PROBE && EITHER(HAS_MARLINUI_MENU, HAS_TFT_LVGL_UI)
#if HAS_BED_PROBE && ANY(HAS_MARLINUI_MENU, HAS_TFT_LVGL_UI)
//#define PROBE_OFFSET_WIZARD // Add a Probe Z Offset calibration option to the LCD menu
#if ENABLED(PROBE_OFFSET_WIZARD)
/**
Expand Down Expand Up @@ -1543,14 +1543,14 @@
*/
#define SHOW_BOOTSCREEN // Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION **
#if ENABLED(SHOW_BOOTSCREEN)
#define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s)
#if EITHER(HAS_MARLINUI_U8GLIB, TFT_COLOR_UI)
#define BOOTSCREEN_TIMEOUT 3000 // (ms) Total Duration to display the boot screen(s)
#if ANY(HAS_MARLINUI_U8GLIB, TFT_COLOR_UI)
#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving lots of flash)
#endif
#if HAS_MARLINUI_U8GLIB
//#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of flash.
#endif
#if EITHER(HAS_MARLINUI_U8GLIB, TOUCH_UI_FTDI_EVE)
#if ANY(HAS_MARLINUI_U8GLIB, TOUCH_UI_FTDI_EVE)
//#define SHOW_CUSTOM_BOOTSCREEN // Show the bitmap in Marlin/_Bootscreen.h on startup.
#endif
#endif
Expand Down Expand Up @@ -1615,13 +1615,13 @@
#define SET_REMAINING_TIME // Add 'R' parameter to set remaining time
//#define SET_INTERACTION_TIME // Add 'C' parameter to set time until next filament change or other user interaction
//#define M73_REPORT // Report M73 values to host
#if BOTH(M73_REPORT, HAS_MEDIA)
#if ALL(M73_REPORT, HAS_MEDIA)
#define M73_REPORT_SD_ONLY // Report only when printing from SD
#endif
#endif

// LCD Print Progress options. Multiple times may be displayed in turn.
#if HAS_DISPLAY && EITHER(HAS_MEDIA, SET_PROGRESS_MANUALLY)
#if HAS_DISPLAY && ANY(HAS_MEDIA, SET_PROGRESS_MANUALLY)
#define SHOW_PROGRESS_PERCENT // Show print progress percentage (doesn't affect progress bar)
#define SHOW_ELAPSED_TIME // Display elapsed printing time (prefix 'E')
//#define SHOW_REMAINING_TIME // Display estimated time to completion (prefix 'R')
Expand All @@ -1630,7 +1630,7 @@
#endif
//#define PRINT_PROGRESS_SHOW_DECIMALS // Show/report progress with decimal digits, not all UIs support this

#if EITHER(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL)
#if ANY(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL)
//#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
#if ENABLED(LCD_PROGRESS_BAR)
#define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
Expand Down Expand Up @@ -2301,15 +2301,15 @@
//#define PROBING_MARGIN_BACK PROBING_MARGIN
#endif

#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
// Override the mesh area if the automatic (max) area is too large
//#define MESH_MIN_X MESH_INSET
//#define MESH_MIN_Y MESH_INSET
//#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif

#if BOTH(AUTO_BED_LEVELING_UBL, EEPROM_SETTINGS)
#if ALL(AUTO_BED_LEVELING_UBL, EEPROM_SETTINGS)
//#define OPTIMIZED_MESH_STORAGE // Store mesh with less precision to save EEPROM space
#endif

Expand Down Expand Up @@ -2379,7 +2379,7 @@
#endif

// G76 options
#if BOTH(PTC_PROBE, PTC_BED)
#if ALL(PTC_PROBE, PTC_BED)
// Park position to wait for probe cooldown
#define PTC_PARK_POS { 0, 0, 100 }

Expand Down Expand Up @@ -2421,7 +2421,7 @@
// G5 Bézier Curve Support with XYZE destination and IJPQ offsets
//#define BEZIER_CURVE_SUPPORT // Requires ~2666 bytes

#if EITHER(ARC_SUPPORT, BEZIER_CURVE_SUPPORT)
#if ANY(ARC_SUPPORT, BEZIER_CURVE_SUPPORT)
//#define CNC_WORKSPACE_PLANES // Allow G2/G3/G5 to operate in XY, ZX, or YZ planes
#endif

Expand Down Expand Up @@ -2507,8 +2507,8 @@

// The number of linear moves that can be in the planner at once.
// The value of BLOCK_BUFFER_SIZE must be a power of 2 (e.g., 8, 16, 32)
#if BOTH(HAS_MEDIA, DIRECT_STEPPING)
#define BLOCK_BUFFER_SIZE 16
#if ALL(HAS_MEDIA, DIRECT_STEPPING)
#define BLOCK_BUFFER_SIZE 8
#elif HAS_MEDIA
#define BLOCK_BUFFER_SIZE 16
#else
Expand Down Expand Up @@ -3289,7 +3289,7 @@
*/
//#define SENSORLESS_HOMING // StallGuard capable drivers only

#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
#if ANY(SENSORLESS_HOMING, SENSORLESS_PROBING)
// TMC2209: 0...255. TMC2130: -64...63
#define X_STALL_SENSITIVITY 8
#define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY
Expand Down Expand Up @@ -3452,7 +3452,7 @@
*/
//#define SPINDLE_FEATURE
//#define LASER_FEATURE
#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
#if ANY(SPINDLE_FEATURE, LASER_FEATURE)
#define SPINDLE_LASER_ACTIVE_STATE LOW // Set to "HIGH" if SPINDLE_LASER_ENA_PIN is active HIGH

#define SPINDLE_LASER_USE_PWM // Enable if your controller supports setting the speed/power
Expand Down Expand Up @@ -4204,7 +4204,7 @@
//#define WIFISUPPORT // Marlin embedded WiFi management
//#define ESP3D_WIFISUPPORT // ESP3D Library WiFi management (https://github.com/luc-github/ESP3DLib)

#if EITHER(WIFISUPPORT, ESP3D_WIFISUPPORT)
#if ANY(WIFISUPPORT, ESP3D_WIFISUPPORT)
//#define WEBSUPPORT // Start a webserver (which may include auto-discovery)
//#define OTASUPPORT // Support over-the-air firmware updates
//#define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host
Expand Down
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2023-05-27"
//#define STRING_DISTRIBUTION_DATE "2023-06-06"

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/AVR/HAL_SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void spiBegin() {
// output pin high - like sending 0xFF
WRITE(SD_MOSI_PIN, HIGH);

LOOP_L_N(i, 8) {
for (uint8_t i = 0; i < 8; ++i) {
WRITE(SD_SCK_PIN, HIGH);

nop; // adjust so SCK is nice
Expand All @@ -225,7 +225,7 @@ void spiBegin() {
void spiSend(uint8_t data) {
// no interrupts during byte send - about 8µs
cli();
LOOP_L_N(i, 8) {
for (uint8_t i = 0; i < 8; ++i) {
WRITE(SD_SCK_PIN, LOW);
WRITE(SD_MOSI_PIN, data & 0x80);
data <<= 1;
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/AVR/MarlinSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
static constexpr bool DROPPED_RX = false;
static constexpr bool RX_FRAMING_ERRORS = false;
static constexpr bool MAX_RX_QUEUED = false;
static constexpr bool RX_OVERRUNS = BOTH(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS);
static constexpr bool RX_OVERRUNS = ALL(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS);
};

typedef Serial1Class< MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> > > MSerialLCD;
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/AVR/eeprom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "../../inc/MarlinConfig.h"

#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
#if ANY(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)

/**
* PersistentStore for Arduino-style EEPROM interface
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/AVR/fast_pwm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {

DEBUG_ECHOLNPGM("f=", f);
DEBUG_ECHOLNPGM("(prescaler loop)");
LOOP_L_N(i, COUNT(prescaler)) { // Loop through all prescaler values
for (uint8_t i = 0; i < COUNT(prescaler); ++i) { // Loop through all prescaler values
const uint32_t p = prescaler[i]; // Extend to 32 bits for calculations
DEBUG_ECHOLNPGM("prescaler[", i, "]=", p);
uint16_t res_fast_temp, res_pc_temp;
Expand Down Expand Up @@ -232,7 +232,7 @@ void MarlinHAL::init_pwm_timers() {
#endif
};

LOOP_L_N(i, COUNT(pwm_pin))
for (uint8_t i = 0; i < COUNT(pwm_pin); ++i)
set_pwm_frequency(pwm_pin[i], 1000);
}

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/AVR/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@
/**
* The Trinamic library includes SoftwareSerial.h, leading to a compile error.
*/
#if BOTH(HAS_TRINAMIC_CONFIG, ENDSTOP_INTERRUPTS_FEATURE)
#if ALL(HAS_TRINAMIC_CONFIG, ENDSTOP_INTERRUPTS_FEATURE)
#error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
#endif

#if BOTH(HAS_TMC_SW_SERIAL, MONITOR_DRIVER_STATUS)
#if ALL(HAS_TMC_SW_SERIAL, MONITOR_DRIVER_STATUS)
#error "MONITOR_DRIVER_STATUS causes performance issues when used with SoftwareSerial-connected drivers. Disable MONITOR_DRIVER_STATUS or use hardware serial to continue."
#endif

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/AVR/pinsDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@

void PRINT_ARRAY_NAME(uint8_t x) {
PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[x].name);
LOOP_L_N(y, MAX_NAME_LENGTH) {
for (uint8_t y = 0; y < MAX_NAME_LENGTH; ++y) {
char temp_char = pgm_read_byte(name_mem_pointer + y);
if (temp_char != 0)
SERIAL_CHAR(temp_char);
else {
LOOP_L_N(i, MAX_NAME_LENGTH - y) SERIAL_CHAR(' ');
for (uint8_t i = 0; i < MAX_NAME_LENGTH - y; ++i) SERIAL_CHAR(' ');
break;
}
}
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void u8g_spiSend_sw_AVR_mode_0(uint8_t val) {
volatile uint8_t *outData = u8g_outData,
*outClock = u8g_outClock;
U8G_ATOMIC_START();
LOOP_L_N(i, 8) {
for (uint8_t i = 0; i < 8; ++i) {
if (val & 0x80)
*outData |= bitData;
else
Expand All @@ -108,7 +108,7 @@ void u8g_spiSend_sw_AVR_mode_3(uint8_t val) {
volatile uint8_t *outData = u8g_outData,
*outClock = u8g_outClock;
U8G_ATOMIC_START();
LOOP_L_N(i, 8) {
for (uint8_t i = 0; i < 8; ++i) {
*outClock &= bitNotClock;
if (val & 0x80)
*outData |= bitData;
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/DUE/HAL_SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
// Public functions
// ------------------------

#if EITHER(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI)
#if ANY(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI)

// ------------------------
// Software SPI
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Pio *SCK_pPio, *MOSI_pPio;
uint32_t SCK_dwMask, MOSI_dwMask;

void u8g_spiSend_sw_DUE_mode_0(uint8_t val) { // 3MHz
LOOP_L_N(i, 8) {
for (uint8_t i = 0; i < 8; ++i) {
if (val & 0x80)
MOSI_pPio->PIO_SODR = MOSI_dwMask;
else
Expand All @@ -95,7 +95,7 @@ void u8g_spiSend_sw_DUE_mode_0(uint8_t val) { // 3MHz
}

void u8g_spiSend_sw_DUE_mode_3(uint8_t val) { // 3.5MHz
LOOP_L_N(i, 8) {
for (uint8_t i = 0; i < 8; ++i) {
SCK_pPio->PIO_CODR = SCK_dwMask;
DELAY_NS(50);
if (val & 0x80)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/DUE/fastio/G2_PWM.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ extern PWM_map ISR_table[NUM_PWMS];
extern uint32_t motor_current_setting[3];

#define IR_BIT(p) (WITHIN(p, 0, 3) ? (p) : (p) + 4)
#define COPY_ACTIVE_TABLE() do{ LOOP_L_N(i, 6) work_table[i] = active_table[i]; }while(0)
#define COPY_ACTIVE_TABLE() do{ for (uint8_t i = 0; i < 6; ++i) work_table[i] = active_table[i]; }while(0)

#define PWM_MR0 19999 // base repetition rate minus one count - 20mS
#define PWM_PR 24 // prescaler value - prescaler divide by 24 + 1 - 1 MHz output
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/DUE/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@

#if USE_FALLBACK_EEPROM
#define FLASH_EEPROM_EMULATION
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
#elif ANY(I2C_EEPROM, SPI_EEPROM)
#define USE_SHARED_EEPROM 1
#endif
Loading

0 comments on commit b372c22

Please sign in to comment.