ecdev.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  *  $Id: ecdev.h 452 2006-06-26 16:07:07Z fp $
00004  *
00005  *  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
00006  *
00007  *  This file is part of the IgH EtherCAT Master.
00008  *
00009  *  The IgH EtherCAT Master is free software; you can redistribute it
00010  *  and/or modify it under the terms of the GNU General Public License
00011  *  as published by the Free Software Foundation; either version 2 of the
00012  *  License, or (at your option) any later version.
00013  *
00014  *  The IgH EtherCAT Master is distributed in the hope that it will be
00015  *  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *  GNU General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with the IgH EtherCAT Master; if not, write to the Free Software
00021  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00022  *
00023  *  The right to use EtherCAT Technology is granted and comes free of
00024  *  charge under condition of compatibility of product made by
00025  *  Licensee. People intending to distribute/sell products based on the
00026  *  code, have to sign an agreement to guarantee that products using
00027  *  software based on IgH EtherCAT master stay compatible with the actual
00028  *  EtherCAT specification (which are released themselves as an open
00029  *  standard) as the (only) precondition to have the right to use EtherCAT
00030  *  Technology, IP and trade marks.
00031  *
00032  *****************************************************************************/
00033 
00048 /*****************************************************************************/
00049 
00050 #ifndef _ETHERCAT_DEVICE_H_
00051 #define _ETHERCAT_DEVICE_H_
00052 
00053 #include <linux/netdevice.h>
00054 
00055 /*****************************************************************************/
00056 
00057 struct ec_device;
00058 typedef struct ec_device ec_device_t; 
00064 typedef irqreturn_t (*ec_isr_t)(int, void *, struct pt_regs *);
00065 
00066 /*****************************************************************************/
00067 // Registration functions
00068 
00069 ec_device_t *ecdev_register(unsigned int master_index,
00070                             struct net_device *net_dev, ec_isr_t isr,
00071                             struct module *module);
00072 void ecdev_unregister(unsigned int master_index, ec_device_t *device);
00073 
00074 int ecdev_start(unsigned int master_index);
00075 void ecdev_stop(unsigned int master_index);
00076 
00077 /*****************************************************************************/
00078 // Device methods
00079 
00080 void ecdev_receive(ec_device_t *device, const void *data, size_t size);
00081 void ecdev_link_state(ec_device_t *device, uint8_t newstate);
00082 
00083 /*****************************************************************************/
00084 
00085 #endif

Generated on Wed Aug 2 18:41:43 2006 for IgH EtherCAT master by  doxygen 1.4.6