Fix MKS Robin Nano V3 I2C pins (#21174)

This commit is contained in:
Victor Oliveira 2021-02-24 21:36:55 -03:00 committed by Scott Lahteine
parent 8d05a823e9
commit e9d62822bd
2 changed files with 9 additions and 3 deletions

View file

@ -143,8 +143,12 @@ extern "C" {
#define PIN_SPI_SCK PA5 #define PIN_SPI_SCK PA5
// I2C definitions // I2C definitions
#define PIN_WIRE_SDA PB9 #ifndef PIN_WIRE_SDA
#define PIN_WIRE_SCL PB8 #define PIN_WIRE_SDA PB9
#endif
#ifndef PIN_WIRE_SCL
#define PIN_WIRE_SCL PB8
#endif
// Timer Definitions // Timer Definitions
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin

View file

@ -1486,7 +1486,7 @@ extra_scripts = ${common.extra_scripts}
[env:mks_robin_nano_v3] [env:mks_robin_nano_v3]
platform = ${common_stm32.platform} platform = ${common_stm32.platform}
extends = common_stm32 extends = common_stm32
build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED -DUSBCON -DUSBD_USE_CDC build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED -DUSBCON -DUSBD_USE_CDC -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7
board = genericSTM32F407VGT6 board = genericSTM32F407VGT6
board_build.core = stm32 board_build.core = stm32
board_build.variant = MARLIN_F4x7Vx board_build.variant = MARLIN_F4x7Vx
@ -1509,6 +1509,7 @@ extra_scripts = ${common.extra_scripts}
extends = env:mks_robin_nano_v3 extends = env:mks_robin_nano_v3
platform_packages = ${stm32_flash_drive.platform_packages} platform_packages = ${stm32_flash_drive.platform_packages}
build_flags = ${stm32_flash_drive.build_flags} build_flags = ${stm32_flash_drive.build_flags}
-DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7
-DUSBCON -DUSBCON
-DUSE_USBHOST_HS -DUSE_USBHOST_HS
-DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_PRIO=5
@ -1525,6 +1526,7 @@ extends = env:mks_robin_nano_v3
platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc.zip platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc.zip
build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
build_flags = ${stm32_flash_drive.build_flags} build_flags = ${stm32_flash_drive.build_flags}
-DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7
-DUSBCON -DUSBCON
-DUSE_USBHOST_HS -DUSE_USBHOST_HS
-DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_PRIO=5