devices/ecdev.h
changeset 533 acdd1f9ef7ab
parent 498 fbf44b0d6b54
child 573 cdee4ea90ce9
equal deleted inserted replaced
532:092ac0fa23fe 533:acdd1f9ef7ab
    56 
    56 
    57 struct ec_device;
    57 struct ec_device;
    58 typedef struct ec_device ec_device_t; /**< \see ec_device */
    58 typedef struct ec_device ec_device_t; /**< \see ec_device */
    59 
    59 
    60 /**
    60 /**
    61    Interrupt-Service-Routine Type
    61    Device poll function type.
    62 */
    62 */
    63 
    63 
    64 typedef irqreturn_t (*ec_isr_t)(int, void *, struct pt_regs *);
    64 typedef void (*ec_pollfunc_t)(struct net_device *);
    65 
    65 
    66 /*****************************************************************************/
    66 /*****************************************************************************/
    67 // Registration functions
    67 // Registration functions
    68 
    68 
    69 ec_device_t *ecdev_register(unsigned int master_index,
    69 ec_device_t *ecdev_register(unsigned int master_index,
    70                             struct net_device *net_dev, ec_isr_t isr,
    70                             struct net_device *net_dev, ec_pollfunc_t poll,
    71                             struct module *module);
    71                             struct module *module);
    72 void ecdev_unregister(unsigned int master_index, ec_device_t *device);
    72 void ecdev_unregister(unsigned int master_index, ec_device_t *device);
    73 
    73 
    74 /*****************************************************************************/
    74 /*****************************************************************************/
    75 // Device methods
    75 // Device methods