From 18bd51707c218137005cd73cb5a35ebfe2bccd6e Mon Sep 17 00:00:00 2001
From: Daniel Campora <daniel@wipy.io>
Date: Tue, 7 Apr 2015 10:41:46 +0200
Subject: [PATCH] cc3200: Enable the stdio UART for the LaunchXL only.

---
 cc3200/boards/WIPY-SD/mpconfigboard.h | 2 +-
 cc3200/mptask.c                       | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/cc3200/boards/WIPY-SD/mpconfigboard.h b/cc3200/boards/WIPY-SD/mpconfigboard.h
index 8e6769313..5f4f60838 100644
--- a/cc3200/boards/WIPY-SD/mpconfigboard.h
+++ b/cc3200/boards/WIPY-SD/mpconfigboard.h
@@ -27,7 +27,7 @@
 
 #include "version.h"
 
-#define WIPY-SD
+#define WIPY_SD
 
 #define BOARD_NAME                                  "WiPy-SD "
 #define MICROPY_HW_BOARD_NAME                       VERSION_E(BOARD_NAME, VERSION_NUMBER)
diff --git a/cc3200/mptask.c b/cc3200/mptask.c
index cc2c6d8bf..6ebb63292 100644
--- a/cc3200/mptask.c
+++ b/cc3200/mptask.c
@@ -135,6 +135,7 @@ soft_reset:
     // we are alive, so let the world know it
     mperror_enable_heartbeat();
 
+#ifdef LAUNCHXL
     // configure the stdio uart pins with the correct alternate functions
     // param 3 ("mode") is DON'T CARE" for AFs others than GPIO
     pin_config ((pin_obj_t *)&pin_GPIO1, PIN_MODE_3, 0, PIN_TYPE_STD_PU, PIN_STRENGTH_2MA);
@@ -147,6 +148,9 @@ soft_reset:
     pyb_stdio_uart = pyb_uart_type.make_new((mp_obj_t)&pyb_uart_type, MP_ARRAY_SIZE(args), 0, args);
     // create a callback for the uart, in order to enable the rx interrupts
     uart_callback_new (pyb_stdio_uart, mp_const_none, MICROPY_STDIO_UART_RX_BUF_SIZE, INT_PRIORITY_LVL_3);
+#else
+    pyb_stdio_uart = MP_OBJ_NULL;
+#endif
 
     pybsleep_reset_cause_t rstcause = pybsleep_get_reset_cause();
     if (rstcause < PYB_SLP_SOFT_RESET) {
-- 
GitLab