master/globals.h
branchstable-1.5
changeset 2378 ca345abf0565
parent 2241 0ba77ef52922
child 2022 393e7aef6706
child 2419 fdb85a806585
equal deleted inserted replaced
2377:aa0f6f939cb3 2378:ca345abf0565
    94 /** Mailbox header size.  */
    94 /** Mailbox header size.  */
    95 #define EC_MBOX_HEADER_SIZE 6
    95 #define EC_MBOX_HEADER_SIZE 6
    96 
    96 
    97 /** Word offset of first SII category. */
    97 /** Word offset of first SII category. */
    98 #define EC_FIRST_SII_CATEGORY_OFFSET 0x40
    98 #define EC_FIRST_SII_CATEGORY_OFFSET 0x40
    99 
       
   100 /** Maximum number of slave ports. */
       
   101 #define EC_MAX_PORTS 4
       
   102 
    99 
   103 /** Size of a sync manager configuration page. */
   100 /** Size of a sync manager configuration page. */
   104 #define EC_SYNC_PAGE_SIZE 8
   101 #define EC_SYNC_PAGE_SIZE 8
   105 
   102 
   106 /** Maximum number of FMMUs per slave. */
   103 /** Maximum number of FMMUs per slave. */
   171 typedef struct {
   168 typedef struct {
   172     uint8_t enable_safeop : 1; /**< ?. */
   169     uint8_t enable_safeop : 1; /**< ?. */
   173     uint8_t enable_not_lrw : 1; /**< Slave does not support LRW. */
   170     uint8_t enable_not_lrw : 1; /**< Slave does not support LRW. */
   174 } ec_sii_general_flags_t;
   171 } ec_sii_general_flags_t;
   175 
   172 
   176 /** EtherCAT slave port descriptor.
       
   177  */
       
   178 typedef enum {
       
   179     EC_PORT_NOT_IMPLEMENTED,
       
   180     EC_PORT_NOT_CONFIGURED,
       
   181     EC_PORT_EBUS,
       
   182     EC_PORT_MII
       
   183 } ec_slave_port_desc_t;
       
   184 
       
   185 /** EtherCAT slave port information.
       
   186  */
       
   187 typedef struct {
       
   188     uint8_t link_up; /**< Link detected. */
       
   189     uint8_t loop_closed; /**< Loop closed. */
       
   190     uint8_t signal_detected; /**< Detected signal on RX port. */
       
   191 } ec_slave_port_link_t;
       
   192 
       
   193 /** EtherCAT slave distributed clocks range.
   173 /** EtherCAT slave distributed clocks range.
   194  */
   174  */
   195 typedef enum {
   175 typedef enum {
   196     EC_DC_32, /**< 32 bit. */
   176     EC_DC_32, /**< 32 bit. */
   197     EC_DC_64 /*< 64 bit for system time, system time offset and
   177     EC_DC_64 /*< 64 bit for system time, system time offset and