mbed library sources

Fork of mbed-src by mbed official

Files at this revision

API Documentation at this revision

Comitter:
Baycken
Date:
Fri Jul 03 17:02:48 2015 +0000
Parent:
581:39197bcd20f2
Commit message:
Disable Hardware Flow Control

Changed in this revision

targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c Show annotated file Show diff for this revision Revisions of this file
diff -r 39197bcd20f2 -r ed68b5b3ef6d targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c
--- a/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c	Thu Jul 02 16:30:08 2015 +0100
+++ b/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c	Fri Jul 03 17:02:48 2015 +0000
@@ -57,10 +57,12 @@
 
     //pin configurations --
     NRF_GPIO->DIR |= (1 << tx); //TX_PIN_NUMBER);
-    NRF_GPIO->DIR |= (1 << RTS_PIN_NUMBER);
+    // Disable Flow Control
+    //NRF_GPIO->DIR |= (1 << RTS_PIN_NUMBER);
 
     NRF_GPIO->DIR &= ~(1 << rx); //RX_PIN_NUMBER);
-    NRF_GPIO->DIR &= ~(1 << CTS_PIN_NUMBER);
+    // Disable Flow Control
+    //NRF_GPIO->DIR &= ~(1 << CTS_PIN_NUMBER);
 
 
     // set default baud rate and format
@@ -77,9 +79,9 @@
 
     obj->index = 0;
     
-    obj->uart->PSELRTS = RTS_PIN_NUMBER;
+    obj->uart->PSELRTS = 0xFFFFFFFF;  // Disable Flow Control
     obj->uart->PSELTXD = tx; //TX_PIN_NUMBER;
-    obj->uart->PSELCTS = CTS_PIN_NUMBER;
+    obj->uart->PSELCTS = 0xFFFFFFFF;  // Disable Flow Control
     obj->uart->PSELRXD = rx; //RX_PIN_NUMBER;
 
     // set rx/tx pins in PullUp mode