From 09c02138987b4e60d2a414259cfad3d82e2b03ee Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Thu, 12 Oct 2017 14:51:53 +0200 Subject: [PATCH] Auto-enable USB serial on cc2538 when TSCH is used with SLIP or with the shell --- arch/platform/cc2538dk/contiki-conf.h | 5 +++-- arch/platform/openmote-cc2538/contiki-conf.h | 5 +++-- arch/platform/zoul/contiki-conf.h | 3 ++- examples/6tisch/etsi-plugtest-2017/project-conf.h | 1 - examples/ipv6/rpl-tsch/project-conf.h | 2 -- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/platform/cc2538dk/contiki-conf.h b/arch/platform/cc2538dk/contiki-conf.h index cad72f1ca..b3719275e 100644 --- a/arch/platform/cc2538dk/contiki-conf.h +++ b/arch/platform/cc2538dk/contiki-conf.h @@ -230,8 +230,9 @@ typedef uint32_t rtimer_clock_t; */ #ifndef USB_SERIAL_CONF_ENABLE #define USB_SERIAL_CONF_ENABLE \ - ((SLIP_ARCH_CONF_USB & SLIP_ARCH_CONF_ENABLED) | \ - DBG_CONF_USB) + ((SLIP_ARCH_CONF_USB && SLIP_ARCH_CONF_ENABLED) || \ + (MAC_CONF_WITH_TSCH && (SLIP_ARCH_CONF_ENABLED || BUILD_WITH_SHELL)) || \ + DBG_CONF_USB) #endif /* diff --git a/arch/platform/openmote-cc2538/contiki-conf.h b/arch/platform/openmote-cc2538/contiki-conf.h index d00836326..ea77d9cba 100644 --- a/arch/platform/openmote-cc2538/contiki-conf.h +++ b/arch/platform/openmote-cc2538/contiki-conf.h @@ -278,8 +278,9 @@ typedef uint32_t rtimer_clock_t; */ #ifndef USB_SERIAL_CONF_ENABLE #define USB_SERIAL_CONF_ENABLE \ - ((SLIP_ARCH_CONF_USB & SLIP_ARCH_CONF_ENABLED) | \ - DBG_CONF_USB) + ((SLIP_ARCH_CONF_USB && SLIP_ARCH_CONF_ENABLED) || \ + (MAC_CONF_WITH_TSCH && (SLIP_ARCH_CONF_ENABLED || BUILD_WITH_SHELL)) || \ + DBG_CONF_USB) #endif /* diff --git a/arch/platform/zoul/contiki-conf.h b/arch/platform/zoul/contiki-conf.h index 93699c2e8..bc6ac2bd2 100644 --- a/arch/platform/zoul/contiki-conf.h +++ b/arch/platform/zoul/contiki-conf.h @@ -276,7 +276,8 @@ typedef uint32_t rtimer_clock_t; */ #ifndef USB_SERIAL_CONF_ENABLE #define USB_SERIAL_CONF_ENABLE \ - ((SLIP_ARCH_CONF_USB & SLIP_ARCH_CONF_ENABLED) | \ + ((SLIP_ARCH_CONF_USB && SLIP_ARCH_CONF_ENABLED) || \ + (MAC_CONF_WITH_TSCH && (SLIP_ARCH_CONF_ENABLED || BUILD_WITH_SHELL)) || \ DBG_CONF_USB) #endif diff --git a/examples/6tisch/etsi-plugtest-2017/project-conf.h b/examples/6tisch/etsi-plugtest-2017/project-conf.h index 97fd591f8..4e0602def 100644 --- a/examples/6tisch/etsi-plugtest-2017/project-conf.h +++ b/examples/6tisch/etsi-plugtest-2017/project-conf.h @@ -104,7 +104,6 @@ * by default the RC oscillator is activated */ #define SYS_CTRL_CONF_OSC32K_USE_XTAL 1 -#define USB_SERIAL_CONF_ENABLE 1 /* USB serial takes space, free more space elsewhere */ #define SICSLOWPAN_CONF_FRAG 0 #define UIP_CONF_BUFFER_SIZE 160 diff --git a/examples/ipv6/rpl-tsch/project-conf.h b/examples/ipv6/rpl-tsch/project-conf.h index e0803481d..dab7407f4 100644 --- a/examples/ipv6/rpl-tsch/project-conf.h +++ b/examples/ipv6/rpl-tsch/project-conf.h @@ -60,8 +60,6 @@ /*******************************************************/ #if WITH_SHELL -/* Needed for CC2538 platforms, for serial */ -#define USB_SERIAL_CONF_ENABLE 1 /* USB serial takes space, free more space elsewhere */ #define SICSLOWPAN_CONF_FRAG 0