--- a/master/pdo.h Thu Feb 14 09:18:55 2008 +0000
+++ b/master/pdo.h Tue Feb 19 08:22:20 2008 +0000
@@ -43,59 +43,47 @@
#include <linux/list.h>
+#include "../include/ecrt.h"
+
#include "globals.h"
/*****************************************************************************/
-/**
- * PDO type.
+/** PDO description.
*/
-
-typedef enum
-{
- EC_RX_PDO, /**< Reveive PDO */
- EC_TX_PDO /**< Transmit PDO */
-}
-ec_pdo_type_t;
+typedef struct {
+ struct list_head list; /**< List item. */
+ ec_direction_t dir; /**< PDO direction. */
+ uint16_t index; /**< PDO index. */
+ int8_t sync_index; /**< Assigned sync manager. */
+ char *name; /**< PDO name. */
+ struct list_head entries; /**< List of PDO entries. */
+} ec_pdo_t;
/*****************************************************************************/
-/**
- * PDO description.
+/** PDO entry description.
*/
-
-typedef struct
-{
- struct list_head list; /**< list item */
- ec_pdo_type_t type; /**< PDO type */
- uint16_t index; /**< PDO index */
- int8_t sync_index; /**< assigned sync manager */
- char *name; /**< PDO name */
- struct list_head entries; /**< entry list */
-}
-ec_pdo_t;
-
-/*****************************************************************************/
-
-/**
- * PDO entry description.
- */
-
-typedef struct
-{
+typedef struct {
struct list_head list; /**< list item */
uint16_t index; /**< PDO entry index */
uint8_t subindex; /**< PDO entry subindex */
char *name; /**< entry name */
uint8_t bit_length; /**< entry length in bit */
-}
-ec_pdo_entry_t;
+} ec_pdo_entry_t;
/*****************************************************************************/
void ec_pdo_init(ec_pdo_t *);
+int ec_pdo_init_copy(ec_pdo_t *, const ec_pdo_t *);
void ec_pdo_clear(ec_pdo_t *);
-int ec_pdo_copy(ec_pdo_t *, const ec_pdo_t *);
+int ec_pdo_set_name(ec_pdo_t *, const char *);
+int ec_pdo_copy_entries(ec_pdo_t *, const ec_pdo_t *);
+
+void ec_pdo_entry_init(ec_pdo_entry_t *);
+int ec_pdo_entry_init_copy(ec_pdo_entry_t *, const ec_pdo_entry_t *);
+void ec_pdo_entry_clear(ec_pdo_entry_t *);
+int ec_pdo_entry_set_name(ec_pdo_entry_t *, const char *);
/*****************************************************************************/