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.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 UART_CELLULAR_INTERFACE_ 00017 #define UART_CELLULAR_INTERFACE_ 00018 00019 #include "PPPCellularInterface.h" 00020 #include "UARTSerial.h" 00021 00022 #if NSAPI_PPP_AVAILABLE 00023 00024 /** UARTCellularInterface class 00025 * 00026 * This interface serves as the controller/driver for Cellular 00027 * modems attached via a UART (tested with UBLOX_C027 and MTS_DRAGONFLY_F411RE). 00028 * 00029 * It constructs a FileHandle and passes it back to its base class as well as overrides 00030 * enable_hup() in the base class. 00031 */ 00032 class UARTCellularInterface : public PPPCellularInterface { 00033 00034 public: 00035 00036 UARTCellularInterface(PinName tx, PinName rx, PinName dcd = NC, PinName rts = NC, PinName cts = NC, PinName ri = NC, 00037 PinName dtr = NC, PinName dsr = NC, int baud = MBED_CONF_PPP_CELL_IFACE_BAUD_RATE, 00038 bool active_high = false, 00039 bool debug = false); 00040 00041 virtual ~UARTCellularInterface(); 00042 00043 private: 00044 UARTSerial _serial; 00045 PinName _dcd_pin; 00046 bool _active_high; 00047 00048 protected: 00049 /** Enable or disable hang-up detection 00050 * 00051 * When in PPP data pump mode, it is helpful if the FileHandle will signal hang-up via 00052 * POLLHUP, e.g., if the DCD line is deasserted on a UART. During command mode, this 00053 * signaling is not desired. enable_hup() controls whether this function should be 00054 * active. 00055 */ 00056 virtual void enable_hup(bool enable); 00057 }; 00058 00059 #endif //NSAPI_PPP_AVAILABLE 00060 00061 #endif //UART_CELLULAR_INTERFACE_
Generated on Tue Jul 12 2022 13:31:47 by
