Introduced ECRT version magic.

This commit is contained in:
Florian Pose 2007-02-09 10:23:13 +00:00
parent 5f7ac3aa85
commit 80566cd979
3 changed files with 24 additions and 0 deletions

1
NEWS
View File

@ -20,6 +20,7 @@ Changes in version 1.2.0:
ecrt_domain_register_pdo_list() and ecrt_domain_register_pdo_range() may
not be NULL any more.
- Removed ecrt_slave_pdo_size(). This function was deprecated long before.
- Introduced ECRT_VERSION_MAGIC macro and ecrt_version_magic() function.
* Device interface changes:
- ec_isr_t was replaced by ec_pollfunc_t, the device driver has to supply
a poll function to call its ISR. This was introduced because some network

View File

@ -59,6 +59,14 @@
/*****************************************************************************/
#define ECRT_VER_MAJOR 1U
#define ECRT_VER_MINOR 2U
#define ECRT_VERSION(a,b) (((a) << 8) + (b))
#define ECRT_VERSION_MAGIC ECRT_VERSION(ECRT_VER_MAJOR, ECRT_VER_MINOR)
/*****************************************************************************/
struct ec_master;
typedef struct ec_master ec_master_t; /**< \see ec_master */
@ -99,6 +107,8 @@ typedef enum {EC_DIR_INPUT, EC_DIR_OUTPUT} ec_direction_t;
ec_master_t *ecrt_request_master(unsigned int master_index);
void ecrt_release_master(ec_master_t *master);
unsigned int ecrt_version_magic(void);
/******************************************************************************
* Master methods
*****************************************************************************/

View File

@ -400,6 +400,19 @@ void ecdev_close(ec_device_t *device /**< EtherCAT device */)
* Realtime interface
*****************************************************************************/
/**
* Returns the version magic of the realtime interface.
* \return ECRT version magic.
* \ingroup RealtimeInterface
*/
unsigned int ecrt_version_magic(void)
{
return ECRT_VERSION_MAGIC;
}
/*****************************************************************************/
/**
Reserves an EtherCAT master for realtime operation.
\return pointer to reserved master, or NULL on error