From 1a65e597f181ce5d29228a313ed7236f1d8e2063 Mon Sep 17 00:00:00 2001 From: tarakanov Date: Sun, 2 Apr 2017 13:02:05 +0500 Subject: [PATCH 1/2] Add config for sensortag --- .../6lbr/platform/srf06-cc26xx/Makefile.srf06-cc26xx | 9 +++++++++ examples/6lbr/platform/srf06-cc26xx/enc28j60-arch-gpio.c | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/examples/6lbr/platform/srf06-cc26xx/Makefile.srf06-cc26xx b/examples/6lbr/platform/srf06-cc26xx/Makefile.srf06-cc26xx index d488451a94..f95f2df4f6 100644 --- a/examples/6lbr/platform/srf06-cc26xx/Makefile.srf06-cc26xx +++ b/examples/6lbr/platform/srf06-cc26xx/Makefile.srf06-cc26xx @@ -18,11 +18,20 @@ SMALL=1 #Currently only gpio is supported on CC26xx/CC13xx CC26XX_ENC28J60_ARCH?=gpio +#Configure ENC28J60 Chip Select (CS) pin for Sensortag or Launchpad +#For Lauchpad it is IOID_14, for Sensortag it is IOID_20 +ifeq ($(BOARD),sensortag/cc2650) +CFLAGS += -DBOARD_SENSORTAG +else +CFLAGS += -DBOARD_LAUNCHPAD +endif + #Define the location of the NVM configuration : int, ext #int is the embedded code flash #ext is the external flash, only present on Sensortag and Launchpad CC26XX_NVM?=int + CC26XX_FW?=bin PROJECTDIRS += platform/srf06-cc26xx dev/enc28j60 diff --git a/examples/6lbr/platform/srf06-cc26xx/enc28j60-arch-gpio.c b/examples/6lbr/platform/srf06-cc26xx/enc28j60-arch-gpio.c index a132a6dffb..2941fe48c2 100644 --- a/examples/6lbr/platform/srf06-cc26xx/enc28j60-arch-gpio.c +++ b/examples/6lbr/platform/srf06-cc26xx/enc28j60-arch-gpio.c @@ -57,7 +57,11 @@ #undef SPI_CS_PORT #ifndef CC26XX_ENC28J60_CONF_CS_PORT +#ifdef BOARD_SENSORTAG +#define SPI_CS_PORT BOARD_IOID_DEVPACK_CS +#else #define SPI_CS_PORT IOID_14 +#endif #else #define SPI_CS_PORT CC26XX_ENC28J60_CONF_CS_PORT #endif From 476956c41a94a73a66d963b71f870329a69476c7 Mon Sep 17 00:00:00 2001 From: tarakanov Date: Mon, 3 Apr 2017 12:02:41 +0500 Subject: [PATCH 2/2] remove spaces --- examples/6lbr/platform/srf06-cc26xx/Makefile.srf06-cc26xx | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/6lbr/platform/srf06-cc26xx/Makefile.srf06-cc26xx b/examples/6lbr/platform/srf06-cc26xx/Makefile.srf06-cc26xx index f95f2df4f6..a19d2e8fda 100644 --- a/examples/6lbr/platform/srf06-cc26xx/Makefile.srf06-cc26xx +++ b/examples/6lbr/platform/srf06-cc26xx/Makefile.srf06-cc26xx @@ -31,7 +31,6 @@ endif #ext is the external flash, only present on Sensortag and Launchpad CC26XX_NVM?=int - CC26XX_FW?=bin PROJECTDIRS += platform/srf06-cc26xx dev/enc28j60