mirror of
https://github.com/g4klx/MMDVM_HS.git
synced 2026-01-25 18:00:17 +01:00
commit
2c812991f7
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -4,3 +4,5 @@
|
|||
bin/
|
||||
|
||||
GitVersion\.h
|
||||
|
||||
STM32F10X_Lib/
|
||||
|
|
|
|||
4
Config.h
4
Config.h
|
|
@ -58,8 +58,10 @@
|
|||
// Send RSSI value:
|
||||
// #define SEND_RSSI_DATA
|
||||
|
||||
// Enable Nextion LCD serial port repeater:
|
||||
// Enable Nextion LCD serial port repeater on USART2:
|
||||
// #define SERIAL_REPEATER
|
||||
// Enable Nextion LCD serial port repeater on USART1 (not compatible with ZUM-Spot Libre or STM32_USART1_HOST):
|
||||
// #define SERIAL_REPEATER_USART1
|
||||
|
||||
// Enable P25 Wide modulation
|
||||
// #define ENABLE_P25_WIDE
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
#define PIN_COS_LED PB15
|
||||
|
||||
#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 or ADF7021_CARRIER_BOARD need to be defined"
|
||||
#endif
|
||||
|
||||
#elif defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)
|
||||
|
|
|
|||
|
|
@ -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 or ADF7021_CARRIER_BOARD need to be defined"
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ USART2 - TXD PA2 - RXD PA3
|
|||
#define TX_SERIAL_FIFO_SIZE 256U
|
||||
#define RX_SERIAL_FIFO_SIZE 256U
|
||||
|
||||
#if defined(STM32_USART1_HOST)
|
||||
#if defined(STM32_USART1_HOST) || defined(SERIAL_REPEATER_USART1)
|
||||
|
||||
extern "C" {
|
||||
void USART1_IRQHandler();
|
||||
|
|
@ -443,6 +443,10 @@ void CSerialPort::beginInt(uint8_t n, int speed)
|
|||
case 3U:
|
||||
InitUSART2(speed);
|
||||
break;
|
||||
#elif defined(SERIAL_REPEATER_USART1)
|
||||
case 3U:
|
||||
InitUSART1(speed);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
|
|
@ -461,6 +465,9 @@ int CSerialPort::availableInt(uint8_t n)
|
|||
#if defined(SERIAL_REPEATER)
|
||||
case 3U:
|
||||
return AvailUSART2();
|
||||
#elif defined(SERIAL_REPEATER_USART1)
|
||||
case 3U:
|
||||
return AvailUSART1();
|
||||
#endif
|
||||
default:
|
||||
return 0;
|
||||
|
|
@ -479,6 +486,9 @@ uint8_t CSerialPort::readInt(uint8_t n)
|
|||
#if defined(SERIAL_REPEATER)
|
||||
case 3U:
|
||||
return ReadUSART2();
|
||||
#elif defined(SERIAL_REPEATER_USART1)
|
||||
case 3U:
|
||||
return ReadUSART1();
|
||||
#endif
|
||||
default:
|
||||
return 0U;
|
||||
|
|
@ -505,6 +515,12 @@ void CSerialPort::writeInt(uint8_t n, const uint8_t* data, uint16_t length, bool
|
|||
if (flush)
|
||||
TXSerialFlush2();
|
||||
break;
|
||||
#elif defined(SERIAL_REPEATER_USART1)
|
||||
case 3U:
|
||||
WriteUSART1(data, length);
|
||||
if (flush)
|
||||
TXSerialFlush1();
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue