diff -r 60b2aad9d40b -r 1cc865ba17c2 master/globals.h --- a/master/globals.h Fri Oct 13 10:07:10 2006 +0000 +++ b/master/globals.h Tue Nov 07 12:13:30 2006 +0000 @@ -38,33 +38,17 @@ /*****************************************************************************/ -#ifndef _EC_GLOBALS_ -#define _EC_GLOBALS_ +#ifndef _EC_MASTER_GLOBALS_ +#define _EC_MASTER_GLOBALS_ #include -#include "../config.h" +#include "../globals.h" /****************************************************************************** * EtherCAT master *****************************************************************************/ -/** master main version */ -#define EC_MASTER_VERSION_MAIN 1 - -/** master sub version (after the dot) */ -#define EC_MASTER_VERSION_SUB 1 - -/** master extra version (just a string) */ -#define EC_MASTER_VERSION_EXTRA "stable" - -/** Compile version info. */ - -#define EC_MASTER_VERSION EC_STR(EC_MASTER_VERSION_MAIN) \ - "." EC_STR(EC_MASTER_VERSION_SUB) \ - " " EC_MASTER_VERSION_EXTRA \ - " r" EC_STR(SVNREV) - /** maximum number of FMMUs per slave */ #define EC_MAX_FMMUS 16 @@ -77,6 +61,13 @@ /** datagram timeout in microseconds */ #define EC_IO_TIMEOUT 500 +/** Seconds to wait before fetching SDO dictionary + after slave entered PREOP state. */ +#define EC_WAIT_SDO_DICT 3 + +/** minimum size of a buffer used with ec_state_string() */ +#define EC_STATE_STRING_SIZE 32 + /****************************************************************************** * EtherCAT protocol *****************************************************************************/ @@ -143,20 +134,6 @@ printk(KERN_DEBUG "EtherCAT DEBUG: " fmt, ##args) /** - Helper macro for EC_STR(), literates a macro argument. - \param X argument to literate. -*/ - -#define EC_LIT(X) #X - -/** - Converts a macro argument to a string. - \param X argument to stringify. -*/ - -#define EC_STR(X) EC_LIT(X) - -/** Convenience macro for defining read-only SysFS attributes. This results in creating a static variable called attr_\a NAME. The SysFS file will be world-readable. @@ -182,6 +159,10 @@ /*****************************************************************************/ +extern char *ec_master_version_str; + +/*****************************************************************************/ + void ec_print_data(const uint8_t *, size_t); void ec_print_data_diff(const uint8_t *, const uint8_t *, size_t); size_t ec_state_string(uint8_t, char *);