Skip to content

Commit 6ee2212

Browse files
committed
add note for Serial2 (not yet implemented)
1 parent d5dc04d commit 6ee2212

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

cores/nRF5/Uart.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,12 @@ size_t Uart::write(const uint8_t data)
205205
return 1;
206206
}
207207

208+
Uart SERIAL_PORT_HARDWARE( NRF_UART0, UARTE0_UART0_IRQn, PIN_SERIAL_RX, PIN_SERIAL_TX );
208209

209-
#define NRF_UART0_IRQn UARTE0_UART0_IRQn
210-
211-
Uart SERIAL_PORT_HARDWARE( NRF_UART0, NRF_UART0_IRQn, PIN_SERIAL_RX, PIN_SERIAL_TX );
210+
#ifdef HAVE_HWSERIAL2
211+
// TODO UART1 is UARTE only, need update class Uart to work
212+
Uart Serial2( NRF_UARTE1, UARTE1_IRQn, PIN_SERIAL2_RX, PIN_SERIAL2_TX );
213+
#endif
212214

213215
extern "C"
214216
{

cores/nRF5/Uart.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,15 @@ class Uart : public HardwareSerial
9393
#define SERIAL_PORT_HARDWARE Serial1
9494
#define SERIAL_PORT_HARDWARE_OPEN Serial1
9595

96+
// TODO need to update class Uart to work with UARTE
97+
//extern Uart Serial2;
98+
//#define HAVE_HWSERIAL2
99+
96100
#else
97101

98102
#define SERIAL_PORT_MONITOR Serial
99103
#define SERIAL_PORT_HARDWARE Serial
100104

101105
#endif
102106

103-
104-
#ifdef __cplusplus
105107
extern Uart SERIAL_PORT_HARDWARE;
106-
#endif

variants/pca10056/variant.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ static const uint8_t AREF = PIN_AREF;
8484
/*
8585
* Serial interfaces
8686
*/
87-
#define PIN_SERIAL_RX (8)
88-
#define PIN_SERIAL_TX (6)
87+
#define PIN_SERIAL_RX (33)
88+
#define PIN_SERIAL_TX (34)
89+
90+
#define PIN_SERIAL2_RX (8)
91+
#define PIN_SERIAL2_TX (6)
8992

9093
/*
9194
* SPI Interfaces

0 commit comments

Comments
 (0)