summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/cc3k
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/cc3k')
-rw-r--r--stmhal/cc3k/cc3000_common.c5
-rw-r--r--stmhal/cc3k/ccspi.c5
-rw-r--r--stmhal/cc3k/evnt_handler.c5
-rw-r--r--stmhal/cc3k/hci.c5
-rw-r--r--stmhal/cc3k/netapp.c5
-rw-r--r--stmhal/cc3k/nvmem.c4
-rw-r--r--stmhal/cc3k/pybcc3k.c4
-rw-r--r--stmhal/cc3k/security.c5
-rw-r--r--stmhal/cc3k/socket.c5
-rw-r--r--stmhal/cc3k/wlan.c5
10 files changed, 48 insertions, 0 deletions
diff --git a/stmhal/cc3k/cc3000_common.c b/stmhal/cc3k/cc3000_common.c
index 48eda26760..8d9bd7d03a 100644
--- a/stmhal/cc3k/cc3000_common.c
+++ b/stmhal/cc3k/cc3000_common.c
@@ -52,6 +52,9 @@
*
*****************************************************************************/
#include <stdint.h>
+#include "mpconfigport.h"
+
+#if MICROPY_HW_ENABLE_CC3K
#include "cc3000_common.h"
#include "socket.h"
@@ -194,3 +197,5 @@ uint32_t STREAM_TO_UINT32_f(char * cp, uint16_t offset)
//! @}
//
//*****************************************************************************
+
+#endif // MICROPY_HW_ENABLE_CC3K
diff --git a/stmhal/cc3k/ccspi.c b/stmhal/cc3k/ccspi.c
index 4785897e13..133b17d030 100644
--- a/stmhal/cc3k/ccspi.c
+++ b/stmhal/cc3k/ccspi.c
@@ -42,6 +42,9 @@
*****************************************************************************/
#include <stdint.h>
#include <string.h> // for memset
+#include "mpconfigport.h"
+
+#if MICROPY_HW_ENABLE_CC3K
#include "ccspi.h"
#include "hci.h"
@@ -735,3 +738,5 @@ void cc3k_int_poll()
SpiIntGPIOHandler();
}
}
+
+#endif // MICROPY_HW_ENABLE_CC3K
diff --git a/stmhal/cc3k/evnt_handler.c b/stmhal/cc3k/evnt_handler.c
index 5a75fadcc0..cca2e796d7 100644
--- a/stmhal/cc3k/evnt_handler.c
+++ b/stmhal/cc3k/evnt_handler.c
@@ -52,6 +52,9 @@
//******************************************************************************
#include <stdint.h>
+#include "mpconfigport.h"
+
+#if MICROPY_HW_ENABLE_CC3K
#include "cc3000_common.h"
#include "string.h"
@@ -871,3 +874,5 @@ SimpleLinkWaitData(unsigned char *pBuf, unsigned char *from,
//! @}
//
//*****************************************************************************
+
+#endif // MICROPY_HW_ENABLE_CC3K
diff --git a/stmhal/cc3k/hci.c b/stmhal/cc3k/hci.c
index ef77db95f9..533311f175 100644
--- a/stmhal/cc3k/hci.c
+++ b/stmhal/cc3k/hci.c
@@ -50,6 +50,9 @@
#include <stdint.h>
#include <string.h> // for memcpy
+#include "mpconfigport.h"
+
+#if MICROPY_HW_ENABLE_CC3K
#include "cc3000_common.h"
#include "hci.h"
@@ -240,3 +243,5 @@ hci_patch_send(unsigned char ucOpcode, unsigned char *pucBuff, char *patch, unsi
//
//
//*****************************************************************************
+
+#endif // MICROPY_HW_ENABLE_CC3K
diff --git a/stmhal/cc3k/netapp.c b/stmhal/cc3k/netapp.c
index 4b3efb24df..cdeccefc46 100644
--- a/stmhal/cc3k/netapp.c
+++ b/stmhal/cc3k/netapp.c
@@ -41,6 +41,9 @@
*
*****************************************************************************/
#include <stdint.h>
+#include "mpconfigport.h"
+
+#if MICROPY_HW_ENABLE_CC3K
#include "netapp.h"
#include "hci.h"
@@ -475,3 +478,5 @@ long netapp_set_debug_level(unsigned long ulLevel)
}
#endif
+
+#endif // MICROPY_HW_ENABLE_CC3K
diff --git a/stmhal/cc3k/nvmem.c b/stmhal/cc3k/nvmem.c
index 4113620086..774759c41f 100644
--- a/stmhal/cc3k/nvmem.c
+++ b/stmhal/cc3k/nvmem.c
@@ -50,6 +50,9 @@
#include <stdint.h>
#include <string.h>
+#include "mpconfigport.h"
+
+#if MICROPY_HW_ENABLE_CC3K
#include "nvmem.h"
#include "hci.h"
@@ -364,3 +367,4 @@ nvmem_create_entry(unsigned long ulFileId, unsigned long ulNewLen)
//
//*****************************************************************************
+#endif // MICROPY_HW_ENABLE_CC3K
diff --git a/stmhal/cc3k/pybcc3k.c b/stmhal/cc3k/pybcc3k.c
index 8712a3780b..d43f42f0ba 100644
--- a/stmhal/cc3k/pybcc3k.c
+++ b/stmhal/cc3k/pybcc3k.c
@@ -17,6 +17,8 @@
#include "ccdebug.h"
#include "pybcc3k.h"
+#if MICROPY_HW_ENABLE_CC3K
+
// IRQ on PA14, input, pulled up, active low
// EN on PC7, output, active high
// CS on PC6, output, active low
@@ -165,3 +167,5 @@ uint8_t pyb_cc3000_spi_send(uint8_t val) {
HAL_SPI_TransmitReceive(&SPI_HANDLE, data, data, 1, 1000);
return data[0];
}
+
+#endif // MICROPY_HW_ENABLE_CC3K
diff --git a/stmhal/cc3k/security.c b/stmhal/cc3k/security.c
index c12aee370d..c52d7f67e6 100644
--- a/stmhal/cc3k/security.c
+++ b/stmhal/cc3k/security.c
@@ -41,6 +41,9 @@
//*****************************************************************************
#include <stdint.h>
+#include "mpconfigport.h"
+
+#if MICROPY_HW_ENABLE_CC3K
#include "security.h"
@@ -533,3 +536,5 @@ signed long aes_write_key(unsigned char *key)
//! @}
//
//*****************************************************************************
+
+#endif // MICROPY_HW_ENABLE_CC3K
diff --git a/stmhal/cc3k/socket.c b/stmhal/cc3k/socket.c
index cfccbd7831..86a4549ecf 100644
--- a/stmhal/cc3k/socket.c
+++ b/stmhal/cc3k/socket.c
@@ -50,6 +50,9 @@
#include <stdint.h>
#include <string.h> // for memcpy
+#include "mpconfigport.h"
+
+#if MICROPY_HW_ENABLE_CC3K
#include "hci.h"
#include "socket.h"
@@ -1188,3 +1191,5 @@ mdnsAdvertiser(unsigned short mdnsEnabled, char * deviceServiceName, unsigned sh
return ret;
}
+
+#endif // MICROPY_HW_ENABLE_CC3K
diff --git a/stmhal/cc3k/wlan.c b/stmhal/cc3k/wlan.c
index be6b3242ce..b22796a7c8 100644
--- a/stmhal/cc3k/wlan.c
+++ b/stmhal/cc3k/wlan.c
@@ -49,6 +49,9 @@
//*****************************************************************************
#include <stdlib.h>
#include <stdint.h>
+#include "mpconfigport.h"
+
+#if MICROPY_HW_ENABLE_CC3K
#include "wlan.h"
#include "hci.h"
@@ -1262,3 +1265,5 @@ wlan_smart_config_process()
//! @}
//
//*****************************************************************************
+
+#endif // MICROPY_HW_ENABLE_CC3K