IgH EtherCAT Master  1.6.9
sdo_entry.c
Go to the documentation of this file.
1/*****************************************************************************
2 *
3 * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
4 *
5 * This file is part of the IgH EtherCAT Master.
6 *
7 * The IgH EtherCAT Master is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version 2, as
9 * published by the Free Software Foundation.
10 *
11 * The IgH EtherCAT Master is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14 * Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with the IgH EtherCAT Master; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 ****************************************************************************/
21
26
27/****************************************************************************/
28
29#include <linux/slab.h>
30
31#include "sdo_entry.h"
32
33/****************************************************************************/
34
38 ec_sdo_entry_t *entry,
39 ec_sdo_t *sdo,
40 uint8_t subindex
41 )
42{
43 entry->sdo = sdo;
44 entry->subindex = subindex;
45 entry->data_type = 0x0000;
46 entry->bit_length = 0;
53 entry->description = NULL;
54}
55
56/****************************************************************************/
57
61 ec_sdo_entry_t *entry
62 )
63{
64
65 if (entry->description)
66 kfree(entry->description);
67}
68
69/****************************************************************************/
@ EC_SDO_ENTRY_ACCESS_PREOP
Access rights in PREOP.
Definition globals.h:190
@ EC_SDO_ENTRY_ACCESS_OP
Access rights in OP.
Definition globals.h:192
@ EC_SDO_ENTRY_ACCESS_SAFEOP
Access rights in SAFEOP.
Definition globals.h:191
void ec_sdo_entry_clear(ec_sdo_entry_t *entry)
Destructor.
Definition sdo_entry.c:60
void ec_sdo_entry_init(ec_sdo_entry_t *entry, ec_sdo_t *sdo, uint8_t subindex)
Constructor.
Definition sdo_entry.c:37
EtherCAT CANopen SDO entry structure.
struct ec_sdo ec_sdo_t
Definition sdo_entry.h:40
CANopen SDO entry.
Definition sdo_entry.h:46
uint8_t write_access[EC_SDO_ENTRY_ACCESS_COUNT]
Write access.
Definition sdo_entry.h:53
ec_sdo_t * sdo
Parent SDO.
Definition sdo_entry.h:48
uint8_t subindex
Subindex.
Definition sdo_entry.h:49
uint8_t read_access[EC_SDO_ENTRY_ACCESS_COUNT]
Read access.
Definition sdo_entry.h:52
char * description
Description.
Definition sdo_entry.h:54
uint16_t bit_length
Data size in bit.
Definition sdo_entry.h:51
uint16_t data_type
Data type.
Definition sdo_entry.h:50