master/globals.h
changeset 98 f564d0929292
parent 95 0066de7a456d
child 141 5f76a36cd9b4
equal deleted inserted replaced
97:e6264685dd7b 98:f564d0929292
    13 
    13 
    14 /*****************************************************************************/
    14 /*****************************************************************************/
    15 
    15 
    16 // EtherCAT-Protokoll
    16 // EtherCAT-Protokoll
    17 #define EC_MAX_FRAME_SIZE 1500 /**< Maximale Größe eines EtherCAT-Frames ohne
    17 #define EC_MAX_FRAME_SIZE 1500 /**< Maximale Größe eines EtherCAT-Frames ohne
    18                                   Ethernet-II-Header und -Prüfsumme*/
    18                                   Ethernet-II-Header und -Prüfsumme */
    19 #define EC_MIN_FRAME_SIZE 46 /** Minimale Größe, s. o. */
    19 #define EC_MIN_FRAME_SIZE 46 /** Minimale Größe, s. o. */
    20 #define EC_FRAME_HEADER_SIZE 2 /**< Größe des EtherCAT-Frame-Headers */
    20 #define EC_FRAME_HEADER_SIZE 2 /**< Größe des EtherCAT-Frame-Headers */
    21 #define EC_COMMAND_HEADER_SIZE 10 /**< Größe eines EtherCAT-Kommando-Headers */
    21 #define EC_COMMAND_HEADER_SIZE 10 /**< Größe eines EtherCAT-Kommando-Headers */
    22 #define EC_COMMAND_FOOTER_SIZE 2 /**< Größe eines EtherCAT-Kommando-Footers */
    22 #define EC_COMMAND_FOOTER_SIZE 2 /**< Größe eines EtherCAT-Kommando-Footers */
    23 #define EC_SYNC_SIZE 8 /**< Größe einer Sync-Manager-Konfigurationsseite */
    23 #define EC_SYNC_SIZE 8 /**< Größe einer Sync-Manager-Konfigurationsseite */
    41 #define EC_DBG(fmt, args...) \
    41 #define EC_DBG(fmt, args...) \
    42     printk(KERN_DEBUG "EtherCAT DEBUG: " fmt, ##args)
    42     printk(KERN_DEBUG "EtherCAT DEBUG: " fmt, ##args)
    43 
    43 
    44 /*****************************************************************************/
    44 /*****************************************************************************/
    45 
    45 
    46 /**
       
    47    Zustand eines EtherCAT-Slaves
       
    48 */
       
    49 
       
    50 typedef enum
       
    51 {
       
    52     EC_SLAVE_STATE_UNKNOWN = 0x00, /**< Status unbekannt */
       
    53     EC_SLAVE_STATE_INIT = 0x01,    /**< Init-Zustand (Keine Mailbox-
       
    54                                       Kommunikation, Kein I/O) */
       
    55     EC_SLAVE_STATE_PREOP = 0x02,   /**< Pre-Operational (Mailbox-
       
    56                                       Kommunikation, Kein I/O) */
       
    57     EC_SLAVE_STATE_SAVEOP = 0x04,  /**< Save-Operational (Mailbox-
       
    58                                       Kommunikation und Input Update) */
       
    59     EC_SLAVE_STATE_OP = 0x08,      /**< Operational, (Mailbox-
       
    60                                       Kommunikation und Input/Output Update) */
       
    61     EC_ACK = 0x10                  /**< Acknoledge-Bit beim Zustandswechsel
       
    62                                       (dies ist kein eigener Zustand) */
       
    63 }
       
    64 ec_slave_state_t;
       
    65 
       
    66 /*****************************************************************************/
       
    67 
       
    68 #endif
    46 #endif
    69 
    47 
    70 /* Emacs-Konfiguration
    48 /* Emacs-Konfiguration
    71 ;;; Local Variables: ***
    49 ;;; Local Variables: ***
    72 ;;; c-basic-offset:4 ***
    50 ;;; c-basic-offset:4 ***