3 * Copyright 2019 AT&T Intellectual Property
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 // arduino-serial-lib -- simple library for reading/writing serial ports
23 // 2006-2013, Tod E. Kurt, http://todbot.com/blog/
27 #ifndef __ARDUINO_SERIAL_LIB_H__
28 #define __ARDUINO_SERIAL_LIB_H__
30 #include <stdint.h> // Standard types
32 int serialport_init(const char* serialport, int baud);
33 int serialport_close(int fd);
34 int serialport_writebyte( int fd, uint8_t b);
35 int serialport_write(int fd, const char* str);
36 int serialport_read_until(int fd, char* buf, char until, int buf_max,int timeout);
37 int serialport_flush(int fd);