include/EtherCAT_dev.h
changeset 73 9f4ea66d89a3
parent 55 059a9e712aa7
child 78 3d74183d6c6b
equal deleted inserted replaced
72:7c986b717411 73:9f4ea66d89a3
    19 
    19 
    20 /*****************************************************************************/
    20 /*****************************************************************************/
    21 
    21 
    22 typedef enum
    22 typedef enum
    23 {
    23 {
    24   EC_DEVICE_STATE_READY, EC_DEVICE_STATE_SENT, EC_DEVICE_STATE_RECEIVED,
    24   EC_DEVICE_STATE_READY = 0,
    25   EC_DEVICE_STATE_TIMEOUT, EC_DEVICE_STATE_ERROR
    25   EC_DEVICE_STATE_SENT,
       
    26   EC_DEVICE_STATE_RECEIVED,
       
    27   EC_DEVICE_STATE_TIMEOUT,
       
    28   EC_DEVICE_STATE_ERROR
    26 }
    29 }
    27 ec_device_state_t;
    30 ec_device_state_t;
    28 
    31 
    29 /*****************************************************************************/
    32 /*****************************************************************************/
    30 
    33 
    31 ec_device_t *EtherCAT_dev_register(unsigned int, struct net_device *,
    34 ec_device_t *EtherCAT_dev_register(unsigned int, struct net_device *,
    32                                    irqreturn_t (*)(int, void *,
    35                                    irqreturn_t (*)(int, void *,
    33                                                    struct pt_regs *),
    36                                                    struct pt_regs *),
    34                                    struct module *);
    37                                    struct module *);
    35 void EtherCAT_dev_unregister(unsigned int, ec_device_t *);
    38 void EtherCAT_dev_unregister(unsigned int, ec_device_t *);
       
    39 
    36 int EtherCAT_dev_is_ec(ec_device_t *, struct net_device *);
    40 int EtherCAT_dev_is_ec(ec_device_t *, struct net_device *);
    37 void EtherCAT_dev_state(ec_device_t *, ec_device_state_t);
    41 void EtherCAT_dev_state(ec_device_t *, ec_device_state_t);
    38 int EtherCAT_dev_receive(ec_device_t *, void *, unsigned int);
    42 void EtherCAT_dev_receive(ec_device_t *, void *, unsigned int);
    39 
    43 
    40 /*****************************************************************************/
    44 /*****************************************************************************/
    41 
    45 
    42 #endif
    46 #endif