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

eight.c File Reference

#include <config.h>
#include <cartcomm/cframe.h>
#include <drivers/drivers.h>

Include dependency graph for eight.c:

Include dependency graph

Go to the source code of this file.

Functions

void * driver_eight_alloc (void)
 Construct a driver.
void driver_eight_free (void *data)
 Deconstruct the driver.
int driver_eight (cframe_t *cf, void *data)
 Drive the cart.


Function Documentation

int driver_eight cframe_t cframe,
void *  data
 

Drive the cart.

The driver is responsible for taking in the values the cframe and updating the cframe for transmission back to the cart. The process of updating is loosely called "driving".

Parameters:
cframe current communication frame from the cart
data private state information (obtained from driver_alloc())
Return values:
0 successful and unfinished
1 successful and finished
otherwise error

Definition at line 14 of file eight.c.

References cframe_t.

void* driver_eight_alloc void   ) 
 

Construct a driver.

The driver usually will allocat some kind of data structure which maintains the state of the driver between calls to driver(). The driver can perform any other initialization needed during this call.

Returns:
private state information
See also:
driver_free()

Definition at line 6 of file eight.c.

void driver_eight_free void *  data  ) 
 

Deconstruct the driver.

Free any memory and clean up any other resources held by the driver.

Parameters:
data private state information (obtained from driver_alloc())

Definition at line 10 of file eight.c.


Generated on Thu Sep 6 13:13:18 2007 for driver by  doxygen 1.3.9.1