master/master.h
branchstable-1.5
changeset 2522 ec403cf308eb
parent 2498 9cdd7669dc0b
child 2529 c7e1f2616a9d
equal deleted inserted replaced
2521:3d68bb0047a1 2522:ec403cf308eb
   101  *
   101  *
   102  * This will print the message in \a fmt with a prefixed "EtherCAT <INDEX>: ",
   102  * This will print the message in \a fmt with a prefixed "EtherCAT <INDEX>: ",
   103  * where INDEX is the master index.
   103  * where INDEX is the master index.
   104  *
   104  *
   105  * \param master EtherCAT master
   105  * \param master EtherCAT master
       
   106  * \param level Debug level. Master's debug level must be >= \a level for
       
   107  * output.
   106  * \param fmt format string (like in printf())
   108  * \param fmt format string (like in printf())
   107  * \param args arguments (optional)
   109  * \param args arguments (optional)
   108  */
   110  */
   109 #define EC_MASTER_DBG(master, level, fmt, args...) \
   111 #define EC_MASTER_DBG(master, level, fmt, args...) \
   110     do { \
   112     do { \
   316 // master creation/deletion
   318 // master creation/deletion
   317 int ec_master_init(ec_master_t *, unsigned int, const uint8_t *,
   319 int ec_master_init(ec_master_t *, unsigned int, const uint8_t *,
   318         const uint8_t *, dev_t, struct class *, unsigned int);
   320         const uint8_t *, dev_t, struct class *, unsigned int);
   319 void ec_master_clear(ec_master_t *);
   321 void ec_master_clear(ec_master_t *);
   320 
   322 
       
   323 /** Number of Ethernet devices.
       
   324  */
   321 #if EC_MAX_NUM_DEVICES > 1
   325 #if EC_MAX_NUM_DEVICES > 1
   322 #define ec_master_num_devices(MASTER) ((MASTER)->num_devices)
   326 #define ec_master_num_devices(MASTER) ((MASTER)->num_devices)
   323 #else
   327 #else
   324 #define ec_master_num_devices(MASTER) 1
   328 #define ec_master_num_devices(MASTER) 1
   325 #endif
   329 #endif