drivers/ec_device.h
changeset 39 6965c23a6826
parent 33 f4171b8aadf8
child 41 42c66194c0c8
equal deleted inserted replaced
38:3213cbbd58b7 39:6965c23a6826
     1 /****************************************************************
     1 /******************************************************************************
     2  *
     2  *
     3  *  e c _ d e v i c e . h
     3  *  e c _ d e v i c e . h
     4  *
     4  *
     5  *  Struktur für ein EtherCAT-Gerät.
     5  *  Struktur für ein EtherCAT-Gerät.
     6  *
     6  *
     7  *  $Date$
     7  *  $Id$
     8  *  $Author$
       
     9  *
     8  *
    10  ***************************************************************/
     9  *****************************************************************************/
    11 
    10 
    12 #ifndef _EC_DEVICE_H_
    11 #ifndef _EC_DEVICE_H_
    13 #define _EC_DEVICE_H_
    12 #define _EC_DEVICE_H_
    14 
    13 
    15 #include <linux/interrupt.h>
    14 #include <linux/interrupt.h>
    34   ECAT_DS_ERROR     /**< Nach dem Senden eines frames hat das
    33   ECAT_DS_ERROR     /**< Nach dem Senden eines frames hat das
    35                        Gerät einen Fehler festgestellt. */
    34                        Gerät einen Fehler festgestellt. */
    36 }
    35 }
    37 EtherCAT_device_state_t;
    36 EtherCAT_device_state_t;
    38 
    37 
    39 /***************************************************************/
    38 /*****************************************************************************/
    40 
    39 
    41 /**
    40 /**
    42    EtherCAT-Gerät.
    41    EtherCAT-Gerät.
    43 
    42 
    44    Ein EtherCAT-Gerät ist eine Netzwerkkarte, die vom
    43    Ein EtherCAT-Gerät ist eine Netzwerkkarte, die vom
    63   volatile unsigned int rx_data_length; /**< Länge des zuletzt
    62   volatile unsigned int rx_data_length; /**< Länge des zuletzt
    64                                            empfangenen Rahmens */
    63                                            empfangenen Rahmens */
    65   irqreturn_t (*isr)(int, void *, struct pt_regs *); /**< Adresse der ISR */
    64   irqreturn_t (*isr)(int, void *, struct pt_regs *); /**< Adresse der ISR */
    66   struct module *module; /**< Zeiger auf das Modul, das das Gerät zur
    65   struct module *module; /**< Zeiger auf das Modul, das das Gerät zur
    67                             Verfügung stellt. */
    66                             Verfügung stellt. */
       
    67   int error_reported; /**< Zeigt an, ob ein Fehler im zyklischen Code
       
    68                          bereits gemeldet wurde. */
    68 }
    69 }
    69 EtherCAT_device_t;
    70 EtherCAT_device_t;
    70 
    71 
    71 /***************************************************************/
    72 /*****************************************************************************/
    72 
    73 
    73 void EtherCAT_device_init(EtherCAT_device_t *);
    74 void EtherCAT_device_init(EtherCAT_device_t *);
    74 int EtherCAT_device_assign(EtherCAT_device_t *, struct net_device *);
    75 int EtherCAT_device_assign(EtherCAT_device_t *, struct net_device *);
    75 void EtherCAT_device_clear(EtherCAT_device_t *);
    76 void EtherCAT_device_clear(EtherCAT_device_t *);
    76 
    77 
    81 int EtherCAT_device_receive(EtherCAT_device_t *, unsigned char *);
    82 int EtherCAT_device_receive(EtherCAT_device_t *, unsigned char *);
    82 void EtherCAT_device_call_isr(EtherCAT_device_t *);
    83 void EtherCAT_device_call_isr(EtherCAT_device_t *);
    83 
    84 
    84 void EtherCAT_device_debug(EtherCAT_device_t *);
    85 void EtherCAT_device_debug(EtherCAT_device_t *);
    85 
    86 
    86 /***************************************************************/
    87 /*****************************************************************************/
    87 
    88 
    88 #endif
    89 #endif