master/globals.h
changeset 696 24fac09b5b26
parent 649 a4d3fffdaed7
child 708 90bdb315f560
equal deleted inserted replaced
695:661ad8bd5ea1 696:24fac09b5b26
    63 #define EC_WAIT_SDO_DICT 3
    63 #define EC_WAIT_SDO_DICT 3
    64 
    64 
    65 /** minimum size of a buffer used with ec_state_string() */
    65 /** minimum size of a buffer used with ec_state_string() */
    66 #define EC_STATE_STRING_SIZE 32
    66 #define EC_STATE_STRING_SIZE 32
    67 
    67 
       
    68 /** maximum EEPROM size in words, to avoid infinite reading. */
       
    69 #define EC_MAX_EEPROM_SIZE 512
       
    70 
    68 /******************************************************************************
    71 /******************************************************************************
    69  *  EtherCAT protocol
    72  *  EtherCAT protocol
    70  *****************************************************************************/
    73  *****************************************************************************/
    71 
    74 
    72 /** size of an EtherCAT frame header */
    75 /** size of an EtherCAT frame header */
    79 #define EC_DATAGRAM_FOOTER_SIZE 2
    82 #define EC_DATAGRAM_FOOTER_SIZE 2
    80 
    83 
    81 /** resulting maximum data size of a single datagram in a frame */
    84 /** resulting maximum data size of a single datagram in a frame */
    82 #define EC_MAX_DATA_SIZE (ETH_DATA_LEN - EC_FRAME_HEADER_SIZE \
    85 #define EC_MAX_DATA_SIZE (ETH_DATA_LEN - EC_FRAME_HEADER_SIZE \
    83                           - EC_DATAGRAM_HEADER_SIZE - EC_DATAGRAM_FOOTER_SIZE)
    86                           - EC_DATAGRAM_HEADER_SIZE - EC_DATAGRAM_FOOTER_SIZE)
       
    87 
       
    88 /** word offset of first EEPROM category. */
       
    89 #define EC_FIRST_EEPROM_CATEGORY_OFFSET 0x40
    84 
    90 
    85 /*****************************************************************************/
    91 /*****************************************************************************/
    86 
    92 
    87 /**
    93 /**
    88    Convenience macro for printing EtherCAT-specific information to syslog.
    94    Convenience macro for printing EtherCAT-specific information to syslog.