Sensorian  1.0
C API Reference Guide Library
Serial.c File Reference

Serial port driver. More...

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdarg.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "Serial.h"

Go to the source code of this file.

Functions

int SerialOpen (int baud)
 Open and initialise the serial port with a specific baud rate. More...
 
void SerialFlush (int fd)
 Flush the serial buffers (both tx & rx) More...
 
void SerialClose (int fd)
 Closes the serial port characterized by device number fd. More...
 
void SerialPutchar (int fd, unsigned char c)
 Send a single character to the serial port. More...
 
void SerialPuts (int fd, char *s)
 Send a string to the serial port. More...
 
void SerialPrintf (int fd, char const *message,...)
 Printf over Serial Port. More...
 
int SerialDataAvail (int fd)
 Return the number of bytes of data avalable to be read from the serial port. More...
 
int SerialGetchar (int fd)
 Get a single character from the serial device. Note: Zero is a valid character and this function will time-out after 10 seconds. More...
 

Detailed Description

Serial port driver.

Author
D.Qendri
Date
15 Aug 2014

Definition in file Serial.c.