fp@39: /****************************************************************************** fp@0: * fp@54: * g l o b a l s . h fp@0: * fp@0: * Globale Definitionen und Makros für das EtherCAT-Protokoll. fp@0: * fp@39: * $Id$ fp@0: * fp@39: *****************************************************************************/ fp@0: fp@0: #ifndef _EC_GLOBALS_ fp@0: #define _EC_GLOBALS_ fp@0: fp@41: /*****************************************************************************/ fp@41: fp@73: // EtherCAT-Protokoll fp@73: #define EC_MAX_FRAME_SIZE 1500 /**< Maximale Größe eines EtherCAT-Frames ohne fp@98: Ethernet-II-Header und -Prüfsumme */ fp@73: #define EC_MIN_FRAME_SIZE 46 /** Minimale Größe, s. o. */ fp@73: #define EC_FRAME_HEADER_SIZE 2 /**< Größe des EtherCAT-Frame-Headers */ fp@73: #define EC_COMMAND_HEADER_SIZE 10 /**< Größe eines EtherCAT-Kommando-Headers */ fp@73: #define EC_COMMAND_FOOTER_SIZE 2 /**< Größe eines EtherCAT-Kommando-Footers */ fp@73: #define EC_SYNC_SIZE 8 /**< Größe einer Sync-Manager-Konfigurationsseite */ fp@73: #define EC_FMMU_SIZE 16 /**< Größe einer FMMU-Konfigurationsseite */ fp@73: #define EC_MAX_FMMUS 16 /**< Maximale Anzahl FMMUs pro Slave */ fp@90: #define EC_MAX_DATA_SIZE (EC_MAX_FRAME_SIZE \ fp@90: - EC_FRAME_HEADER_SIZE \ fp@90: - EC_COMMAND_HEADER_SIZE \ fp@90: - EC_COMMAND_FOOTER_SIZE) /**< Maximale Datengröße */ fp@90: fp@0: #ifndef NULL fp@73: #define NULL ((void *) 0) /**< NULL-Define, falls noch nicht definiert. */ fp@0: #endif fp@0: fp@84: #define EC_INFO(fmt, args...) \ fp@84: printk(KERN_INFO "EtherCAT: " fmt, ##args) fp@84: #define EC_ERR(fmt, args...) \ fp@84: printk(KERN_ERR "EtherCAT ERROR: " fmt, ##args) fp@84: #define EC_WARN(fmt, args...) \ fp@84: printk(KERN_WARNING "EtherCAT WARNING: " fmt, ##args) fp@84: #define EC_DBG(fmt, args...) \ fp@84: printk(KERN_DEBUG "EtherCAT DEBUG: " fmt, ##args) fp@84: fp@41: /*****************************************************************************/ fp@41: fp@0: #endif fp@73: fp@73: /* Emacs-Konfiguration fp@73: ;;; Local Variables: *** fp@73: ;;; c-basic-offset:4 *** fp@73: ;;; End: *** fp@73: */