WPILib 2012
WPILibRoboticsLibraryforFRC
CInterfaces/CSerialPort.h
00001 /*----------------------------------------------------------------------------*/
00002 /* Copyright (c) FIRST 2008. All Rights Reserved.                                                         */
00003 /* Open Source Software - may be modified and shared by FRC teams. The code   */
00004 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib.  */
00005 /*----------------------------------------------------------------------------*/
00006 #ifndef _SERIALPORT_H
00007 #define _SERIALPORT_H
00008 
00009 #include "SerialPort.h"
00010 
00011 void OpenSerialPort(UINT32 baudRate, UINT8 dataBits, SerialPort::Parity parity, SerialPort::StopBits stopBits);
00012 void SetSerialFlowControl(SerialPort::FlowControl flowControl);
00013 void EnableSerialTermination(char terminator);
00014 void DisableSerialTermination();
00015 INT32 GetSerialBytesReceived();
00016 void PrintfSerial(const char *writeFmt, ...);
00017 void ScanfSerial(const char *readFmt, ...);
00018 UINT32 ReadSerialPort(char *buffer, INT32 count);
00019 UINT32 WriteSerialPort(const char *buffer, INT32 count);
00020 void SetSerialTimeout(INT32 timeout_ms);
00021 void SetSerialWriteBufferMode(SerialPort::WriteBufferMode mode);
00022 void FlushSerialPort();
00023 void ResetSerialPort();
00024 
00025 #endif
 All Classes Functions Variables