Main Page | Data Structures | File List | Data Fields | Globals

cctalk-driver.c File Reference


Detailed Description

cctalk driver code cctalk driver code

Author:
Rod Boyce
Date:
18/10/04
This module is the driver for the axis cctalk component. This driver will look after the communication over the serial port. The serial port will be opened in 9600 baud 8 data bits and one start and stop bit. This module does no checking on the data passing through it.

Date:
18/10/04

#include <termios.h>
#include <sys/ioctl.h>
#include <asm/ioctls.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include "cctalk-channel-defs.h"
#include "cctalk-operations.h"
#include "cctalk-driver.h"

Include dependency graph for cctalk-driver.c:

Include dependency graph

Defines

#define _POSIX_SOURCE   1 /* POSIX compliant source */
#define BSLOW   B4800
#define BNORMAL   B9600

Functions

unsigned char cct_DrvInitialise (tsCCT_COMM_HANDLER *psCctComms, teCCTALK_SPEED eCctSpd)
 Initialise.

void cct_DrvClose (tsCCT_COMM_HANDLER *psCctComms)
 Close port.

int cct_PerformCctalkOperation (tsCCT_COMM_HANDLER *psCctComms, tsCCTALK_OPERATION *psCctalkOp)
 Perform a cctalk operation on the cctalk bus.


Function Documentation

cct_DrvClose tsCCT_COMM_HANDLER psCctComms  ) 
 

Close port.

Must be called when closing the cctalk comms channel. This closes the file handle and restores the terminal settings

Date:
12/10/04
Author:
Rod Boyce
Parameters:
psCctComms - Pointer to the comm handler struct that stores the parameters for this tty
Returns:
Nothing

cct_DrvInitialise tsCCT_COMM_HANDLER psCctComms,
teCCTALK_SPEED  eCctSpd
 

Initialise.

Initialise the cctalk serial port.

Date:
12/10/04
Author:
Rod Boyce
Parameters:
psCctComms - Pointer to the comm handler struct that stores the parameters for this tty
eCctSpd - the speed to set the com port to.
Returns:
TRUE on sucess and FALSE if an error occured

History

cct_PerformCctalkOperation tsCCT_COMM_HANDLER psCctComms,
tsCCTALK_OPERATION psCctalkOp
 

Perform a cctalk operation on the cctalk bus.

This function is called to perform a cctalk operation over a tty that has been configured for cctalk communication.

Date:
12/10/04
Author:
Rod Boyce
Parameters:
psCctComms - Pointer to the comm handler struct that stores the parameters for this tty
psCctalkOp - A pointer to a cctalk operation structure
Returns:
> 0 on success and 0 or < 0 on failure FIXME: this needs work

History


Generated on Thu Jan 20 16:11:59 2005 for Axis cctalk sub-system by doxygen 1.3.6