From 614b014d051cfaa999d854f73a21f9cddad0514b Mon Sep 17 00:00:00 2001 From: Teemu Kultala Date: Fri, 8 Mar 2019 10:22:10 +0200 Subject: [PATCH] cellular: remove last CELLULAR_DEVICE references --- .../TESTS/api/cellular_information/main.cpp | 1 - features/cellular/TESTS/socket/udp/main.cpp | 1 - .../cellular/framework/API/CellularDevice.h | 6 +- .../framework/common/CellularTargets.h | 55 ------------------- .../framework/device/CellularDevice.cpp | 1 - 5 files changed, 3 insertions(+), 61 deletions(-) delete mode 100644 features/cellular/framework/common/CellularTargets.h diff --git a/features/cellular/TESTS/api/cellular_information/main.cpp b/features/cellular/TESTS/api/cellular_information/main.cpp index 8865bc920f..64052d29fc 100644 --- a/features/cellular/TESTS/api/cellular_information/main.cpp +++ b/features/cellular/TESTS/api/cellular_information/main.cpp @@ -21,7 +21,6 @@ #endif #include "CellularUtil.h" // for CELLULAR_ helper macros -#include "CellularTargets.h" #ifndef MBED_CONF_APP_CELLULAR_SIM_PIN #error [NOT_SUPPORTED] SIM pin code is needed. Skipping this build. diff --git a/features/cellular/TESTS/socket/udp/main.cpp b/features/cellular/TESTS/socket/udp/main.cpp index 6abd42f7eb..9a9c67ea38 100644 --- a/features/cellular/TESTS/socket/udp/main.cpp +++ b/features/cellular/TESTS/socket/udp/main.cpp @@ -20,7 +20,6 @@ #endif #include "CellularUtil.h" // for CELLULAR_ helper macros -#include "CellularTargets.h" #ifndef MBED_CONF_APP_CELLULAR_SIM_PIN #error [NOT_SUPPORTED] SIM pin code is needed. Skipping this build. diff --git a/features/cellular/framework/API/CellularDevice.h b/features/cellular/framework/API/CellularDevice.h index 06fa0a70c6..94ed92e6a4 100644 --- a/features/cellular/framework/API/CellularDevice.h +++ b/features/cellular/framework/API/CellularDevice.h @@ -18,7 +18,6 @@ #ifndef CELLULAR_DEVICE_H_ #define CELLULAR_DEVICE_H_ -#include "CellularTargets.h" #include "CellularStateMachine.h" #include "Callback.h" #include "ATHandler.h" @@ -63,8 +62,9 @@ public: SimStateUnknown }; - /** Returns singleton instance of CellularDevice if CELLULAR_DEVICE is defined. If CELLULAR_DEVICE is not - * defined, then it returns NULL. See NetworkInterface::get_default_instance for details. + /** Returns singleton instance of CellularDevice, if Mbed target board has a supported + * onboard modem, or provide-default is defined for a cellular driver in JSON configuration + * files. Otherwise returns NULL. See NetworkInterface::get_default_instance for details. * * @remark Application may override this (non-weak) default implementation. * diff --git a/features/cellular/framework/common/CellularTargets.h b/features/cellular/framework/common/CellularTargets.h deleted file mode 100644 index 60d4646641..0000000000 --- a/features/cellular/framework/common/CellularTargets.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2017, Arm Limited and affiliates. - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef CELLULAR_TARGETS_H_ -#define CELLULAR_TARGETS_H_ - -namespace mbed { - -#ifndef CELLULAR_DEVICE -#if defined(TARGET_ADV_WISE_1570) || defined(TARGET_MTB_ADV_WISE_1570) -#define CELLULAR_DEVICE QUECTEL_BC95 -#elif TARGET_WIO_3G -#define CELLULAR_DEVICE QUECTEL_UG96 -#elif TARGET_WIO_BG96 -#define CELLULAR_DEVICE QUECTEL_BG96 -#elif TARGET_MTS_DRAGONFLY_F411RE -#define CELLULAR_DEVICE TELIT_HE910 -#elif TARGET_MTB_MTS_DRAGONFLY -#define CELLULAR_DEVICE TELIT_HE910 -#elif TARGET_UBLOX_C030 -#if defined(TARGET_UBLOX_C030_R41XM) -#define CELLULAR_DEVICE UBLOX_AT -#elif defined(TARGET_UBLOX_C030_N211) -#define CELLULAR_DEVICE UBLOX_N2XX -#else -#define CELLULAR_DEVICE UBLOX_PPP -#endif -#elif TARGET_UBLOX_C027 -#define CELLULAR_DEVICE UBLOX_PPP -#elif TARGET_MTS_DRAGONFLY_L471QG -#define CELLULAR_DEVICE SARA4_PPP -//#else -//#error Cellular target not defined, see cellular/targets.h -//#define CELLULAR_TARGET -//#define MDMTXD -//#define MDMRXD -#endif -#endif - -} // namespace mbed -#endif // CELLULAR_TARGETS_H_ diff --git a/features/cellular/framework/device/CellularDevice.cpp b/features/cellular/framework/device/CellularDevice.cpp index 61165cd76f..a13efeafd8 100644 --- a/features/cellular/framework/device/CellularDevice.cpp +++ b/features/cellular/framework/device/CellularDevice.cpp @@ -19,7 +19,6 @@ #include "CellularContext.h" #include "CellularUtil.h" #include "CellularLog.h" -#include "CellularTargets.h" #include "events/EventQueue.h" namespace mbed {