master/canopen.h
changeset 430 74754f45d5fa
parent 409 bc4c852e1b93
child 448 e4b76dc7910c
equal deleted inserted replaced
429:b21b000e88e3 430:74754f45d5fa
    55 
    55 
    56 typedef struct
    56 typedef struct
    57 {
    57 {
    58     struct kobject kobj; /**< kobject */
    58     struct kobject kobj; /**< kobject */
    59     struct list_head list; /**< list item */
    59     struct list_head list; /**< list item */
       
    60     ec_slave_t *slave; /**< parent slave */
    60     uint16_t index; /**< SDO index */
    61     uint16_t index; /**< SDO index */
    61     uint8_t object_code; /**< object code */
    62     uint8_t object_code; /**< object code */
    62     char *name; /**< SDO name */
    63     char *name; /**< SDO name */
    63     uint8_t subindices; /**< subindices */
    64     uint8_t subindices; /**< subindices */
    64     struct list_head entries; /**< entry list */
    65     struct list_head entries; /**< entry list */
    73 
    74 
    74 typedef struct
    75 typedef struct
    75 {
    76 {
    76     struct kobject kobj; /**< kobject */
    77     struct kobject kobj; /**< kobject */
    77     struct list_head list; /**< list item */
    78     struct list_head list; /**< list item */
       
    79     ec_sdo_t *sdo; /**< parent SDO */
    78     uint8_t subindex; /**< entry subindex */
    80     uint8_t subindex; /**< entry subindex */
    79     uint16_t data_type; /**< entry data type */
    81     uint16_t data_type; /**< entry data type */
    80     uint16_t bit_length; /**< entry length in bit */
    82     uint16_t bit_length; /**< entry length in bit */
    81     char *description; /**< entry description */
    83     char *description; /**< entry description */
    82 }
    84 }
    98 }
   100 }
    99 ec_sdo_data_t;
   101 ec_sdo_data_t;
   100 
   102 
   101 /*****************************************************************************/
   103 /*****************************************************************************/
   102 
   104 
       
   105 /**
       
   106    CANopen SDO request.
       
   107 */
       
   108 
       
   109 typedef struct
       
   110 {
       
   111     struct list_head queue; /**< list item */
       
   112     ec_sdo_t *sdo;
       
   113     ec_sdo_entry_t *entry;
       
   114     uint8_t *data; /**< pointer to SDO data */
       
   115     size_t size; /**< size of SDO data */
       
   116     int return_code;
       
   117 }
       
   118 ec_sdo_request_t;
       
   119 
       
   120 /*****************************************************************************/
       
   121 
   103 int ec_sdo_init(ec_sdo_t *, uint16_t, ec_slave_t *);
   122 int ec_sdo_init(ec_sdo_t *, uint16_t, ec_slave_t *);
   104 int ec_sdo_entry_init(ec_sdo_entry_t *, uint8_t, ec_sdo_t *);
   123 int ec_sdo_entry_init(ec_sdo_entry_t *, uint8_t, ec_sdo_t *);
   105 
   124 
   106 /*****************************************************************************/
   125 /*****************************************************************************/
   107 
   126