00001 /****************************************************************************** 00002 * 00003 * $Id: types.h 490 2006-08-02 12:25:25Z fp $ 00004 * 00005 * Copyright (C) 2006 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 00010 * and/or modify it under the terms of the GNU General Public License 00011 * as published by the Free Software Foundation; either version 2 of the 00012 * License, or (at your option) any later version. 00013 * 00014 * The IgH EtherCAT Master is distributed in the hope that it will be 00015 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with the IgH EtherCAT Master; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00022 * 00023 * The right to use EtherCAT Technology is granted and comes free of 00024 * charge under condition of compatibility of product made by 00025 * Licensee. People intending to distribute/sell products based on the 00026 * code, have to sign an agreement to guarantee that products using 00027 * software based on IgH EtherCAT master stay compatible with the actual 00028 * EtherCAT specification (which are released themselves as an open 00029 * standard) as the (only) precondition to have the right to use EtherCAT 00030 * Technology, IP and trade marks. 00031 * 00032 *****************************************************************************/ 00033 00039 /*****************************************************************************/ 00040 00041 #ifndef _EC_TYPES_H_ 00042 #define _EC_TYPES_H_ 00043 00044 #include <linux/types.h> 00045 00046 #include "../include/ecrt.h" 00047 00048 /*****************************************************************************/ 00049 00050 #define EC_MAX_FIELDS 10 00051 #define EC_MAX_SYNC 16 00053 /*****************************************************************************/ 00054 00059 typedef enum 00060 { 00061 EC_TYPE_NORMAL, 00062 EC_TYPE_BUS_COUPLER, 00063 EC_TYPE_INFRA, 00064 EC_TYPE_EOE 00065 } 00066 ec_special_type_t; 00067 00068 /*****************************************************************************/ 00069 00074 typedef struct 00075 { 00076 const char *name; 00077 size_t size; 00078 } 00079 ec_field_t; 00080 00081 /*****************************************************************************/ 00082 00087 typedef struct 00088 { 00089 uint16_t physical_start_address; 00090 uint16_t size; 00091 uint8_t control_byte; 00092 const ec_field_t *fields[EC_MAX_FIELDS]; 00093 } 00094 ec_sync_t; 00095 00096 /*****************************************************************************/ 00097 00102 typedef struct ec_slave_type 00103 { 00104 const char *vendor_name; 00105 const char *product_name; 00106 const char *description; 00107 ec_special_type_t special; 00108 const ec_sync_t *sync_managers[EC_MAX_SYNC]; 00109 } 00110 ec_slave_type_t; 00111 00112 /*****************************************************************************/ 00113 00118 typedef struct 00119 { 00120 uint32_t vendor_id; 00121 uint32_t product_code; 00122 const ec_slave_type_t *type; 00123 } 00124 ec_slave_ident_t; 00125 00126 extern ec_slave_ident_t slave_idents[]; 00128 /*****************************************************************************/ 00129 00130 #endif
1.4.6