devices/ecdev.h
changeset 104 052bc82d5442
child 191 ca805255a935
equal deleted inserted replaced
103:d2a8adde27c4 104:052bc82d5442
       
     1 /******************************************************************************
       
     2  *
       
     3  * Oeffentliche EtherCAT-Schnittstellen fuer EtherCAT-Geraetetreiber.
       
     4  *
       
     5  * $Id$
       
     6  *
       
     7  *****************************************************************************/
       
     8 
       
     9 #ifndef _ETHERCAT_DEVICE_H_
       
    10 #define _ETHERCAT_DEVICE_H_
       
    11 
       
    12 #include <linux/netdevice.h>
       
    13 
       
    14 /*****************************************************************************/
       
    15 
       
    16 struct ec_device;
       
    17 typedef struct ec_device ec_device_t;
       
    18 
       
    19 typedef irqreturn_t (*ec_isr_t)(int, void *, struct pt_regs *);
       
    20 
       
    21 /*****************************************************************************/
       
    22 // Registration functions
       
    23 
       
    24 ec_device_t *ecdev_register(unsigned int master_index,
       
    25                             struct net_device *net_dev, ec_isr_t isr,
       
    26                             struct module *module);
       
    27 void ecdev_unregister(unsigned int master_index, ec_device_t *device);
       
    28 
       
    29 /*****************************************************************************/
       
    30 // Device methods
       
    31 
       
    32 int ecdev_is_ec(const ec_device_t *device, const struct net_device *net_dev);
       
    33 void ecdev_receive(ec_device_t *device, const void *data, size_t size);
       
    34 void ecdev_link_state(ec_device_t *device, uint8_t newstate);
       
    35 
       
    36 /*****************************************************************************/
       
    37 
       
    38 #endif