Functions
amtec_io.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <termios.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <linux/serial.h>
#include "amtec_io.h"
Include dependency graph for amtec_io.c:

Go to the source code of this file.

Functions

int amtecDeviceConnectPort (amtec_powercube_device_p dev)
void amtecDeviceSetBaudrate (amtec_powercube_device_p dev, int baud_rate)
void amtecDeviceSetParams (amtec_powercube_device_p dev)
int amtecGetAnswer (amtec_powercube_device_p dev, unsigned char *cmd, int *len)
int amtecSendCommand (amtec_powercube_device_p dev, int id, unsigned char *cmd, int len)
long bytesWaiting (int sd)
void convertBuffer (unsigned char *cmd, int *len)
int getAttrBaudRate (int baud_rate)
int getAttrBitsPerByte (size_t bits_per_byte)
int getAttrFlowControl (int flowcontrol)
int getAttrParity (enum PARITY_TYPE par)
int getAttrParityType (enum PARITY_TYPE par)
int getAttrStopBits (int stop_bits)
int getAttrSWFlowControl (int flowcontrol)
int waitForAnswer (int fd, unsigned char *buf, int *len)
int waitForETX (int fd, unsigned char *buf, int *len)
int writeData (int fd, unsigned char *buf, int nChars)

Function Documentation

Definition at line 214 of file amtec_io.c.

void amtecDeviceSetBaudrate ( amtec_powercube_device_p  dev,
int  baud_rate 
)

Definition at line 201 of file amtec_io.c.

Definition at line 176 of file amtec_io.c.

int amtecGetAnswer ( amtec_powercube_device_p  dev,
unsigned char *  cmd,
int *  len 
)

Definition at line 430 of file amtec_io.c.

int amtecSendCommand ( amtec_powercube_device_p  dev,
int  id,
unsigned char *  cmd,
int  len 
)

Definition at line 307 of file amtec_io.c.

long bytesWaiting ( int  sd)

Definition at line 167 of file amtec_io.c.

void convertBuffer ( unsigned char *  cmd,
int *  len 
)

Definition at line 398 of file amtec_io.c.

int getAttrBaudRate ( int  baud_rate)

Definition at line 138 of file amtec_io.c.

int getAttrBitsPerByte ( size_t  bits_per_byte)

Definition at line 81 of file amtec_io.c.

int getAttrFlowControl ( int  flowcontrol)

Definition at line 109 of file amtec_io.c.

int getAttrParity ( enum PARITY_TYPE  par)

Definition at line 57 of file amtec_io.c.

int getAttrParityType ( enum PARITY_TYPE  par)

Definition at line 121 of file amtec_io.c.

int getAttrStopBits ( int  stop_bits)

Definition at line 97 of file amtec_io.c.

int getAttrSWFlowControl ( int  flowcontrol)

Definition at line 69 of file amtec_io.c.

int waitForAnswer ( int  fd,
unsigned char *  buf,
int *  len 
)

Definition at line 264 of file amtec_io.c.

int waitForETX ( int  fd,
unsigned char *  buf,
int *  len 
)

Definition at line 228 of file amtec_io.c.

int writeData ( int  fd,
unsigned char *  buf,
int  nChars 
)

Definition at line 291 of file amtec_io.c.



amtec
Author(s): Charles DuHadway, Benjamin Pitzer (Maintained by Benjamin Pitzer)
autogenerated on Mon Oct 6 2014 10:10:36