module.c File Reference


Detailed Description

EtherCAT master driver module.

Definition in file module.c.

Go to the source code of this file.

Defines

#define COMPILE_INFO
 Compile version info.

Functions

int __init ec_init_module (void)
 Module initialization.
void __exit ec_cleanup_module (void)
 Module cleanup.
ec_master_tec_find_master (unsigned int master_index)
 Gets a handle to a certain master.
void ec_print_data (const uint8_t *data, size_t size)
 Outputs frame contents for debugging purposes.
void ec_print_data_diff (const uint8_t *d1, const uint8_t *d2, size_t size)
 Outputs frame contents and differences for debugging purposes.
size_t ec_state_string (uint8_t states, char *buffer)
 Prints slave states in clear text.
ec_device_tecdev_register (unsigned int master_index, struct net_device *net_dev, ec_isr_t isr, struct module *module)
 Connects an EtherCAT device to a certain master.
void ecdev_unregister (unsigned int master_index, ec_device_t *device)
 Disconnect an EtherCAT device from the master.
int ecdev_start (unsigned int master_index)
 Starts the master associated with the device.
void ecdev_stop (unsigned int master_index)
 Stops the master associated with the device.
ec_master_tecrt_request_master (unsigned int master_index)
 Reserves an EtherCAT master for realtime operation.
void ecrt_release_master (ec_master_t *master)
 Releases a reserved EtherCAT master.

Variables

static int ec_master_count = 1
 parameter value, number of masters
static int ec_eoeif_count = 0
 parameter value, number of EoE interf.
static struct list_head ec_masters
 list of masters


Define Documentation

#define COMPILE_INFO
 

Value:

EC_STR(EC_MASTER_VERSION_MAIN) \
                     "." EC_STR(EC_MASTER_VERSION_SUB) \
                     " (" EC_MASTER_VERSION_EXTRA ")" \
                     " - rev. " EC_STR(SVNREV) \
                     ", compiled by " EC_STR(USER) \
                     " at " __DATE__ " " __TIME__
Compile version info.

Definition at line 60 of file module.c.


Function Documentation

int __init ec_init_module void   ) 
 

Module initialization.

Initializes ec_master_count masters.

Returns:
0 on success, else < 0

Definition at line 97 of file module.c.

void __exit ec_cleanup_module void   ) 
 

Module cleanup.

Clears all master instances.

Definition at line 152 of file module.c.

ec_master_t* ec_find_master unsigned int  master_index  ) 
 

Gets a handle to a certain master.

Returns:
pointer to master
Parameters:
master_index  master index

Definition at line 174 of file module.c.

void ec_print_data const uint8_t *  data,
size_t  size
 

Outputs frame contents for debugging purposes.

Parameters:
data  pointer to data
size  number of bytes to output

Definition at line 192 of file module.c.

void ec_print_data_diff const uint8_t *  d1,
const uint8_t *  d2,
size_t  size
 

Outputs frame contents and differences for debugging purposes.

Parameters:
d1  first data
d2  second data
size  number of bytes to output

Definition at line 215 of file module.c.

size_t ec_state_string uint8_t  states,
char *  buffer
 

Prints slave states in clear text.

Parameters:
states  slave states
buffer  target buffer (min. 25 bytes)

Definition at line 240 of file module.c.


Generated on Fri Sep 1 14:56:57 2006 for IgH EtherCAT master by  doxygen 1.4.6