FreeBASIC  0.91.0
fb_serial.h
Go to the documentation of this file.
1 typedef enum _FB_SERIAL_PARITY {
8 
9 typedef enum _FB_SERIAL_STOP_BITS {
14 
15 typedef struct _FB_SERIAL_OPTIONS {
16  unsigned uiSpeed;
17  unsigned uiDataBits;
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 */
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 );