fp@1255: /****************************************************************************** fp@1255: * fp@1255: * $Id$ fp@1255: * fp@1255: * Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH fp@1255: * fp@1255: * This file is part of the IgH EtherCAT Master. fp@1255: * fp@1255: * The IgH EtherCAT Master is free software; you can redistribute it fp@1255: * and/or modify it under the terms of the GNU General Public License fp@1255: * as published by the Free Software Foundation; either version 2 of the fp@1255: * License, or (at your option) any later version. fp@1255: * fp@1255: * The IgH EtherCAT Master is distributed in the hope that it will be fp@1255: * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of fp@1255: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the fp@1255: * GNU General Public License for more details. fp@1255: * fp@1255: * You should have received a copy of the GNU General Public License fp@1255: * along with the IgH EtherCAT Master; if not, write to the Free Software fp@1255: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@1255: * fp@1255: * The right to use EtherCAT Technology is granted and comes free of fp@1255: * charge under condition of compatibility of product made by fp@1255: * Licensee. People intending to distribute/sell products based on the fp@1255: * code, have to sign an agreement to guarantee that products using fp@1255: * software based on IgH EtherCAT master stay compatible with the actual fp@1255: * EtherCAT specification (which are released themselves as an open fp@1255: * standard) as the (only) precondition to have the right to use EtherCAT fp@1255: * Technology, IP and trade marks. fp@1255: * fp@1255: *****************************************************************************/ fp@1255: fp@1255: /** fp@1255: \file fp@1255: EtherCAT domain methods. fp@1255: */ fp@1255: fp@1255: /*****************************************************************************/ fp@1255: fp@1255: #include "domain.h" fp@1255: fp@1255: /*****************************************************************************/ fp@1255: fp@1255: int ecrt_domain_reg_pdo_entry_list(ec_domain_t *domain, fp@1255: const ec_pdo_entry_reg_t *regs) fp@1255: { fp@1255: const ec_pdo_entry_reg_t *reg; fp@1255: ec_slave_config_t *sc; fp@1255: int ret; fp@1255: fp@1255: for (reg = regs; reg->index; reg++) { fp@1255: if (!(sc = ecrt_master_slave_config(domain->master, reg->alias, fp@1255: reg->position, reg->vendor_id, reg->product_code))) fp@1255: return -1; fp@1255: fp@1255: if ((ret = ecrt_slave_config_reg_pdo_entry(sc, reg->index, fp@1255: reg->subindex, domain, reg->bit_position)) < 0) fp@1255: return -1; fp@1255: fp@1255: *reg->offset = ret; fp@1255: } fp@1255: fp@1255: return 0; fp@1255: } fp@1255: fp@1255: /*****************************************************************************/ fp@1255: fp@1255: uint8_t *ecrt_domain_data(ec_domain_t *domain) fp@1255: { fp@1255: return 0; fp@1255: } fp@1255: fp@1255: /*****************************************************************************/ fp@1255: fp@1255: void ecrt_domain_process(ec_domain_t *domain) fp@1255: { fp@1255: } fp@1255: fp@1255: /*****************************************************************************/ fp@1255: fp@1255: void ecrt_domain_queue(ec_domain_t *domain) fp@1255: { fp@1255: } fp@1255: fp@1255: /*****************************************************************************/ fp@1255: fp@1255: void ecrt_domain_state(const ec_domain_t *domain, ec_domain_state_t *state) fp@1255: { fp@1255: } fp@1255: fp@1255: /*****************************************************************************/