diff --git a/mongoose.h b/mongoose.h index d21f3c548215cf76b16d4ac1a78105d6df447301..d23c70161ccf7f917acd3550a257791ca12df017 100644 --- a/mongoose.h +++ b/mongoose.h @@ -46,9 +46,10 @@ #define CS_P_WINDOWS 2 #define CS_P_ESP32 15 #define CS_P_ESP8266 3 +#define CS_P_CC3100 6 #define CS_P_CC3200 4 +#define CS_P_CC3220 17 #define CS_P_MSP432 5 -#define CS_P_CC3100 6 #define CS_P_TM4C129 14 #define CS_P_MBED 7 #define CS_P_WINCE 8 @@ -58,7 +59,7 @@ #define CS_P_NRF52 10 #define CS_P_PIC32 11 #define CS_P_STM32 16 -/* Next id: 17 */ +/* Next id: 18 */ /* If not specified explicitly, we guess platform by defines. */ #ifndef CS_PLATFORM @@ -111,8 +112,9 @@ /* Amalgamated: #include "common/platforms/platform_windows.h" */ /* Amalgamated: #include "common/platforms/platform_esp32.h" */ /* Amalgamated: #include "common/platforms/platform_esp8266.h" */ -/* Amalgamated: #include "common/platforms/platform_cc3200.h" */ /* Amalgamated: #include "common/platforms/platform_cc3100.h" */ +/* Amalgamated: #include "common/platforms/platform_cc3200.h" */ +/* Amalgamated: #include "common/platforms/platform_cc3220.h" */ /* Amalgamated: #include "common/platforms/platform_mbed.h" */ /* Amalgamated: #include "common/platforms/platform_nrf51.h" */ /* Amalgamated: #include "common/platforms/platform_nrf52.h" */ @@ -719,8 +721,10 @@ int stat(const char *pathname, struct stat *st); #define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR) #define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG) -/* As of 5.2.7, TI compiler does not support va_copy() yet. */ +/* 5.x series compilers don't have va_copy, 16.x do. */ +#if __TI_COMPILER_VERSION__ < 16000000 #define va_copy(apc, ap) ((apc) = (ap)) +#endif #endif /* __TI_COMPILER_VERSION__ */ @@ -1115,6 +1119,11 @@ int gettimeofday(struct timeval *tp, void *tzp); #undef fd_set #endif +#if CS_PLATFORM == CS_P_CC3220 +#include <ti/drivers/net/wifi/porting/user.h> +#include <ti/drivers/net/wifi/simplelink.h> +#include <ti/drivers/net/wifi/netapp.h> +#else /* We want to disable SL_INC_STD_BSD_API_NAMING, so we include user.h ourselves * and undef it. */ #define PROVISIONING_API_H_ @@ -1124,6 +1133,7 @@ int gettimeofday(struct timeval *tp, void *tzp); #include <simplelink/include/simplelink.h> #include <simplelink/include/netapp.h> +#endif /* CS_PLATFORM == CS_P_CC3220 */ /* Now define only the subset of the BSD API that we use. * Notably, close(), read() and write() are not defined. */