FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
fb_serial.h
Go to the documentation of this file.
1
typedef
enum
_FB_SERIAL_PARITY
{
2
FB_SERIAL_PARITY_NONE
,
3
FB_SERIAL_PARITY_EVEN
,
4
FB_SERIAL_PARITY_ODD
,
5
FB_SERIAL_PARITY_SPACE
,
6
FB_SERIAL_PARITY_MARK
7
}
FB_SERIAL_PARITY
;
8
9
typedef
enum
_FB_SERIAL_STOP_BITS
{
10
FB_SERIAL_STOP_BITS_1
,
11
FB_SERIAL_STOP_BITS_1_5
,
12
FB_SERIAL_STOP_BITS_2
13
}
FB_SERIAL_STOP_BITS
;
14
15
typedef
struct
_FB_SERIAL_OPTIONS
{
16
unsigned
uiSpeed
;
17
unsigned
uiDataBits
;
18
FB_SERIAL_PARITY
Parity
;
19
FB_SERIAL_STOP_BITS
StopBits
;
20
unsigned
DurationCTS
;
/* CS[msec] */
21
unsigned
DurationDSR
;
/* DS[msec] */
22
unsigned
DurationCD
;
/* CD[msec] */
23
unsigned
OpenTimeout
;
/* OP[msec] */
24
int
SuppressRTS
;
/* RS */
25
int
AddLF
;
/* LF, or ASC, or BIN */
26
int
CheckParity
;
/* PE */
27
int
KeepDTREnabled
;
/* DT */
28
int
DiscardOnError
;
/* FE */
29
int
IgnoreAllErrors
;
/* ME */
30
unsigned
IRQNumber
;
/* IR2..IR15 */
31
unsigned
TransmitBuffer
;
/* TBn - a value 0 means: default value */
32
unsigned
ReceiveBuffer
;
/* RBn - a value 0 means: default value */
33
}
FB_SERIAL_OPTIONS
;
34
35
int
fb_DevSerialSetWidth
(
const
char
*pszDevice,
int
width,
int
default_width );
36
int
fb_SerialOpen
(
FB_FILE
*
handle
,
int
iPort,
FB_SERIAL_OPTIONS
*options,
const
char
*pszDevice,
void
**ppvHandle );
37
int
fb_SerialGetRemaining
(
FB_FILE
*
handle
,
void
*pvHandle,
fb_off_t
*pLength );
38
int
fb_SerialWrite
(
FB_FILE
*
handle
,
void
*pvHandle,
const
void
*data,
size_t
length );
39
int
fb_SerialWriteWstr
(
FB_FILE
*
handle
,
void
*pvHandle,
const
FB_WCHAR
*data,
size_t
length );
40
int
fb_SerialRead
(
FB_FILE
*
handle
,
void
*pvHandle,
void
*data,
size_t
*pLength );
41
int
fb_SerialReadWstr
(
FB_FILE
*
handle
,
void
*pvHandle,
FB_WCHAR
*data,
size_t
*pLength );
42
int
fb_SerialClose
(
FB_FILE
*
handle
,
void
*pvHandle );
rtlib
fb_serial.h
Generated on Thu Jan 23 2014 19:40:11 for FreeBASIC by
1.8.4