00001 /****************************************************************************** 00002 * 00003 * $Id$ 00004 * 00005 * Copyright (C) 2006-2008 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 and/or 00010 * modify it under the terms of the GNU General Public License version 2, as 00011 * published by the Free Software Foundation. 00012 * 00013 * The IgH EtherCAT Master is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 00016 * Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License along 00019 * with the IgH EtherCAT Master; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00021 * 00022 * --- 00023 * 00024 * The license mentioned above concerns the source code only. Using the 00025 * EtherCAT technology and brand is only permitted in compliance with the 00026 * industrial property and similar rights of Beckhoff Automation GmbH. 00027 * 00028 *****************************************************************************/ 00029 00043 /*****************************************************************************/ 00044 00045 #ifndef __ECDEV_H__ 00046 #define __ECDEV_H__ 00047 00048 #include <linux/netdevice.h> 00049 00050 /*****************************************************************************/ 00051 00052 struct ec_device; 00053 typedef struct ec_device ec_device_t; 00057 typedef void (*ec_pollfunc_t)(struct net_device *); 00058 00059 /****************************************************************************** 00060 * Offering/withdrawal functions 00061 *****************************************************************************/ 00062 00063 ec_device_t *ecdev_offer(struct net_device *net_dev, ec_pollfunc_t poll, 00064 struct module *module); 00065 void ecdev_withdraw(ec_device_t *device); 00066 00067 /****************************************************************************** 00068 * Device methods 00069 *****************************************************************************/ 00070 00071 int ecdev_open(ec_device_t *device); 00072 void ecdev_close(ec_device_t *device); 00073 void ecdev_receive(ec_device_t *device, const void *data, size_t size); 00074 void ecdev_set_link(ec_device_t *device, uint8_t state); 00075 uint8_t ecdev_get_link(const ec_device_t *device); 00076 00077 /*****************************************************************************/ 00078 00079 #endif
1.5.6