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.
Dependencies: nRF51_Vdd TextLCD BME280
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 "mbed_toolchain.h" 00017 #include "CellularBase.h" 00018 #include "OnboardCellularInterface.h" 00019 00020 #ifndef CELLULAR_DEVICE 00021 00022 #if MODEM_ON_BOARD && MODEM_ON_BOARD_UART && NSAPI_PPP_AVAILABLE 00023 00024 #include "onboard_modem_api.h" 00025 00026 /** 00027 * OnboardCellularInterface is an on-board specific implementation. 00028 * 00029 */ 00030 00031 OnboardCellularInterface::OnboardCellularInterface(bool debug) : 00032 UARTCellularInterface(MDMTXD, MDMRXD, MDMDCD, MDMRTS, 00033 MDMCTS, MDMRI, MDMDTR, MDMDSR, 00034 MBED_CONF_PPP_CELL_IFACE_BAUD_RATE, MDM_PIN_POLARITY, debug) 00035 { 00036 } 00037 00038 OnboardCellularInterface::~OnboardCellularInterface() 00039 { 00040 } 00041 00042 void OnboardCellularInterface::modem_init() 00043 { 00044 ::onboard_modem_init(); 00045 } 00046 00047 void OnboardCellularInterface::modem_deinit() 00048 { 00049 ::onboard_modem_deinit(); 00050 } 00051 00052 void OnboardCellularInterface::modem_power_up() 00053 { 00054 ::onboard_modem_power_up(); 00055 } 00056 00057 void OnboardCellularInterface::modem_power_down() 00058 { 00059 ::onboard_modem_power_down(); 00060 } 00061 #endif 00062 00063 00064 #endif // CELLULAR_DEVICE 00065 00066 #ifdef ONBOARD_CELLULAR_INTERFACE_AVAILABLE 00067 MBED_WEAK CellularBase *CellularBase::get_target_default_instance() 00068 { 00069 static OnboardCellularInterface cellular; 00070 00071 return &cellular; 00072 } 00073 #else 00074 MBED_WEAK CellularBase *CellularBase::get_target_default_instance() 00075 { 00076 return NULL; 00077 } 00078 #endif
Generated on Tue Jul 12 2022 15:15:55 by
