Denislam Valeev / Mbed OS Nucleo_rtos_basic
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers OnboardCellularInterface.cpp Source File

OnboardCellularInterface.cpp

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 #include "OnboardCellularInterface.h"
00017 
00018 #ifndef CELLULAR_DEVICE
00019 
00020 #if MODEM_ON_BOARD && MODEM_ON_BOARD_UART && NSAPI_PPP_AVAILABLE
00021 
00022 #include "onboard_modem_api.h"
00023 
00024 /**
00025  * OnboardCellularInterface is an on-board specific implementation.
00026  */
00027 OnboardCellularInterface::OnboardCellularInterface(bool debug) :
00028                                                       UARTCellularInterface(MDMTXD, MDMRXD, MDMDCD, MDMRTS,
00029                                                                             MDMCTS, MDMRI, MDMDTR, MDMDSR,
00030                                                                             MBED_CONF_PPP_CELL_IFACE_BAUD_RATE, MDM_PIN_POLARITY, debug)
00031 {
00032 }
00033 
00034 OnboardCellularInterface::~OnboardCellularInterface()
00035 {
00036 }
00037 
00038 void OnboardCellularInterface::modem_init()
00039 {
00040     ::onboard_modem_init();
00041 }
00042 
00043 void OnboardCellularInterface::modem_deinit()
00044 {
00045     ::onboard_modem_deinit();
00046 }
00047 
00048 void OnboardCellularInterface::modem_power_up()
00049 {
00050     ::onboard_modem_power_up();
00051 }
00052 
00053 void OnboardCellularInterface::modem_power_down()
00054 {
00055     ::onboard_modem_power_down();
00056 }
00057 #endif
00058 
00059 #endif // CELLULAR_DEVICE