fp@104: /****************************************************************************** fp@104: * fp@104: * Oeffentliche EtherCAT-Schnittstellen fuer EtherCAT-Geraetetreiber. fp@104: * fp@104: * $Id$ fp@104: * fp@104: *****************************************************************************/ fp@104: fp@104: #ifndef _ETHERCAT_DEVICE_H_ fp@104: #define _ETHERCAT_DEVICE_H_ fp@104: fp@104: #include fp@104: fp@104: /*****************************************************************************/ fp@104: fp@104: struct ec_device; fp@104: typedef struct ec_device ec_device_t; fp@104: fp@104: typedef irqreturn_t (*ec_isr_t)(int, void *, struct pt_regs *); fp@104: fp@104: /*****************************************************************************/ fp@104: // Registration functions fp@104: fp@104: ec_device_t *ecdev_register(unsigned int master_index, fp@104: struct net_device *net_dev, ec_isr_t isr, fp@104: struct module *module); fp@104: void ecdev_unregister(unsigned int master_index, ec_device_t *device); fp@104: fp@104: /*****************************************************************************/ fp@104: // Device methods fp@104: fp@104: int ecdev_is_ec(const ec_device_t *device, const struct net_device *net_dev); fp@104: void ecdev_receive(ec_device_t *device, const void *data, size_t size); fp@104: void ecdev_link_state(ec_device_t *device, uint8_t newstate); fp@104: fp@104: /*****************************************************************************/ fp@104: fp@104: #endif