Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MKS Robin Nano v3 WiFi module (TFT_LVGL_UI) #22109

Merged
merged 27 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
aa595f5
Merge pull request #1 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 11, 2020
d5d325c
Merge pull request #2 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 13, 2020
d8d5c0f
Merge pull request #4 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 14, 2020
a1055dd
Merge pull request #6 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 18, 2020
8b349b1
Merge pull request #7 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 22, 2020
8c42e50
Merge pull request #14 from MarlinFirmware/bugfix-2.0.x
makerbase-mks Jun 27, 2020
626ed70
Merge pull request #15 from MarlinFirmware/bugfix-2.0.x
makerbase-mks Jul 1, 2020
80a2552
Merge pull request #16 from MarlinFirmware/bugfix-2.0.x
MKS-Sean Jul 2, 2020
8386fdf
Merge pull request #54 from MarlinFirmware/bugfix-2.0.x
MKS-Sean Jun 11, 2021
3034d86
mks robin nano v3 add function of wifi
MKS-Sean Jun 11, 2021
8975478
Update irq_overrid.cpp
thinkyhead Jun 11, 2021
5708db5
Fix the header file path
MKS-Sean Jun 12, 2021
321a2fa
Update printer_operation.cpp
thinkyhead Jun 13, 2021
523f2db
split up wifiserial
thinkyhead Jun 13, 2021
25a582f
Add STM32 test
thinkyhead Jun 14, 2021
7b91ec3
split up headers by platform
thinkyhead Jun 14, 2021
ee3599d
Indicate Maple target
thinkyhead Jun 14, 2021
f1a25f2
Merge 'bugfix-2.0.x' into pr/22109
thinkyhead Jun 24, 2021
f5f59cd
Fix #endif comments
thinkyhead Jun 24, 2021
a338b70
Tweak some #ifdefs
thinkyhead Jun 24, 2021
7491014
apply some PSTR
thinkyhead Jun 24, 2021
e1a2286
tweak wifi ticks
thinkyhead Jun 24, 2021
c347ebd
Simplify MKS custom filament check
thinkyhead Jun 24, 2021
c226226
Tweak MKS hardware test
thinkyhead Jun 24, 2021
724c688
Merge pull request #58 from MarlinFirmware/bugfix-2.0.x
solawc Jul 12, 2021
22b5de0
Allow for no hotend / fan
thinkyhead Jul 13, 2021
5e38f79
Use delay() instead of loop
thinkyhead Jul 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions Marlin/src/HAL/STM32/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
thinkyhead marked this conversation as resolved.
Show resolved Hide resolved

#include "HAL.h"
#include "usb_serial.h"
Expand Down Expand Up @@ -91,15 +91,13 @@ void HAL_init() {
USB_Hook_init();
#endif

TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler
TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler

#if HAS_SD_HOST_DRIVE
MSC_SD_init(); // Enable USB SD card access
#endif
TERN_(HAS_SD_HOST_DRIVE, MSC_SD_init()); // Enable USB SD card access

#if PIN_EXISTS(USB_CONNECT)
OUT_WRITE(USB_CONNECT_PIN, !USB_CONNECT_INVERTING); // USB clear connection
delay(1000); // Give OS time to notice
OUT_WRITE(USB_CONNECT_PIN, !USB_CONNECT_INVERTING); // USB clear connection
delay(1000); // Give OS time to notice
WRITE(USB_CONNECT_PIN, USB_CONNECT_INVERTING);
#endif
}
Expand Down Expand Up @@ -167,4 +165,4 @@ void HAL_SYSTICK_Callback() {
if (systick_user_callback) systick_user_callback();
}

#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
2 changes: 1 addition & 1 deletion Marlin/src/HAL/STM32/HAL_MinSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

#include "../../inc/MarlinConfigPre.h"

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/HAL_SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand Down Expand Up @@ -224,4 +224,4 @@ static SPISettings spiConfig;

#endif // SOFTWARE_SPI

#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/MarlinSPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(STM32H7xx)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) && !defined(STM32H7xx)

#include "MarlinSPI.h"

Expand Down Expand Up @@ -165,4 +165,4 @@ uint8_t MarlinSPI::dmaSend(const void * transmitBuf, uint16_t length, bool minc)
return 1;
}

#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 && !STM32H7xx
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/MarlinSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

#include "../../inc/MarlinConfig.h"
#include "MarlinSerial.h"
Expand Down Expand Up @@ -101,4 +101,4 @@ void MarlinSerial::_rx_complete_irq(serial_t *obj) {
}
}

#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand Down Expand Up @@ -343,4 +343,4 @@

#endif // !USBD_USE_CDC_COMPOSITE
#endif // SDIO_SUPPORT
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/Servo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand Down Expand Up @@ -107,4 +107,4 @@ void libServo::setInterruptPriority(uint32_t preemptPriority, uint32_t subPriori
}

