takashi kadono / Mbed OS Nucleo_446

Dependencies:   ssd1331

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers OnboardCellularInterface.h Source File

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 #define ONBOARD_CELLULAR_INTERFACE_AVAILABLE
00023 #elif MODEM_ON_BOARD && MODEM_ON_BOARD_UART && NSAPI_PPP_AVAILABLE
00024 
00025 #include "UARTCellularInterface.h"
00026 
00027 /** OnboardCellularInterface class
00028  *
00029  *  @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead.
00030  *
00031  *  This interface serves as the controller/driver for an
00032  *  onboard modem implementing onboard_modem_api.h.
00033  *
00034  *  Depending on the type of on-board modem, OnboardCellularInterface
00035  *  could be derived from different implementation classes.
00036  *  Portable applications should only rely on it being a CellularBase.
00037  */
00038 
00039 class OnboardCellularInterface : public UARTCellularInterface {
00040 
00041 public:
00042 
00043     /** Constructor
00044      *  @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead.
00045      */
00046     MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.")
00047     OnboardCellularInterface(bool debug = false);
00048 
00049     /** Destructor
00050      *  @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead.
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 ~OnboardCellularInterface();
00054 
00055 protected:
00056     /** Sets the modem up for powering on
00057      *
00058      *  @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead.
00059      *
00060      *  modem_init() is equivalent to plugging in the device, for example, attaching power and serial port.
00061      *  Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api.
00062      */
00063     MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.")
00064     virtual void modem_init();
00065 
00066     /** Sets the modem in unplugged state
00067      *
00068      *  @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead.
00069      *
00070      *  modem_deinit() will be equivalent to pulling the plug off of the device, in other words, detaching power
00071      *  and serial port. This puts the modem in lowest power state.
00072      *  Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api.
00073      */
00074     MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.")
00075     virtual void modem_deinit();
00076 
00077     /** Powers up the modem
00078      *
00079      *  @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead.
00080      *
00081      *  modem_power_up() is equivalent to pressing the soft power button.
00082      *  The driver may repeat this if the modem is not responsive to AT commands.
00083      *  Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api.
00084      */
00085     MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.")
00086     virtual void modem_power_up();
00087 
00088     /** Powers down the modem
00089      *
00090      *  @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularPower.h instead.
00091      *
00092      *  modem_power_down() is equivalent to turning off the modem by button press.
00093      *  Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api.
00094      */
00095     MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.")
00096     virtual void modem_power_down();
00097 };
00098 
00099 #define ONBOARD_CELLULAR_INTERFACE_AVAILABLE
00100 
00101 #endif //MODEM_ON_BOARD && MODEM_ON_BOARD_UART && NSAPI_PPP_AVAILABLE
00102 #endif //ONBOARD_CELLULAR_INTERFACE_