fp@104: /****************************************************************************** fp@104: * fp@195: * EtherCAT interface for EtherCAT device drivers. fp@104: * fp@195: * $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@191: int ecdev_start(unsigned int master_index); fp@191: void ecdev_stop(unsigned int master_index); fp@191: fp@104: /*****************************************************************************/ fp@104: // Device methods fp@104: 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