VCOM Linux Driver
Advantech Inc.
Loading...
Searching...
No Matches
vcom_proto.h File Reference

Go to the source code of this file.

Data Structures

struct  vc_attach_param
 
struct  vc_attach_data
 
struct  vc_attach_uint
 
struct  vc_attach_hflow
 
struct  vc_attach_lctrl
 
struct  vc_proto_hdr
 
struct  vc_proto_packet
 

Macros

#define VCOM_MAGIC   (htonl(0x4d414441))
 
#define vc_pack_size(a)
 
#define vc_ext_size(a)
 
#define pack_att(a, b)
 

Enumerations

enum  VCOM_RESP { STATUS_SUCCESS = 0x00000000 , STATUS_INVALID_PARAMETER = 0xC000000D , STATUS_DEVICE_BUSY = 0x80000011 }
 
enum  VCOM_CMD {
  VCOM_CMD_CREATE = 0x0000 , VCOM_CMD_CLOSE = 0x0002 , VCOM_CMD_WRITE = 0x0004 , VCOM_CMD_IOCTL = 0x000e ,
  VCOM_CMD_CLEANUP = 0x0012 , VCOM_CMD_QUEUEFREE = 0x0900 , VCOM_CMD_DATAREADY = 0x0800 , VCOM_CMD_SHUTDOWN = 0x0010
}
 
enum  VCOM_IOCTL {
  VCOM_IOCTL_SET_BAUD_RATE = 0x01 , VCOM_IOCTL_SET_LINE_CONTROL = 0x03 , VCOM_IOCTL_SET_BREAK_ON = 0x04 , VCOM_IOCTL_SET_BREAK_OFF = 0x05 ,
  VCOM_IOCTL_IMMEDIATE_CHAR = 0x06 , VCOM_IOCTL_SET_TIMEOUTS = 0x07 , VCOM_IOCTL_GET_TIMEOUTS = 0x08 , VCOM_IOCTL_SET_DTR = 0x09 ,
  VCOM_IOCTL_CLR_DTR = 0x0a , VCOM_IOCTL_SET_RTS = 0x0c , VCOM_IOCTL_CLR_RTS = 0x0d , VCOM_IOCTL_SET_XOFF = 0x0e ,
  VCOM_IOCTL_SET_XON = 0x0f , VCOM_IOCTL_GET_WAIT_MASK = 0x10 , VCOM_IOCTL_SET_WAIT_MASK = 0x11 , VCOM_IOCTL_WAIT_ON_MASK = 0x12 ,
  VCOM_IOCTL_PURGE = 0x13 , VCOM_IOCTL_GET_BAUD_RATE = 0x14 , VCOM_IOCTL_GET_LINE_CONTROL = 0x15 , VCOM_IOCTL_GET_CHARS = 0x16 ,
  VCOM_IOCTL_SET_CHARS = 0x17 , VCOM_IOCTL_GET_HANDFLOW = 0x18 , VCOM_IOCTL_SET_HANDFLOW = 0x19 , VCOM_IOCTL_GET_MODEMSTATUS = 0x1a ,
  VCOM_IOCTL_GET_COMMSTATUS = 0x1b , VCOM_IOCTL_GET_PROPERTIES = 0x1d , VCOM_IOCTL_GET_DTRRTS = 0x1e , VCOM_IOCTL_GET_STATS = 0x23 ,
  VCOM_IOCTL_CLEAR_STATS = 0x24
}
 

Functions

struct vc_attach_param __attribute__ ((packed))
 

Variables

unsigned int p1
 
unsigned int p2
 
char ptr [4]
 
unsigned int uint
 
unsigned int chflow
 
unsigned int flowrep
 
unsigned int xonlimit
 
unsigned int xofflimit
 
unsigned char sbit
 
unsigned char pair
 
unsigned char dbit
 
unsigned int pid
 
unsigned int tid
 
unsigned short cmd
 
unsigned short len
 
struct vc_proto_hdr hdr
 
union { 
 
   struct vc_attach_param   param 
 
   struct vc_attach_data   data 
 
   struct vc_attach_uint   uint32 
 
   struct vc_attach_hflow   hflow 
 
