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 00034 /*****************************************************************************/ 00035 00036 #ifndef __EC_SYNC_H__ 00037 #define __EC_SYNC_H__ 00038 00039 #include "globals.h" 00040 #include "pdo_list.h" 00041 #include "sync_config.h" 00042 00043 /*****************************************************************************/ 00044 00047 typedef struct { 00048 ec_slave_t *slave; 00049 uint16_t physical_start_address; 00050 uint16_t default_length; 00051 uint8_t control_register; 00052 uint8_t enable; 00053 ec_pdo_list_t pdos; 00054 } ec_sync_t; 00055 00056 /*****************************************************************************/ 00057 00058 void ec_sync_init(ec_sync_t *, ec_slave_t *); 00059 void ec_sync_init_copy(ec_sync_t *, const ec_sync_t *); 00060 void ec_sync_clear(ec_sync_t *); 00061 void ec_sync_page(const ec_sync_t *, uint8_t, uint16_t, 00062 const ec_sync_config_t *, uint8_t, uint8_t *); 00063 int ec_sync_add_pdo(ec_sync_t *, const ec_pdo_t *); 00064 ec_direction_t ec_sync_default_direction(const ec_sync_t *); 00065 00066 /*****************************************************************************/ 00067 00068 #endif
1.5.6