🔧 Some STM32 UART Sanity Checks (#24795)
This commit is contained in:
@ -2231,6 +2231,80 @@
|
||||
REPORT_NAME_DIGITAL(__LINE__, TFT_RESET_PIN)
|
||||
#endif
|
||||
|
||||
//
|
||||
// Hardware UART
|
||||
//
|
||||
#if SERIAL_IN_USE(1)
|
||||
#if PIN_EXISTS(UART1_TX)
|
||||
REPORT_NAME_DIGITAL(__LINE__, UART1_TX_PIN)
|
||||
#endif
|
||||
#if PIN_EXISTS(UART1_RX)
|
||||
REPORT_NAME_DIGITAL(__LINE__, UART1_RX_PIN)
|
||||
#endif
|
||||
#endif
|
||||
#if SERIAL_IN_USE(2)
|
||||
#if PIN_EXISTS(UART2_TX)
|
||||
REPORT_NAME_DIGITAL(__LINE__, UART2_TX_PIN)
|
||||
#endif
|
||||
#if PIN_EXISTS(UART2_RX)
|
||||
REPORT_NAME_DIGITAL(__LINE__, UART2_RX_PIN)
|
||||
#endif
|
||||
#endif
|
||||
#if SERIAL_IN_USE(3)
|
||||
#if PIN_EXISTS(UART3_TX)
|
||||
REPORT_NAME_DIGITAL(__LINE__, UART3_TX_PIN)
|
||||
#endif
|
||||
#if PIN_EXISTS(UART3_RX)
|
||||
REPORT_NAME_DIGITAL(__LINE__, UART3_RX_PIN)
|
||||
#endif
|
||||
#endif
|
||||
#if SERIAL_IN_USE(4)
|
||||
#if PIN_EXISTS(UART4_TX)
|
||||
REPORT_NAME_DIGITAL(__LINE__, UART4_TX_PIN)
|
||||
#endif
|
||||
#if PIN_EXISTS(UART4_RX)
|
||||
REPORT_NAME_DIGITAL(__LINE__, UART4_RX_PIN)
|
||||
#endif
|
||||
#endif
|
||||
#if SERIAL_IN_USE(5)
|
||||
#if PIN_EXISTS(UART5_TX)
|
||||
REPORT_NAME_DIGITAL(__LINE__, UART5_TX_PIN)
|
||||
#endif
|
||||
#if PIN_EXISTS(UART5_RX)
|
||||
REPORT_NAME_DIGITAL(__LINE__, UART5_RX_PIN)
|
||||
#endif
|
||||
#endif
|
||||
#if SERIAL_IN_USE(6)
|
||||
#if PIN_EXISTS(UART6_TX)
|
||||
REPORT_NAME_DIGITAL(__LINE__, UART6_TX_PIN)
|
||||
#endif
|
||||
#if PIN_EXISTS(UART6_RX)
|
||||
REPORT_NAME_DIGITAL(__LINE__, UART6_RX_PIN)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// SDIO
|
||||
//
|
||||
#if PIN_EXISTS(SDIO_D0)
|
||||
REPORT_NAME_DIGITAL(__LINE__, SDIO_D0_PIN)
|
||||
#endif
|
||||
#if PIN_EXISTS(SDIO_D1)
|
||||
REPORT_NAME_DIGITAL(__LINE__, SDIO_D1_PIN)
|
||||
#endif
|
||||
#if PIN_EXISTS(SDIO_D2)
|
||||
REPORT_NAME_DIGITAL(__LINE__, SDIO_D2_PIN)
|
||||
#endif
|
||||
#if PIN_EXISTS(SDIO_D3)
|
||||
REPORT_NAME_DIGITAL(__LINE__, SDIO_D3_PIN)
|
||||
#endif
|
||||
#if PIN_EXISTS(SDIO_CK)
|
||||
REPORT_NAME_DIGITAL(__LINE__, SDIO_CK_PIN)
|
||||
#endif
|
||||
#if PIN_EXISTS(SDIO_CMD)
|
||||
REPORT_NAME_DIGITAL(__LINE__, SDIO_CMD_PIN)
|
||||
#endif
|
||||
|
||||
//
|
||||
// Miscellaneous
|
||||
//
|
||||
|
@ -173,14 +173,14 @@
|
||||
* GND | 9 10 | 5V
|
||||
* ------
|
||||
*/
|
||||
#define EXP3_01_PIN PC6
|
||||
#define EXP3_02_PIN PB2
|
||||
#define EXP3_03_PIN PB10
|
||||
#define EXP3_04_PIN PB11
|
||||
#define EXP3_05_PIN PB14
|
||||
#define EXP3_06_PIN PB13
|
||||
#define EXP3_07_PIN PB12
|
||||
#define EXP3_08_PIN PB15
|
||||
#define EXP3_01_PIN PC6
|
||||
#define EXP3_02_PIN PB2
|
||||
#define EXP3_03_PIN PB10
|
||||
#define EXP3_04_PIN PB11
|
||||
#define EXP3_05_PIN PB14
|
||||
#define EXP3_06_PIN PB13
|
||||
#define EXP3_07_PIN PB12
|
||||
#define EXP3_08_PIN PB15
|
||||
|
||||
#elif EITHER(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD)
|
||||
|
||||
@ -194,14 +194,14 @@
|
||||
* GND | 9 10 | 5V
|
||||
* ------
|
||||
*/
|
||||
#define EXP3_01_PIN -1
|
||||
#define EXP3_02_PIN PC5
|
||||
#define EXP3_03_PIN PB10
|
||||
#define EXP3_04_PIN -1
|
||||
#define EXP3_05_PIN PA6
|
||||
#define EXP3_06_PIN PA5
|
||||
#define EXP3_07_PIN PA4
|
||||
#define EXP3_08_PIN PA7
|
||||
#define EXP3_01_PIN -1
|
||||
#define EXP3_02_PIN PC5
|
||||
#define EXP3_03_PIN PB10
|
||||
#define EXP3_04_PIN -1
|
||||
#define EXP3_05_PIN PA6
|
||||
#define EXP3_06_PIN PA5
|
||||
#define EXP3_07_PIN PA4
|
||||
#define EXP3_08_PIN PA7
|
||||
|
||||
#elif EITHER(CR10_STOCKDISPLAY, FYSETC_MINI_12864_2_1)
|
||||
#error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for the LCD with the Creality V4 controller."
|
||||
@ -283,3 +283,26 @@
|
||||
#define NEOPIXEL_PIN PA13
|
||||
|
||||
#endif
|
||||
|
||||
// Pins for documentation and sanity checks only.
|
||||
// Changing these will not change the pin they are on.
|
||||
|
||||
// Hardware UART pins
|
||||
#define UART1_TX_PIN PA9 // default uses CH340 RX
|
||||
#define UART1_RX_PIN PA10 // default uses CH340 TX
|
||||
#define UART2_TX_PIN PA2 // default uses HEATER_BED_PIN
|
||||
#define UART2_RX_PIN PA3 // not connected
|
||||
#define UART3_TX_PIN PB10 // default uses LCD connector
|
||||
#define UART3_RX_PIN PB11 // default uses LCD connector
|
||||
#define UART4_TX_PIN PC10 // default uses sdcard SDIO_D2
|
||||
#define UART4_RX_PIN PC11 // default uses sdcard SDIO_D3
|
||||
#define UART5_TX_PIN PC12 // default uses sdcard SDIO_CK
|
||||
#define UART5_RX_PIN PD2 // default uses sdcard SDIO_CMD
|
||||
|
||||
// SDIO pins
|
||||
#define SDIO_D0_PIN PC8
|
||||
#define SDIO_D1_PIN PC9
|
||||
#define SDIO_D2_PIN PC10
|
||||
#define SDIO_D3_PIN PC11
|
||||
#define SDIO_CK_PIN PC12
|
||||
#define SDIO_CMD_PIN PD2
|
||||
|
Reference in New Issue
Block a user