master/device.h
changeset 199 04ecf40fc2e9
parent 197 b9a6e2c22745
child 231 767548c75bf3
equal deleted inserted replaced
198:f7dff1ed01ba 199:04ecf40fc2e9
     1 /******************************************************************************
     1 /******************************************************************************
     2  *
       
     3  *  d e v i c e . h
       
     4  *
       
     5  *  EtherCAT device structure.
       
     6  *
     2  *
     7  *  $Id$
     3  *  $Id$
     8  *
     4  *
     9  *  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
     5  *  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
    10  *
     6  *
    23  *  along with the IgH EtherCAT Master; if not, write to the Free Software
    19  *  along with the IgH EtherCAT Master; if not, write to the Free Software
    24  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    20  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    25  *
    21  *
    26  *****************************************************************************/
    22  *****************************************************************************/
    27 
    23 
       
    24 /**
       
    25    \file
       
    26    EtherCAT device structure.
       
    27 */
       
    28 
       
    29 /*****************************************************************************/
       
    30 
    28 #ifndef _EC_DEVICE_H_
    31 #ifndef _EC_DEVICE_H_
    29 #define _EC_DEVICE_H_
    32 #define _EC_DEVICE_H_
    30 
    33 
    31 #include <linux/interrupt.h>
    34 #include <linux/interrupt.h>
    32 
    35 
    35 #include "globals.h"
    38 #include "globals.h"
    36 
    39 
    37 /*****************************************************************************/
    40 /*****************************************************************************/
    38 
    41 
    39 /**
    42 /**
    40    \defgroup Device EtherCAT device
       
    41    Data types and functions for EtherCAT devices.
       
    42    An EtherCAT device is the connection from an EtherCAT master to a network
       
    43    interface card.
       
    44    \{
       
    45 */
       
    46 
       
    47 /*****************************************************************************/
       
    48 
       
    49 /**
       
    50    EtherCAT device.
    43    EtherCAT device.
    51 
       
    52    An EtherCAT device is a network interface card, that is owned by an
    44    An EtherCAT device is a network interface card, that is owned by an
    53    EtherCAT master to send and receive EtherCAT frames with.
    45    EtherCAT master to send and receive EtherCAT frames with.
    54 */
    46 */
    55 
    47 
    56 struct ec_device
    48 struct ec_device
    61     struct sk_buff *tx_skb; /**< transmit socket buffer */
    53     struct sk_buff *tx_skb; /**< transmit socket buffer */
    62     ec_isr_t isr; /**< pointer to the device's interrupt service routine */
    54     ec_isr_t isr; /**< pointer to the device's interrupt service routine */
    63     struct module *module; /**< pointer to the device's owning module */
    55     struct module *module; /**< pointer to the device's owning module */
    64     uint8_t link_state; /**< device link state */
    56     uint8_t link_state; /**< device link state */
    65 };
    57 };
    66 
       
    67 /** \} */
       
    68 
    58 
    69 /*****************************************************************************/
    59 /*****************************************************************************/
    70 
    60 
    71 int ec_device_init(ec_device_t *, ec_master_t *, struct net_device *,
    61 int ec_device_init(ec_device_t *, ec_master_t *, struct net_device *,
    72                    ec_isr_t, struct module *);
    62                    ec_isr_t, struct module *);