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.
UARTCellularInterface.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 #include "UARTCellularInterface.h" 00016 00017 00018 #if NSAPI_PPP_AVAILABLE 00019 00020 UARTCellularInterface::UARTCellularInterface(PinName txd, PinName rxd, PinName dcd, PinName rts, PinName cts, PinName ri, 00021 PinName dtr, PinName dsr, int baud, bool active_high, bool debug) : 00022 PPPCellularInterface(&_serial, debug), 00023 _serial(txd, rxd, baud) 00024 { 00025 _dcd_pin = dcd; 00026 _active_high = active_high; 00027 } 00028 00029 UARTCellularInterface::~UARTCellularInterface() 00030 { 00031 //do nothing 00032 } 00033 00034 void UARTCellularInterface::enable_hup(bool enable) 00035 { 00036 _serial.set_data_carrier_detect(enable ? _dcd_pin : NC, _active_high); 00037 } 00038 00039 #endif // NSAPI_PPP_AVAILABLE
Generated on Tue Jul 12 2022 14:25:06 by