#endif // HAS_SERVOS
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/eeprom_flash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand Down Expand Up @@ -270,4 +270,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t
}

#endif // FLASH_EEPROM_EMULATION
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/eeprom_sdcard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

/**
* Implementation of EEPROM settings in SD Card
Expand Down Expand Up @@ -88,4 +88,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uin
}

#endif // SDCARD_EEPROM_EMULATION
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/eeprom_sram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand Down Expand Up @@ -65,4 +65,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t
}

#endif // SRAM_EEPROM_EMULATION
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/eeprom_wired.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand Down Expand Up @@ -75,4 +75,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t
}

#endif // USE_WIRED_EEPROM
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/fast_pwm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

#include "../../inc/MarlinConfigPre.h"

Expand Down Expand Up @@ -56,4 +56,4 @@ void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255
}

#endif // NEEDS_HARDWARE_PWM
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/fastio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand All @@ -31,4 +31,4 @@ void FastIO_init() {
FastIOPortMap[STM_PORT(digitalPin[i])] = get_GPIO_Port(STM_PORT(digitalPin[i]));
}

#endif
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
14 changes: 9 additions & 5 deletions Marlin/src/HAL/STM32/msc_sd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,24 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

#include "../../inc/MarlinConfigPre.h"

#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && HAS_SD_HOST_DRIVE
#if HAS_SD_HOST_DRIVE

#include "msc_sd.h"
#include "../shared/Marduino.h"
#include "usbd_core.h"

#include "../shared/Marduino.h"
#include "../../sd/cardreader.h"

#include <USB.h>
#include <USBMscHandler.h>

#define BLOCK_SIZE 512
#define PRODUCT_ID 0x29

#include "../../sd/cardreader.h"

class Sd2CardUSBMscHandler : public USBMscHandler {
public:
DiskIODriver* diskIODriver() {
Expand Down Expand Up @@ -121,4 +124,5 @@ void MSC_SD_init() {
USBDevice.begin();
}

#endif // __STM32F1__ && HAS_SD_HOST_DRIVE
#endif // HAS_SD_HOST_DRIVE
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/tft/gt911.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand Down Expand Up @@ -199,4 +199,4 @@ bool GT911::getPoint(int16_t *x, int16_t *y) {
}

#endif // TFT_TOUCH_DEVICE_GT911
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/tft/tft_fsmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand Down Expand Up @@ -178,4 +178,4 @@ void TFT_FSMC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou
}

#endif // HAS_FSMC_TFT
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/tft/tft_ltdc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand Down Expand Up @@ -384,4 +384,4 @@ void TFT_LTDC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou
}

#endif // HAS_LTDC_TFT
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/tft/tft_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand Down Expand Up @@ -240,4 +240,4 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
}

#endif // HAS_SPI_TFT
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/tft/xpt2046.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand Down Expand Up @@ -167,4 +167,4 @@ uint16_t XPT2046::SoftwareIO(uint16_t data) {
}

#endif // HAS_TFT_XPT2046
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/timers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand Down Expand Up @@ -319,4 +319,4 @@ static constexpr bool verify_no_timer_conflicts() {
// when hovering over it, making it easy to identify the conflicting timers.
static_assert(verify_no_timer_conflicts(), "One or more timer conflict detected. Examine \"timers_in_use\" to help identify conflict.");

#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/usb_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
*/

#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

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

Expand Down Expand Up @@ -114,4 +114,4 @@ uint8_t BulkStorage::Write(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t b
}

#endif // USE_OTG_USB_HOST && USBHOST
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/usb_serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

#include "../../inc/MarlinConfigPre.h"

Expand Down Expand Up @@ -51,4 +51,4 @@ void USB_Hook_init() {
}

#endif // EMERGENCY_PARSER && USBD_USE_CDC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/watchdog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)

#include "../../inc/MarlinConfigPre.h"

Expand All @@ -46,4 +46,4 @@ void HAL_watchdog_refresh() {
}

#endif // USE_WATCHDOG
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
7 changes: 5 additions & 2 deletions Marlin/src/HAL/STM32F1/msc_sd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifdef __STM32F1__

#include "../../inc/MarlinConfigPre.h"

#if defined(__STM32F1__) && HAS_SD_HOST_DRIVE
#if HAS_SD_HOST_DRIVE

#include "msc_sd.h"
#include "SPI.h"
Expand Down Expand Up @@ -92,4 +94,5 @@ void MSC_SD_init() {
#endif
}

#endif // __STM32F1__ && HAS_SD_HOST_DRIVE
#endif // HAS_SD_HOST_DRIVE
#endif // __STM32F1__
Loading