Merge pull request #11881 from hugueskamba/hk-UBLOX_EVK_ODIN_W2-enable-baremetal

UBLOX_EVK_ODIN_W2: Fix baremetal build and greentea tests
pull/11936/head
Martin Kojtal 2019-11-25 08:40:33 +01:00 committed by GitHub
commit 1a2ecebc62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 25 additions and 1 deletions

View File

@ -1,6 +1,7 @@
{ {
"name": "ble", "name": "ble",
"config": { "config": {
"present": 1,
"ble-role-observer": { "ble-role-observer": {
"help": "Include observer BLE role support (scanning for and processing advertising packets).", "help": "Include observer BLE role support (scanning for and processing advertising packets).",
"value": true, "value": true,

View File

@ -13,6 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#if !MBED_CONF_BLE_PRESENT
#error [NOT_SUPPORTED] BLE cordio test cases require the BLE library.
#else
#include <stdio.h> #include <stdio.h>
@ -109,3 +112,5 @@ Specification specification(greentea_test_setup, cases, greentea_test_teardown_h
int main() { int main() {
return !Harness::run(specification); return !Harness::run(specification);
} }
#endif // !MBED_CONF_BLE_PRESENT

View File

@ -14,6 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
#if !MBED_CONF_BLE_PRESENT
#error [NOT_SUPPORTED] BLE cordio test cases require the BLE library.
#else
#include <stdio.h> #include <stdio.h>
#include <algorithm> #include <algorithm>
@ -265,3 +269,5 @@ int main()
return !Harness::run(specification); return !Harness::run(specification);
} }
#endif // CORDIO_ZERO_COPY_HCI #endif // CORDIO_ZERO_COPY_HCI
#endif //!MBED_CONF_BLE_PRESENT

View File

@ -1,6 +1,7 @@
{ {
"name": "lwip", "name": "lwip",
"config": { "config": {
"present": 1,
"ipv4-enabled": { "ipv4-enabled": {
"help": "Enable IPv4", "help": "Enable IPv4",
"value": true "value": true

View File

@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
#if MBED_CONF_LWIP_PRESENT
#include "OdinWiFiInterface.h" #include "OdinWiFiInterface.h"
#include "cb_main.h" #include "cb_main.h"
#include "cb_wlan.h" #include "cb_wlan.h"
@ -2107,3 +2109,4 @@ static cbTARGET_PowerSaveMode convertPowerSaveAtToIoctl(target_power_save_mode_e
return mode; return mode;
} }
#endif // MBED_CONF_LWIP_PRESENT

View File

@ -1,5 +1,5 @@
/* ODIN-W2 implementation of WiFiInterface /* ODIN-W2 implementation of WiFiInterface
* Copyright (c) 2016 u-blox Malmö AB * Copyright (c) 2016 u-blox Malm<EFBFBD> AB
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -17,6 +17,8 @@
#ifndef ODIN_WIFI_INTERFACE_H #ifndef ODIN_WIFI_INTERFACE_H
#define ODIN_WIFI_INTERFACE_H #define ODIN_WIFI_INTERFACE_H
#if MBED_CONF_LWIP_PRESENT
#include "WiFiInterface.h" #include "WiFiInterface.h"
#if DEVICE_WIFI_AP #if DEVICE_WIFI_AP
#include "UbloxWiFiSoftAPInterface.h" #include "UbloxWiFiSoftAPInterface.h"
@ -443,3 +445,5 @@ private:
}; };
#endif #endif
#endif // MBED_CONF_LWIP_PRESENT

View File

@ -15,6 +15,8 @@
* limitations under the License. * limitations under the License.
*/ */
#ifdef MBED_CONF_LWIP_PRESENT
#include "OdinWiFiInterface.h" #include "OdinWiFiInterface.h"
WiFiInterface *WiFiInterface::get_target_default_instance() WiFiInterface *WiFiInterface::get_target_default_instance()
@ -22,3 +24,5 @@ WiFiInterface *WiFiInterface::get_target_default_instance()
static OdinWiFiInterface wifi; static OdinWiFiInterface wifi;
return &wifi; return &wifi;
} }
#endif // MBED_CONF_LWIP_PRESENT