   struct vc_attach_lctrl   lctrl 
 
attach 
 
enum VCOM_RESP __attribute__
 

Macro Definition Documentation

◆ pack_att

#define pack_att ( a,
b )
Value:
((a)->attach.b)

◆ vc_ext_size

#define vc_ext_size ( a)
Value:
(sizeof(a) - sizeof(struct vc_attach_param))
Definition vcom_proto.h:3

◆ vc_pack_size

#define vc_pack_size ( a)
Value:
(sizeof(struct vc_proto_hdr) + sizeof(a))
Definition vcom_proto.h:41

◆ VCOM_MAGIC

#define VCOM_MAGIC   (htonl(0x4d414441))

Enumeration Type Documentation

◆ VCOM_CMD

enum VCOM_CMD
Enumerator
VCOM_CMD_CREATE 
VCOM_CMD_CLOSE 
VCOM_CMD_WRITE 
VCOM_CMD_IOCTL 
VCOM_CMD_CLEANUP 
VCOM_CMD_QUEUEFREE 
VCOM_CMD_DATAREADY 
VCOM_CMD_SHUTDOWN 

◆ VCOM_IOCTL

enum VCOM_IOCTL
Enumerator
VCOM_IOCTL_SET_BAUD_RATE 
VCOM_IOCTL_SET_LINE_CONTROL 
VCOM_IOCTL_SET_BREAK_ON 
VCOM_IOCTL_SET_BREAK_OFF 
VCOM_IOCTL_IMMEDIATE_CHAR 
VCOM_IOCTL_SET_TIMEOUTS 
VCOM_IOCTL_GET_TIMEOUTS 
VCOM_IOCTL_SET_DTR 
VCOM_IOCTL_CLR_DTR 
VCOM_IOCTL_SET_RTS 
VCOM_IOCTL_CLR_RTS 
VCOM_IOCTL_SET_XOFF 
VCOM_IOCTL_SET_XON 
VCOM_IOCTL_GET_WAIT_MASK 
VCOM_IOCTL_SET_WAIT_MASK 
VCOM_IOCTL_WAIT_ON_MASK 
VCOM_IOCTL_PURGE 
VCOM_IOCTL_GET_BAUD_RATE 
VCOM_IOCTL_GET_LINE_CONTROL 
VCOM_IOCTL_GET_CHARS 
VCOM_IOCTL_SET_CHARS 
VCOM_IOCTL_GET_HANDFLOW 
VCOM_IOCTL_SET_HANDFLOW 
VCOM_IOCTL_GET_MODEMSTATUS 
VCOM_IOCTL_GET_COMMSTATUS 
VCOM_IOCTL_GET_PROPERTIES 
VCOM_IOCTL_GET_DTRRTS 
VCOM_IOCTL_GET_STATS 
VCOM_IOCTL_CLEAR_STATS 

◆ VCOM_RESP

enum VCOM_RESP
Enumerator
STATUS_SUCCESS 
STATUS_INVALID_PARAMETER 
STATUS_DEVICE_BUSY 

Function Documentation

◆ __attribute__()

struct vc_attach_param __attribute__ ( (packed) )

Variable Documentation

◆ __attribute__

struct vc_proto_packet __attribute__

◆ [union]

union { ... } attach

◆ chflow

unsigned int chflow

◆ cmd

unsigned short cmd

◆ data

struct vc_attach_data data

◆ dbit

unsigned char dbit

◆ flowrep

unsigned int flowrep

◆ hdr

struct vc_proto_hdr hdr

◆ hflow

struct vc_attach_hflow hflow

◆ lctrl

struct vc_attach_lctrl lctrl

◆ len

unsigned short len

◆ p1

unsigned int p1

◆ p2

unsigned int p2

◆ pair

unsigned char pair

◆ param

struct vc_attach_param param

◆ pid

unsigned int pid

◆ ptr

char ptr[4]

◆ sbit

unsigned char sbit

◆ tid

unsigned int tid

◆ uint

unsigned int uint

◆ uint32

struct vc_attach_uint uint32

◆ xofflimit

unsigned int xofflimit

◆ xonlimit

unsigned int xonlimit