master/pdo.h
changeset 933 618ab9e03321
parent 883 4963e22a267a
child 934 96241b092fac
equal deleted inserted replaced
932:dbcc06156a60 933:618ab9e03321
    44 #include <linux/list.h>
    44 #include <linux/list.h>
    45 
    45 
    46 #include "../include/ecrt.h"
    46 #include "../include/ecrt.h"
    47 
    47 
    48 #include "globals.h"
    48 #include "globals.h"
       
    49 #include "pdo_entry.h"
    49 
    50 
    50 /*****************************************************************************/
    51 /*****************************************************************************/
    51 
    52 
    52 /** Pdo description.
    53 /** Pdo description.
    53  */
    54  */
    62                                    configuration. */
    63                                    configuration. */
    63 } ec_pdo_t;
    64 } ec_pdo_t;
    64 
    65 
    65 /*****************************************************************************/
    66 /*****************************************************************************/
    66 
    67 
    67 /** Pdo entry description.
       
    68  */
       
    69 typedef struct {
       
    70     struct list_head list; /**< list item */
       
    71     uint16_t index; /**< Pdo entry index */
       
    72     uint8_t subindex; /**< Pdo entry subindex */
       
    73     char *name; /**< entry name */
       
    74     uint8_t bit_length; /**< entry length in bit */
       
    75 } ec_pdo_entry_t;
       
    76 
       
    77 /*****************************************************************************/
       
    78 
       
    79 void ec_pdo_init(ec_pdo_t *);
    68 void ec_pdo_init(ec_pdo_t *);
    80 int ec_pdo_init_copy(ec_pdo_t *, const ec_pdo_t *);
    69 int ec_pdo_init_copy(ec_pdo_t *, const ec_pdo_t *);
    81 void ec_pdo_clear(ec_pdo_t *);
    70 void ec_pdo_clear(ec_pdo_t *);
    82 void ec_pdo_clear_entries(ec_pdo_t *);
    71 void ec_pdo_clear_entries(ec_pdo_t *);
    83 int ec_pdo_set_name(ec_pdo_t *, const char *);
    72 int ec_pdo_set_name(ec_pdo_t *, const char *);
    84 ec_pdo_entry_t *ec_pdo_add_entry(ec_pdo_t *, uint16_t, uint8_t, uint8_t);
    73 ec_pdo_entry_t *ec_pdo_add_entry(ec_pdo_t *, uint16_t, uint8_t, uint8_t);
    85 int ec_pdo_copy_entries(ec_pdo_t *, const ec_pdo_t *);
    74 int ec_pdo_copy_entries(ec_pdo_t *, const ec_pdo_t *);
    86 int ec_pdo_equal_entries(const ec_pdo_t *, const ec_pdo_t *);
    75 int ec_pdo_equal_entries(const ec_pdo_t *, const ec_pdo_t *);
    87 
    76 
    88 void ec_pdo_entry_init(ec_pdo_entry_t *);
       
    89 int ec_pdo_entry_init_copy(ec_pdo_entry_t *, const ec_pdo_entry_t *);
       
    90 void ec_pdo_entry_clear(ec_pdo_entry_t *);
       
    91 int ec_pdo_entry_set_name(ec_pdo_entry_t *, const char *);
       
    92 int ec_pdo_entry_equal(const ec_pdo_entry_t *, const ec_pdo_entry_t *);
       
    93 
       
    94 /*****************************************************************************/
    77 /*****************************************************************************/
    95 
    78 
    96 #endif
    79 #endif