Adding pin definitions for Teensy boards

pull/13/head
Andy CA6JAU 9 years ago
parent 7d9a3ba593
commit 3645ee19ef

@ -296,7 +296,7 @@ SDATA PB6
SCLK PB5 SCLK PB5
DATA PB4 (TxRxData)* DATA PB4 (TxRxData)*
DCLK PB3 (TxRxCLK)* DCLK PB3 (TxRxCLK)*
CLKOUT PA15 (jumper wire in RF7021SE) CLKOUT PA15 (jumper wire in RF7021SE, not needed with BIDIR_DATA_PIN enabled)
PAC PB14 (PTT LED) PAC PB14 (PTT LED)
VCC 3.3 V VCC 3.3 V
GND Ground GND Ground
@ -335,7 +335,7 @@ reducing EMI.
Pinout definitions for Arduino Due/Zero + RF7021SE: Pinout definitions for Arduino Due/Zero + RF7021SE:
=================================================== ===================================================
Use STM32duino + Arduino IDE for building the code Use Arduino IDE for building the code
- Main RF7021SE board: - Main RF7021SE board:
CE 12 CE 12
@ -345,7 +345,7 @@ SDATA 4 // 2 in Arduino Zero Pro
SCLK 3 SCLK 3
DATA 7 (TxRxData)* DATA 7 (TxRxData)*
DCLK 8 (TxRxCLK)* DCLK 8 (TxRxCLK)*
CLKOUT 2 // 4 in Arduino Zero Pro (jumper wire in RF7021SE) CLKOUT 2 // 4 in Arduino Zero Pro (jumper wire in RF7021SE, not needed with BIDIR_DATA_PIN enabled)
PAC 9 (PTT LED) PAC 9 (PTT LED)
VCC 3.3 V VCC 3.3 V
GND Ground GND Ground
@ -368,3 +368,39 @@ PIN_DEB 11
* You could install a serie resistor (10 - 100 ohms) in each TxRxData and TxRxCLK lines, for * You could install a serie resistor (10 - 100 ohms) in each TxRxData and TxRxCLK lines, for
reducing EMI. reducing EMI.
Pinout definitions for Teensy (3.1, 3.2, 3.5 or 3.6) + RF7021SE:
===================================================
Use Teensyduino + Arduino IDE for building the code
- Main RF7021SE board:
CE 6
SLE 5
SREAD 4
SDATA 3
SCLK 2
DATA 7 (TxRxData)*
DCLK 8 (TxRxCLK)*
CLKOUT 22 (jumper wire in RF7021SE, not needed with BIDIR_DATA_PIN enabled)
PAC 14 (PTT LED)
VCC 3.3 V
GND Ground
- Serial ports:
Teensy USB Port (host communication)
DISP_TXD 1 (Nextion LCD serial repeater)
DISP_RXD 0 (Nextion LCD serial repeater)
- Status LEDs:
COS_LED 15
PTT_LED 14
P25_LED 19
YSF_LED 18
DMR_LED 17
DSTAR_LED 16
- Misc pins:
PIN_LED 13
PIN_DEB 23
* You could install a serie resistor (10 - 100 ohms) in each TxRxData and TxRxCLK lines, for
reducing EMI.

@ -88,6 +88,26 @@
#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 #endif
#elif defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)
// Teensy pin definitions
#define PIN_SCLK 2
#define PIN_SDATA 3
#define PIN_SREAD 4
#define PIN_SLE 5
#define PIN_CE 6
#define PIN_RXD 7
#define PIN_TXD 8
#define PIN_CLKOUT 22
#define PIN_LED 13
#define PIN_DEB 23
#define PIN_DSTAR_LED 16
#define PIN_DMR_LED 17
#define PIN_YSF_LED 18
#define PIN_P25_LED 19
#define PIN_PTT_LED 14
#define PIN_COS_LED 15
#else #else
// Arduino pin definitions (Due and Zero) // Arduino pin definitions (Due and Zero)

@ -37,6 +37,8 @@ void CSerialPort::beginInt(uint8_t n, int speed)
case 3U: case 3U:
#if defined(SERIAL_REPEATER) && defined(__STM32F1__) #if defined(SERIAL_REPEATER) && defined(__STM32F1__)
Serial2.begin(speed); Serial2.begin(speed);
#elif defined(SERIAL_REPEATER) && (defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__))
Serial1.begin(speed);
#endif #endif
break; break;
default: default:
@ -56,6 +58,8 @@ int CSerialPort::availableInt(uint8_t n)
case 3U: case 3U:
#if defined(SERIAL_REPEATER) && defined(__STM32F1__) #if defined(SERIAL_REPEATER) && defined(__STM32F1__)
return Serial2.available(); return Serial2.available();
#elif defined(SERIAL_REPEATER) && (defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__))
return Serial1.available();
#endif #endif
default: default:
return false; return false;
@ -74,6 +78,8 @@ uint8_t CSerialPort::readInt(uint8_t n)
case 3U: case 3U:
#if defined(SERIAL_REPEATER) && defined(__STM32F1__) #if defined(SERIAL_REPEATER) && defined(__STM32F1__)
return Serial2.read(); return Serial2.read();
#elif defined(SERIAL_REPEATER) && (defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__))
return Serial1.read();
#endif #endif
default: default:
return 0U; return 0U;
@ -97,6 +103,9 @@ void CSerialPort::writeInt(uint8_t n, const uint8_t* data, uint16_t length, bool
#if defined(SERIAL_REPEATER) && defined(__STM32F1__) #if defined(SERIAL_REPEATER) && defined(__STM32F1__)
Serial2.write(data, length); Serial2.write(data, length);
break; break;
#elif defined(SERIAL_REPEATER) && (defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__))
Serial1.write(data, length);
break;
#endif #endif
default: default:
break; break;

Loading…
Cancel
Save

Powered by TurnKey Linux.