00001 /****************************************************************************** 00002 * 00003 * $Id$ 00004 * 00005 * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH 00006 * 00007 * This file is part of the IgH EtherCAT Master. 00008 * 00009 * The IgH EtherCAT Master is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License version 2, as 00011 * published by the Free Software Foundation. 00012 * 00013 * The IgH EtherCAT Master is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 00016 * Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License along 00019 * with the IgH EtherCAT Master; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00021 * 00022 * --- 00023 * 00024 * The license mentioned above concerns the source code only. Using the 00025 * EtherCAT technology and brand is only permitted in compliance with the 00026 * industrial property and similar rights of Beckhoff Automation GmbH. 00027 * 00028 *****************************************************************************/ 00029 00035 /*****************************************************************************/ 00036 00037 #include <linux/slab.h> 00038 00039 #include "sdo_entry.h" 00040 00041 /*****************************************************************************/ 00042 00045 void ec_sdo_entry_init( 00046 ec_sdo_entry_t *entry, 00047 ec_sdo_t *sdo, 00048 uint8_t subindex 00049 ) 00050 { 00051 entry->sdo = sdo; 00052 entry->subindex = subindex; 00053 entry->data_type = 0x0000; 00054 entry->bit_length = 0; 00055 entry->read_access[EC_SDO_ENTRY_ACCESS_PREOP] = 0; 00056 entry->read_access[EC_SDO_ENTRY_ACCESS_SAFEOP] = 0; 00057 entry->read_access[EC_SDO_ENTRY_ACCESS_OP] = 0; 00058 entry->write_access[EC_SDO_ENTRY_ACCESS_PREOP] = 0; 00059 entry->write_access[EC_SDO_ENTRY_ACCESS_SAFEOP] = 0; 00060 entry->write_access[EC_SDO_ENTRY_ACCESS_OP] = 0; 00061 entry->description = NULL; 00062 } 00063 00064 /*****************************************************************************/ 00065 00068 void ec_sdo_entry_clear( 00069 ec_sdo_entry_t *entry 00070 ) 00071 { 00072 00073 if (entry->description) 00074 kfree(entry->description); 00075 } 00076 00077 /*****************************************************************************/
1.5.6