FreeBASIC  0.91.0
io_serial.c File Reference
#include "../fb.h"
#include <sys/ioctl.h>
#include <sys/select.h>
#include <signal.h>
#include <fcntl.h>
Include dependency graph for io_serial.c:

Go to the source code of this file.

Data Structures

struct  _LINUX_SERIAL_INFO
 

Macros

#define BUFFERSIZE   BUFSIZ*16
 
#define ENDSPD   111111
 
#define BADSPEED   999999
 
#define SERIAL_TIMEOUT   3 /* seconds for write on open*/
 
#define SREAD_TIMEOUT   70 /* if not receive any character in less 50 millisecs finish read process */
 

Typedefs

typedef struct _LINUX_SERIAL_INFO LINUX_SERIAL_INFO
 

Functions

static void alrm ()
 
static speed_t get_speed (int speed)
 
int fb_SerialOpen (FB_FILE *handle, int iPort, FB_SERIAL_OPTIONS *options, const char *pszDevice, void **ppvHandle)
 
int fb_SerialGetRemaining (FB_FILE *handle, void *pvHandle, fb_off_t *pLength)
 
int fb_SerialWrite (FB_FILE *handle, void *pvHandle, const void *data, size_t length)
 
int fb_SerialRead (FB_FILE *handle, void *pvHandle, void *data, size_t *pLength)
 
int fb_SerialClose (FB_FILE *handle, void *pvHandle)
 

Macro Definition Documentation

#define BADSPEED   999999

Definition at line 19 of file io_serial.c.

#define BUFFERSIZE   BUFSIZ*16

Definition at line 17 of file io_serial.c.

#define ENDSPD   111111

Definition at line 18 of file io_serial.c.

#define SERIAL_TIMEOUT   3 /* seconds for write on open*/

Definition at line 20 of file io_serial.c.

#define SREAD_TIMEOUT   70 /* if not receive any character in less 50 millisecs finish read process */

Definition at line 21 of file io_serial.c.

Typedef Documentation

Function Documentation

static void alrm ( )
static

Definition at line 34 of file io_serial.c.

Here is the caller graph for this function:

int fb_SerialClose ( FB_FILE handle,
void *  pvHandle 
)

Definition at line 457 of file io_serial.c.

Here is the call graph for this function:

int fb_SerialGetRemaining ( FB_FILE handle,
void *  pvHandle,
fb_off_t pLength 
)

Definition at line 385 of file io_serial.c.

Here is the call graph for this function:

int fb_SerialOpen ( FB_FILE handle,
int  iPort,
FB_SERIAL_OPTIONS options,
const char *  pszDevice,
void **  ppvHandle 
)

Definition at line 101 of file io_serial.c.

Here is the call graph for this function:

int fb_SerialRead ( FB_FILE handle,
void *  pvHandle,
void *  data,
size_t *  pLength 
)

Definition at line 427 of file io_serial.c.

Here is the call graph for this function:

int fb_SerialWrite ( FB_FILE handle,
void *  pvHandle,
const void *  data,
size_t  length 
)

Definition at line 402 of file io_serial.c.

Here is the call graph for this function:

static speed_t get_speed ( int  speed)
static

Definition at line 39 of file io_serial.c.

Here is the caller graph for this function: