Life is random and unfair!

Fork of mbed-dev by Cortney Padua

Files at this revision

API Documentation at this revision

Comitter:
znew711
Date:
Tue Apr 11 21:43:36 2017 +0000
Parent:
163:1d4c9d0af1e9
Commit message:
life is random and unfair;

Changed in this revision

targets/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/device.h Show annotated file Show diff for this revision Revisions of this file
targets/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c Show annotated file Show diff for this revision Revisions of this file
diff -r 1d4c9d0af1e9 -r 063a45287df4 targets/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/device.h
--- a/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/device.h	Tue Apr 11 20:39:24 2017 +0000
+++ b/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO/device.h	Tue Apr 11 21:43:36 2017 +0000
@@ -23,7 +23,8 @@
 
 
 
-
+#define DEVICE_SERIAL           1
+#define DEVICE_SERIAL_FC        1
 
 
 
diff -r 1d4c9d0af1e9 -r 063a45287df4 targets/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c
--- a/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c	Tue Apr 11 20:39:24 2017 +0000
+++ b/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c	Tue Apr 11 21:43:36 2017 +0000
@@ -60,12 +60,12 @@
 
     //pin configurations --
     NRF_GPIO->OUT |= (1 << tx);
-    NRF_GPIO->OUT |= (1 << RTS_PIN_NUMBER);
+    //NRF_GPIO->OUT |= (1 << RTS_PIN_NUMBER);
     NRF_GPIO->DIR |= (1 << tx); //TX_PIN_NUMBER);
-    NRF_GPIO->DIR |= (1 << RTS_PIN_NUMBER);
+    //NRF_GPIO->DIR |= (1 << RTS_PIN_NUMBER);
 
     NRF_GPIO->DIR &= ~(1 << rx); //RX_PIN_NUMBER);
-    NRF_GPIO->DIR &= ~(1 << CTS_PIN_NUMBER);
+    //NRF_GPIO->DIR &= ~(1 << CTS_PIN_NUMBER);
 
 
     // set default baud rate and format
@@ -85,10 +85,10 @@
 
     obj->index = 0;
     
-    obj->uart->PSELRTS = RTS_PIN_NUMBER;
     obj->uart->PSELTXD = tx; //TX_PIN_NUMBER;
-    obj->uart->PSELCTS = CTS_PIN_NUMBER;
     obj->uart->PSELRXD = rx; //RX_PIN_NUMBER;
+    obj->uart->PSELRTS = 0xFFFFFFFF; // Disable RTS
+    obj->uart->PSELCTS = 0xFFFFFFFF; // Disable CTS
 
     // set rx/tx pins in PullUp mode
     if (tx != NC) {