mbed-drivers
RawSerial.h
1 /*
2  * Copyright (c) 2006-2016, ARM Limited, All Rights Reserved
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License"); you may
6  * not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifndef MBED_RAW_SERIAL_H
18 #define MBED_RAW_SERIAL_H
19 
20 #include "platform.h"
21 
22 #if DEVICE_SERIAL
23 
24 #include "SerialBase.h"
25 #include "serial_api.h"
26 
27 namespace mbed {
28 
49 class RawSerial: public SerialBase {
50 
51 public:
60  RawSerial(PinName tx, PinName rx);
61 
68  int putc(int c);
69 
74  int getc();
75 
82  int puts(const char *str);
83 
84  int printf(const char *format, ...);
85 };
86 
87 } // namespace mbed
88 
89 #endif
90 
91 #endif
int getc()
Definition: RawSerial.cpp:30
int puts(const char *str)
Definition: RawSerial.cpp:38
Definition: RawSerial.h:49
int putc(int c)
Definition: RawSerial.cpp:34
void format(int bits=8, Parity parity=SerialBase::None, int stop_bits=1)
Definition: SerialBase.cpp:40
RawSerial(PinName tx, PinName rx)
Definition: RawSerial.cpp:27
Definition: SerialBase.h:39
Definition: BusIn.cpp:19