Macros | Functions | Variables
rs_comm.cpp File Reference
#include <sys/ioctl.h>
#include <fcntl.h>
#include <termios.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <leptrino/rs_comm.h>
Include dependency graph for rs_comm.cpp:

Go to the source code of this file.

Macros

#define MAX_BUFF   10
 
#define MAX_LENGTH   255
 
#define STS_DATA   2
 
#define STS_IDLE   0
 
#define STS_WAIT_BCC   4
 
#define STS_WAIT_ETX   3
 
#define STS_WAIT_STX   1
 

Functions

int Comm_CheckRcv ()
 
void Comm_Close ()
 
int Comm_GetRcvData (UCHAR *buff)
 
int Comm_Open (const char *dev)
 
void Comm_Rcv (void)
 
int Comm_SendData (UCHAR *buff, int l)
 
void Comm_Setup (long baud, int parity, int bitlen, int rts, int dtr, char code)
 

Variables

static int Comm_RcvF = 0
 
static UCHAR delim
 
static int fd = 0
 
static int p_rd = 0
 
static int p_wr = 0
 
unsigned char rbuff [MAX_LENGTH]
 
static UCHAR rcv_buff [MAX_BUFF][MAX_LENGTH]
 
static int rcv_n = 0
 
static UCHAR stmp [MAX_LENGTH]
 
struct termios tio
 
unsigned char ucBCC
 

Macro Definition Documentation

#define MAX_BUFF   10

Definition at line 19 of file rs_comm.cpp.

#define MAX_LENGTH   255

Definition at line 20 of file rs_comm.cpp.

#define STS_DATA   2

Definition at line 24 of file rs_comm.cpp.

#define STS_IDLE   0

Definition at line 22 of file rs_comm.cpp.

#define STS_WAIT_BCC   4

Definition at line 26 of file rs_comm.cpp.

#define STS_WAIT_ETX   3

Definition at line 25 of file rs_comm.cpp.

#define STS_WAIT_STX   1

Definition at line 23 of file rs_comm.cpp.

Function Documentation

int Comm_CheckRcv ( void  )

Definition at line 233 of file rs_comm.cpp.

void Comm_Close ( void  )

Definition at line 66 of file rs_comm.cpp.

int Comm_GetRcvData ( UCHAR buff)

Definition at line 210 of file rs_comm.cpp.

int Comm_Open ( const char *  dev)

Definition at line 45 of file rs_comm.cpp.

void Comm_Rcv ( void  )

Definition at line 246 of file rs_comm.cpp.

int Comm_SendData ( UCHAR buff,
int  l 
)

Definition at line 192 of file rs_comm.cpp.

void Comm_Setup ( long  baud,
int  parity,
int  bitlen,
int  rts,
int  dtr,
char  code 
)

Definition at line 87 of file rs_comm.cpp.

Variable Documentation

int Comm_RcvF = 0
static

Definition at line 28 of file rs_comm.cpp.

UCHAR delim
static

Definition at line 33 of file rs_comm.cpp.

int fd = 0
static

Definition at line 30 of file rs_comm.cpp.

int p_rd = 0
static

Definition at line 29 of file rs_comm.cpp.

int p_wr = 0
static

Definition at line 29 of file rs_comm.cpp.

unsigned char rbuff[MAX_LENGTH]

Definition at line 244 of file rs_comm.cpp.

UCHAR rcv_buff[MAX_BUFF][MAX_LENGTH]
static

Definition at line 34 of file rs_comm.cpp.

int rcv_n = 0
static

Definition at line 31 of file rs_comm.cpp.

UCHAR stmp[MAX_LENGTH]
static

Definition at line 35 of file rs_comm.cpp.

struct termios tio

Definition at line 37 of file rs_comm.cpp.

unsigned char ucBCC

Definition at line 245 of file rs_comm.cpp.



leptrino_force_torque
Author(s):
autogenerated on Sun Oct 6 2019 03:45:38