Merge pull request #7159 from juhaylinen/greentea_mtb_emac

Add targets to Greentea EMAC tests
pull/7151/head
Cruz Monrreal 2018-06-11 08:51:20 -05:00 committed by GitHub
commit e78943e062
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 6 deletions

View File

@ -32,12 +32,17 @@
#if MBED_CONF_APP_TEST_WIFI
#ifdef TARGET_UBLOX_EVK_ODIN_W2
#if defined(TARGET_UBLOX_EVK_ODIN_W2) || defined(TARGET_MTB_UBLOX_ODIN_W2)
#include "OdinWiFiInterface.h"
#endif
#ifdef TARGET_REALTEK_RTL8195AM
#include "RTWInterface.h"
#endif
#if defined(TARGET_MTB_ADV_WISE_1530) || \
defined(TARGET_MTB_USI_WM_BN_BM_22) || \
defined(TARGET_MTB_MXCHIP_EMW3166)
#include "WicedInterface.h"
#endif
#endif
@ -61,10 +66,14 @@ void test_emac_initialize()
#elif MBED_CONF_APP_TEST_WIFI
// Add wifi classes here
#ifdef TARGET_UBLOX_EVK_ODIN_W2
#if defined(TARGET_UBLOX_EVK_ODIN_W2) || defined(TARGET_MTB_UBLOX_ODIN_W2)
static WiFiInterface *network_interface = new OdinWiFiInterface;
#elif TARGET_REALTEK_RTL8195AM
#elif defined(TARGET_REALTEK_RTL8195AM)
static WiFiInterface *network_interface = new RTWInterface;
#elif defined(TARGET_MTB_ADV_WISE_1530) || \
defined(TARGET_MTB_USI_WM_BN_BM_22) || \
defined(TARGET_MTB_MXCHIP_EMW3166)
static WiFiInterface *network_interface = new WicedInterface;
#else
static WiFiInterface *network_interface = new WiFiInterface;
#endif

View File

@ -33,8 +33,13 @@
#error [NOT_SUPPORTED] Both wifi and ethernet testing cannot be enabled
#endif
#if MBED_CONF_APP_TEST_WIFI
#if !defined(TARGET_UBLOX_EVK_ODIN_W2) && !defined(TARGET_REALTEK_RTL8195AM)
#error [NOT_SUPPORTED] Tests are valid only for UBLOX_EVK_ODIN_W2 and REALTEK_RTL8195AM
#if !defined(TARGET_UBLOX_EVK_ODIN_W2) && \
!defined(TARGET_REALTEK_RTL8195AM) && \
!defined(TARGET_MTB_ADV_WISE_1530) && \
!defined(TARGET_MTB_USI_WM_BN_BM_22) && \
!defined(TARGET_MTB_MXCHIP_EMW3166) && \
!defined(TARGET_MTB_UBLOX_ODIN_W2)
#error [NOT_SUPPORTED] Wifi tests are not valid for the target
#endif
#endif

View File

@ -9,7 +9,7 @@
},
"connect-statement" : {
"help" : "Must use 'net' variable name, replace WIFI_SSID, WIFI_PASSWORD, WIFI_SECURITY with your WiFi settings",
"value" : "((WicedInterface *)net)->connect(WIFI_SSID, WIFI_PASSWORD, WIFI_SECURITY)"
"value" : "net->wifiInterface()->connect(WIFI_SSID, WIFI_PASSWORD, WIFI_SECURITY)"
},
"echo-server-addr" : {
"help" : "IP address of echo server",
@ -30,6 +30,9 @@
}
},
"target_overrides": {
"*": {
"nsapi.default-stack": "LWIP"
},
"MTB_ADV_WISE_1530": {
"target.extra_labels_add": ["WICED"],
"target.features_add": ["BLE", "LWIP"]