Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
OnboardCellularInterface.h
00001 /* Copyright (c) 2017 ARM Limited 00002 * 00003 * Licensed under the Apache License, Version 2.0 (the "License"); 00004 * you may not use this file except in compliance with the License. 00005 * You may obtain a copy of the License at 00006 * 00007 * http://www.apache.org/licenses/LICENSE-2.0 00008 * 00009 * Unless required by applicable law or agreed to in writing, software 00010 * distributed under the License is distributed on an "AS IS" BASIS, 00011 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00012 * See the License for the specific language governing permissions and 00013 * limitations under the License. 00014 */ 00015 00016 #ifndef ONBOARD_CELLULAR_INTERFACE_ 00017 #define ONBOARD_CELLULAR_INTERFACE_ 00018 00019 #include "EasyCellularConnection.h" 00020 #ifdef CELLULAR_DEVICE 00021 typedef mbed::EasyCellularConnection OnboardCellularInterface; 00022 #elif MODEM_ON_BOARD && MODEM_ON_BOARD_UART && NSAPI_PPP_AVAILABLE 00023 00024 #include "UARTCellularInterface.h" 00025 00026 /** OnboardCellularInterface class 00027 * 00028 * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead. 00029 * 00030 * This interface serves as the controller/driver for an 00031 * onboard modem implementing onboard_modem_api.h. 00032 * 00033 * Depending on the type of on-board modem, OnboardCellularInterface 00034 * could be derived from different implementation classes. 00035 * Portable applications should only rely on it being a CellularBase. 00036 */ 00037 00038 class OnboardCellularInterface : public UARTCellularInterface { 00039 00040 public: 00041 00042 /** Constructor 00043 * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead. 00044 */ 00045 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") 00046 OnboardCellularInterface(bool debug = false); 00047 00048 /** Destructor 00049 * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead. 00050 */ 00051 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") 00052 virtual ~OnboardCellularInterface(); 00053 00054 protected: 00055 /** Sets the modem up for powering on 00056 * 00057 * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead. 00058 * 00059 * modem_init() is equivalent to plugging in the device, for example, attaching power and serial port. 00060 * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. 00061 */ 00062 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") 00063 virtual void modem_init(); 00064 00065 /** Sets the modem in unplugged state 00066 * 00067 * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead. 00068 * 00069 * modem_deinit() will be equivalent to pulling the plug off of the device, in other words, detaching power 00070 * and serial port. This puts the modem in lowest power state. 00071 * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. 00072 */ 00073 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") 00074 virtual void modem_deinit(); 00075 00076 /** Powers up the modem 00077 * 00078 * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead. 00079 * 00080 * modem_power_up() is equivalent to pressing the soft power button. 00081 * The driver may repeat this if the modem is not responsive to AT commands. 00082 * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. 00083 */ 00084 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") 00085 virtual void modem_power_up(); 00086 00087 /** Powers down the modem 00088 * 00089 * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead. 00090 * 00091 * modem_power_down() is equivalent to turning off the modem by button press. 00092 * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. 00093 */ 00094 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") 00095 virtual void modem_power_down(); 00096 }; 00097 00098 #endif //MODEM_ON_BOARD && MODEM_ON_BOARD_UART && NSAPI_PPP_AVAILABLE 00099 #endif //ONBOARD_CELLULAR_INTERFACE_
Generated on Tue Jul 12 2022 12:32:50 by
