master/sdo_entry.c
branchstable-1.4
changeset 1686 e206f4485f60
parent 1685 399ef727bf62
child 1363 11c0b2caa253
equal deleted inserted replaced
1685:399ef727bf62 1686:e206f4485f60
    24  *
    24  *
    25  *****************************************************************************/
    25  *****************************************************************************/
    26 
    26 
    27 /**
    27 /**
    28    \file
    28    \file
    29    CANopen-over-EtherCAT Sdo entry functions.
    29    CANopen over EtherCAT SDO entry functions.
    30 */
    30 */
    31 
    31 
    32 /*****************************************************************************/
    32 /*****************************************************************************/
    33 
    33 
    34 #include <linux/slab.h>
    34 #include <linux/slab.h>
    38 /*****************************************************************************/
    38 /*****************************************************************************/
    39 
    39 
    40 /** Constructor.
    40 /** Constructor.
    41  */
    41  */
    42 void ec_sdo_entry_init(
    42 void ec_sdo_entry_init(
    43         ec_sdo_entry_t *entry, /**< Sdo entry. */
    43         ec_sdo_entry_t *entry, /**< SDO entry. */
    44         ec_sdo_t *sdo, /**< Parent Sdo. */
    44         ec_sdo_t *sdo, /**< Parent SDO. */
    45         uint8_t subindex /**< Subindex. */
    45         uint8_t subindex /**< Subindex. */
    46         )
    46         )
    47 {
    47 {
    48     entry->sdo = sdo;
    48     entry->sdo = sdo;
    49     entry->subindex = subindex;
    49     entry->subindex = subindex;
    55 /*****************************************************************************/
    55 /*****************************************************************************/
    56 
    56 
    57 /** Destructor.
    57 /** Destructor.
    58  */
    58  */
    59 void ec_sdo_entry_clear(
    59 void ec_sdo_entry_clear(
    60         ec_sdo_entry_t *entry /**< Sdo entry. */
    60         ec_sdo_entry_t *entry /**< SDO entry. */
    61         )
    61         )
    62 {
    62 {
    63 
    63 
    64     if (entry->description)
    64     if (entry->description)
    65         kfree(entry->description);
    65         kfree(entry->description);