Introduced ECRT version magic.
This commit is contained in:
parent
5f7ac3aa85
commit
80566cd979
1
NEWS
1
NEWS
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue