master/globals.h
changeset 211 c684b6b7adaf
parent 199 04ecf40fc2e9
child 212 82980deb8b00
equal deleted inserted replaced
210:1cc6bcb1e6ae 211:c684b6b7adaf
    51 
    51 
    52 /******************************************************************************
    52 /******************************************************************************
    53  *  EtherCAT protocol
    53  *  EtherCAT protocol
    54  *****************************************************************************/
    54  *****************************************************************************/
    55 
    55 
    56 /** maximum size of an EtherCAT frame (without header and CRC) */
       
    57 #define EC_MAX_FRAME_SIZE 1500
       
    58 
       
    59 /** minimum size of an EtherCAT frame (without header and CRC) */
       
    60 #define EC_MIN_FRAME_SIZE 46
       
    61 
       
    62 /** size of an EtherCAT frame header */
    56 /** size of an EtherCAT frame header */
    63 #define EC_FRAME_HEADER_SIZE 2
    57 #define EC_FRAME_HEADER_SIZE 2
    64 
    58 
    65 /** size of an EtherCAT command header */
    59 /** size of an EtherCAT command header */
    66 #define EC_COMMAND_HEADER_SIZE 10
    60 #define EC_COMMAND_HEADER_SIZE 10
    73 
    67 
    74 /** size of an FMMU configuration page */
    68 /** size of an FMMU configuration page */
    75 #define EC_FMMU_SIZE 16
    69 #define EC_FMMU_SIZE 16
    76 
    70 
    77 /** resulting maximum data size of a single command in a frame */
    71 /** resulting maximum data size of a single command in a frame */
    78 #define EC_MAX_DATA_SIZE (EC_MAX_FRAME_SIZE - EC_FRAME_HEADER_SIZE \
    72 #define EC_MAX_DATA_SIZE (ETH_DATA_LEN - EC_FRAME_HEADER_SIZE \
    79                           - EC_COMMAND_HEADER_SIZE - EC_COMMAND_FOOTER_SIZE)
    73                           - EC_COMMAND_HEADER_SIZE - EC_COMMAND_FOOTER_SIZE)
    80 
    74 
    81 /*****************************************************************************/
    75 /*****************************************************************************/
    82 
    76 
    83 #define EC_INFO(fmt, args...) \
    77 #define EC_INFO(fmt, args...) \