BA
/
BaBoRo1
Embed:
(wiki syntax)
Show/hide line numbers
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 * This interface serves as the controller/driver for an 00029 * onboard modem implementing onboard_modem_api.h. 00030 * 00031 * Depending on the type of on-board modem, OnboardCellularInterface 00032 * could be derived from different implementation classes. 00033 * Portable applications should only rely on it being a CellularBase. 00034 */ 00035 00036 class OnboardCellularInterface : public UARTCellularInterface { 00037 00038 public: 00039 00040 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") 00041 OnboardCellularInterface(bool debug = false); 00042 00043 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") 00044 virtual ~OnboardCellularInterface(); 00045 00046 protected: 00047 /** Sets the modem up for powering on 00048 * 00049 * modem_init() is equivalent to plugging in the device, for example, attaching power and serial port. 00050 * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. 00051 */ 00052 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") 00053 virtual void modem_init(); 00054 00055 /** Sets the modem in unplugged state 00056 * 00057 * modem_deinit() will be equivalent to pulling the plug off of the device, in other words, detaching power 00058 * and serial port. This puts the modem in lowest power state. 00059 * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. 00060 */ 00061 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") 00062 virtual void modem_deinit(); 00063 00064 /** Powers up the modem 00065 * 00066 * modem_power_up() is equivalent to pressing the soft power button. 00067 * The driver may repeat this if the modem is not responsive to AT commands. 00068 * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. 00069 */ 00070 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") 00071 virtual void modem_power_up(); 00072 00073 /** Powers down the modem 00074 * 00075 * modem_power_down() is equivalent to turning off the modem by button press. 00076 * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. 00077 */ 00078 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") 00079 virtual void modem_power_down(); 00080 }; 00081 00082 #endif //MODEM_ON_BOARD && MODEM_ON_BOARD_UART && NSAPI_PPP_AVAILABLE 00083 #endif //ONBOARD_CELLULAR_INTERFACE_
Generated on Tue Jul 12 2022 12:22:16 by
