Renamed ec_sii_sync_t to ec_sync_t.
authorFlorian Pose <fp@igh-essen.com>
Wed, 07 Mar 2007 11:30:09 +0000
changeset 626 a5e838c30733
parent 625 ec69acbbd156
child 627 4793ca94f082
Renamed ec_sii_sync_t to ec_sync_t.
master/domain.c
master/slave.c
master/slave.h
--- a/master/domain.c	Wed Mar 07 11:18:34 2007 +0000
+++ b/master/domain.c	Wed Mar 07 11:30:09 2007 +0000
@@ -54,7 +54,7 @@
 {
     struct list_head list; /**< list item */
     ec_slave_t *slave; /**< slave */
-    const ec_sii_sync_t *sync; /**< sync manager */
+    const ec_sync_t *sync; /**< sync manager */
     off_t sync_offset; /**< pdo offset */
     void **data_ptr; /**< pointer to process data pointer(s) */
 }
@@ -196,7 +196,7 @@
                             )
 {
     ec_data_reg_t *data_reg;
-    const ec_sii_sync_t *sync;
+    const ec_sync_t *sync;
     const ec_pdo_t *other_pdo;
     const ec_pdo_entry_t *other_entry;
     unsigned int bit_offset, byte_offset;
@@ -265,7 +265,7 @@
                             )
 {
     ec_data_reg_t *data_reg;
-    ec_sii_sync_t *sync;
+    ec_sync_t *sync;
     uint16_t sync_length;
 
     if (!(sync = ec_slave_get_pdo_sync(slave, dir))) {
--- a/master/slave.c	Wed Mar 07 11:18:34 2007 +0000
+++ b/master/slave.c	Wed Mar 07 11:30:09 2007 +0000
@@ -482,12 +482,12 @@
         )
 {
     unsigned int i;
-    ec_sii_sync_t *sync;
+    ec_sync_t *sync;
 
     // sync manager struct is 4 words long
     slave->sii_sync_count = word_count / 4;
 
-    if (!(slave->sii_syncs = kmalloc(sizeof(ec_sii_sync_t) *
+    if (!(slave->sii_syncs = kmalloc(sizeof(ec_sync_t) *
                     slave->sii_sync_count, GFP_ATOMIC))) {
         EC_ERR("Failed to allocate Sync-Manager memory.\n");
         return -1;
@@ -608,7 +608,7 @@
 
 int ec_slave_prepare_fmmu(ec_slave_t *slave, /**< EtherCAT slave */
                           const ec_domain_t *domain, /**< domain */
-                          const ec_sii_sync_t *sync  /**< sync manager */
+                          const ec_sync_t *sync  /**< sync manager */
                           )
 {
     unsigned int i;
@@ -654,7 +654,7 @@
                      )
 {
     off_t off = 0;
-    ec_sii_sync_t *sync;
+    ec_sync_t *sync;
     ec_pdo_t *pdo;
     ec_pdo_entry_t *pdo_entry;
     int first, i;
@@ -1067,7 +1067,7 @@
 
 uint16_t ec_slave_calc_sync_size(const ec_slave_t *slave,
                                  /**< EtherCAT slave */
-                                 const ec_sii_sync_t *sync
+                                 const ec_sync_t *sync
                                  /**< sync manager */
                                  )
 {
@@ -1100,7 +1100,7 @@
 /**
  */
 
-ec_sii_sync_t *ec_slave_get_pdo_sync(
+ec_sync_t *ec_slave_get_pdo_sync(
         ec_slave_t *slave, /**< EtherCAT slave */
         ec_direction_t dir /**< input or output */
         )
@@ -1133,7 +1133,7 @@
 */
 
 void ec_slave_sync_config(const ec_slave_t *slave, /**< EtherCAT slave */
-        const ec_sii_sync_t *sync, /**< sync manager */
+        const ec_sync_t *sync, /**< sync manager */
         uint8_t *data /**> configuration memory */
         )
 {
--- a/master/slave.h	Wed Mar 07 11:18:34 2007 +0000
+++ b/master/slave.h	Wed Mar 07 11:30:09 2007 +0000
@@ -72,6 +72,11 @@
 }
 ec_slave_state_t;
 
+/*****************************************************************************/
+
+/**
+ */
+
 typedef enum {
     EC_SLAVE_OFFLINE,
     EC_SLAVE_ONLINE
@@ -97,7 +102,7 @@
 /*****************************************************************************/
 
 /**
-   Sync manager configuration (EEPROM).
+   Sync manager.
 */
 
 typedef struct
@@ -107,11 +112,12 @@
     uint16_t length; /**< data length in bytes */
     uint8_t control_register; /**< control register value */
     uint8_t enable; /**< enable bit */
+
     uint16_t est_length; /**< Estimated length. This is no field of the SII,
                             but it is used to calculate the length via
                             PDO ranges */
 }
-ec_sii_sync_t;
+ec_sync_t;
 
 /*****************************************************************************/
 
@@ -169,7 +175,7 @@
 {
     unsigned int index; /**< FMMU index */
     const ec_domain_t *domain; /**< domain */
-    const ec_sii_sync_t *sync; /**< sync manager */
+    const ec_sync_t *sync; /**< sync manager */
     uint32_t logical_start_address; /**< logical start address */
 }
 ec_fmmu_t;
@@ -228,7 +234,7 @@
     uint8_t sii_physical_layer[4]; /**< port media */
     char **sii_strings; /**< strings in EEPROM categories */
     unsigned int sii_string_count; /**< number of EEPROM strings */
-    ec_sii_sync_t *sii_syncs; /**< EEPROM SYNC MANAGER categories */
+    ec_sync_t *sii_syncs; /**< EEPROM SYNC MANAGER categories */
     unsigned int sii_sync_count; /**< number of sync managers in EEPROM */
     struct list_head sii_pdos; /**< EEPROM [RT]XPDO categories */
     char *sii_group; /**< slave group acc. to EEPROM */
@@ -256,7 +262,7 @@
 void ec_slave_reset(ec_slave_t *);
 
 int ec_slave_prepare_fmmu(ec_slave_t *, const ec_domain_t *,
-                          const ec_sii_sync_t *);
+        const ec_sync_t *);
 
 void ec_slave_request_state(ec_slave_t *, ec_slave_state_t);
 void ec_slave_set_state(ec_slave_t *, ec_slave_state_t);
@@ -270,11 +276,10 @@
         ec_pdo_type_t);
 
 // misc.
-ec_sii_sync_t *ec_slave_get_pdo_sync(ec_slave_t *, ec_direction_t); 
-void ec_slave_sync_config(const ec_slave_t *, const ec_sii_sync_t *,
-        uint8_t *);
+ec_sync_t *ec_slave_get_pdo_sync(ec_slave_t *, ec_direction_t); 
+void ec_slave_sync_config(const ec_slave_t *, const ec_sync_t *, uint8_t *);
 void ec_slave_fmmu_config(const ec_slave_t *, const ec_fmmu_t *, uint8_t *);
-uint16_t ec_slave_calc_sync_size(const ec_slave_t *, const ec_sii_sync_t *);
+uint16_t ec_slave_calc_sync_size(const ec_slave_t *, const ec_sync_t *);
 
 int ec_slave_is_coupler(const ec_slave_t *);