Sensorian  1.0
C API Reference Guide Library
Serial.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (C) 2015 Sensorian
3  * *
4  * This file is part of Sensorian. *
5  * *
6  * Sensorian is free software: you can redistribute it and/or modify it *
7  * under the terms of the GNU Lesser General Public License as published *
8  * by the Free Software Foundation, either version 3 of the License, or *
9  * (at your option) any later version. *
10  * *
11  * Sensorian is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with Sensorian. *
18  * If not, see <http://www.gnu.org/licenses/>. *
19  ****************************************************************************/
20 
29 #ifndef __SERIAL_H__
30 #define __SERIAL_H__
31 
32 int SerialOpen (int baud) ;
33 void SerialClose (int fd) ;
34 void SerialFlush (int fd) ;
35 void SerialPutchar (int fd,unsigned char c) ;
36 void SerialPuts (int fd,char *s) ;
37 void SerialPrintf (int fd,char const *message, ...) ;
38 int SerialDataAvail (int fd) ;
39 int SerialGetchar (int fd) ;
40 
41 
42 #endif
void SerialPuts(int fd, char *s)
Send a string to the serial port.
Definition: Serial.c:157
int SerialOpen(int baud)
Open and initialise the serial port with a specific baud rate.
Definition: Serial.c:51
void SerialClose(int fd)
Closes the serial port characterized by device number fd.
Definition: Serial.c:135
void SerialPrintf(int fd, char const *message,...)
Printf over Serial Port.
Definition: Serial.c:168
void SerialPutchar(int fd, unsigned char c)
Send a single character to the serial port.
Definition: Serial.c:146
int SerialDataAvail(int fd)
Return the number of bytes of data avalable to be read from the serial port.
Definition: Serial.c:185
int SerialGetchar(int fd)
Get a single character from the serial device. Note: Zero is a valid character and this function will...
Definition: Serial.c:201
void SerialFlush(int fd)
Flush the serial buffers (both tx & rx)
Definition: Serial.c:125