mirror of
https://github.com/juribeparada/MMDVM_HS.git
synced 2026-04-07 23:33:40 +00:00
Serial repeater port changes
Enables neater connection to erroneous boards with only 3 pins on USART2 like the one I have! USART1 is now the default for Nextion serial repeater unless you define STM32_USART1_HOST or ZUMSPOT_LIBRE in Config.h Needed to specify ZUMSPOT_LIBRE as separate board in Config.h as this only has a header for USART2 - Libre Kit will not use these changes. All other boards appear to break out all USARTs in some form or other (specifically USART1) EA7GIB's boards will now have a minor labelling error in that the header labelled Nextion (USART2) is no longer the Nextion port unless you define STM32_USART1_HOST or ZUMSPOT_LIBRE in Config.h. If like me your OCD triggers with this, define ZUMSPOT_LIBRE and the nextion will be forced to USART2 (as labelled!)
This commit is contained in:
parent
438cfc2b82
commit
f69805f247
4 changed files with 33 additions and 15 deletions
12
IOSTM.cpp
12
IOSTM.cpp
|
|
@ -139,7 +139,7 @@
|
|||
#define PIN_COS_LED GPIO_Pin_15
|
||||
#define PORT_COS_LED GPIOB
|
||||
|
||||
#elif defined(ADF7021_CARRIER_BOARD)
|
||||
#elif defined(ADF7021_CARRIER_BOARD) || defined(ZUMSPOT_LIBRE)
|
||||
|
||||
#define PIN_SCLK GPIO_Pin_5
|
||||
#define PORT_SCLK GPIOB
|
||||
|
|
@ -197,7 +197,7 @@
|
|||
#define PORT_COS_LED GPIOB
|
||||
|
||||
#else
|
||||
#error "Either PI_HAT_7021_REV_02, PI_HAT_7021_REV_03, or ADF7021_CARRIER_BOARD need to be defined"
|
||||
#error "Either PI_HAT_7021_REV_02, PI_HAT_7021_REV_03, ZUMSPOT_LIBRE or ADF7021_CARRIER_BOARD need to be defined"
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
|
|
@ -219,7 +219,7 @@ extern "C" {
|
|||
}
|
||||
#endif
|
||||
|
||||
#elif defined(PI_HAT_7021_REV_03) || defined(ADF7021_CARRIER_BOARD)
|
||||
#elif defined(PI_HAT_7021_REV_03) || defined(ADF7021_CARRIER_BOARD) || defined(ZUMSPOT_LIBRE)
|
||||
|
||||
#if defined(BIDIR_DATA_PIN)
|
||||
void EXTI3_IRQHandler(void) {
|
||||
|
|
@ -247,7 +247,7 @@ void CIO::Init()
|
|||
|
||||
#if defined(PI_HAT_7021_REV_02)
|
||||
GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE);
|
||||
#elif defined(PI_HAT_7021_REV_03) || defined(ADF7021_CARRIER_BOARD)
|
||||
#elif defined(PI_HAT_7021_REV_03) || defined(ADF7021_CARRIER_BOARD) || defined(ZUMSPOT_LIBRE)
|
||||
GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);
|
||||
#endif
|
||||
|
||||
|
|
@ -391,7 +391,7 @@ void CIO::Init()
|
|||
EXTI_InitStructure.EXTI_Line = EXTI_Line14;
|
||||
#endif
|
||||
|
||||
#elif defined(PI_HAT_7021_REV_03) || defined(ADF7021_CARRIER_BOARD)
|
||||
#elif defined(PI_HAT_7021_REV_03) || defined(ADF7021_CARRIER_BOARD) || defined(ZUMSPOT_LIBRE)
|
||||
|
||||
#if defined(BIDIR_DATA_PIN)
|
||||
// Connect EXTI3 Line
|
||||
|
|
@ -421,7 +421,7 @@ void CIO::startInt()
|
|||
|
||||
NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn;
|
||||
|
||||
#elif defined(PI_HAT_7021_REV_03) || defined(ADF7021_CARRIER_BOARD)
|
||||
#elif defined(PI_HAT_7021_REV_03) || defined(ADF7021_CARRIER_BOARD) || defined(ZUMSPOT_LIBRE)
|
||||
|
||||
#if defined(BIDIR_DATA_PIN)
|
||||
// Enable and set EXTI3 Interrupt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue