aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Bradley <wmb@firmworks.com>2017-07-12 07:16:08 -1000
committerGitHub <noreply@github.com>2017-07-12 07:16:08 -1000
commit8eaa9ba3243835844c7379ac5647d16be91e458c (patch)
treefd4c1569fbc617d4a38f04055390a27ebafdb4eb
parentae8559721e739d95d24300fc02321d8d89e6ce38 (diff)
parente3fc0821f33cbe877ee47deec23748f8cc7c1339 (diff)
downloadcforth-8eaa9ba3243835844c7379ac5647d16be91e458c.tar.gz
Merge pull request #27 from quozl/arm-teensy3-rts
arm-teensy3 - serial receive hardware flow control
-rw-r--r--src/platform/arm-teensy3/consoleio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/platform/arm-teensy3/consoleio.c b/src/platform/arm-teensy3/consoleio.c
index 712cfa9..57ebf1e 100644
--- a/src/platform/arm-teensy3/consoleio.c
+++ b/src/platform/arm-teensy3/consoleio.c
@@ -193,6 +193,12 @@ void init_uart()
// sre - slew rate enable, slow, p229
CORE_PIN1_CONFIG = PORT_PCR_DSE | PORT_PCR_SRE | PORT_PCR_MUX(3);
+#ifdef ENABLE_RTS
+ // hardware flow control on receive path only, using RTS
+ CORE_PIN6_CONFIG = PORT_PCR_DSE | PORT_PCR_SRE | PORT_PCR_MUX(3);
+ UART0_MODEM = UART_MODEM_RXRTSE;
+#endif
+
// baud rate generator, 115200, derived from test build
// reference, *RM.pdf, table 47-57, page 1275, 38400 baud?
UART0_BDH = 0;