fp@792: /****************************************************************************** fp@792: * fp@792: * $Id$ fp@792: * fp@792: * Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH fp@792: * fp@792: * This file is part of the IgH EtherCAT Master. fp@792: * fp@792: * The IgH EtherCAT Master is free software; you can redistribute it fp@792: * and/or modify it under the terms of the GNU General Public License fp@792: * as published by the Free Software Foundation; either version 2 of the fp@792: * License, or (at your option) any later version. fp@792: * fp@792: * The IgH EtherCAT Master is distributed in the hope that it will be fp@792: * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of fp@792: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the fp@792: * GNU General Public License for more details. fp@792: * fp@792: * You should have received a copy of the GNU General Public License fp@792: * along with the IgH EtherCAT Master; if not, write to the Free Software fp@792: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@792: * fp@792: * The right to use EtherCAT Technology is granted and comes free of fp@792: * charge under condition of compatibility of product made by fp@792: * Licensee. People intending to distribute/sell products based on the fp@792: * code, have to sign an agreement to guarantee that products using fp@792: * software based on IgH EtherCAT master stay compatible with the actual fp@792: * EtherCAT specification (which are released themselves as an open fp@792: * standard) as the (only) precondition to have the right to use EtherCAT fp@792: * Technology, IP and trade marks. fp@792: * fp@792: *****************************************************************************/ fp@792: fp@792: /** fp@792: \file fp@792: EtherCAT Pdo mapping structure. fp@792: */ fp@792: fp@792: /*****************************************************************************/ fp@792: fp@792: #ifndef _EC_PDO_MAPPING_H_ fp@792: #define _EC_PDO_MAPPING_H_ fp@792: fp@792: #include fp@792: fp@792: #include "../include/ecrt.h" fp@792: fp@792: #include "globals.h" fp@818: #include "pdo.h" fp@792: fp@792: /*****************************************************************************/ fp@792: fp@814: /** EtherCAT Pdo mapping. fp@792: */ fp@792: typedef struct { fp@792: struct list_head pdos; /**< List of Pdos. */ fp@792: unsigned int default_mapping; /**< This is the default mapping. */ fp@792: } ec_pdo_mapping_t; fp@792: fp@792: /*****************************************************************************/ fp@792: fp@792: void ec_pdo_mapping_init(ec_pdo_mapping_t *); fp@792: void ec_pdo_mapping_clear(ec_pdo_mapping_t *); fp@792: fp@792: void ec_pdo_mapping_clear_pdos(ec_pdo_mapping_t *); fp@792: fp@792: int ec_pdo_mapping_add_pdo(ec_pdo_mapping_t *, const ec_pdo_t *); fp@792: int ec_pdo_mapping_add_pdo_info(ec_pdo_mapping_t *, const ec_pdo_info_t *, fp@792: const ec_slave_config_t *); fp@792: fp@792: int ec_pdo_mapping_copy(ec_pdo_mapping_t *, const ec_pdo_mapping_t *); fp@792: fp@792: uint16_t ec_pdo_mapping_total_size(const ec_pdo_mapping_t *); fp@792: int ec_pdo_mapping_equal(const ec_pdo_mapping_t *, const ec_pdo_mapping_t *); fp@792: fp@799: const ec_pdo_t *ec_pdo_mapping_find_pdo(const ec_pdo_mapping_t *, uint16_t); fp@799: fp@792: /*****************************************************************************/ fp@792: fp@792: #endif