fp@2589: /****************************************************************************** fp@2589: * fp@2589: * $Id$ fp@2589: * fp@2589: * Copyright (C) 2012 Florian Pose, Ingenieurgemeinschaft IgH fp@2589: * fp@2589: * This file is part of the IgH EtherCAT Master. fp@2589: * fp@2589: * The IgH EtherCAT Master is free software; you can redistribute it and/or fp@2589: * modify it under the terms of the GNU General Public License version 2, as fp@2589: * published by the Free Software Foundation. fp@2589: * fp@2589: * The IgH EtherCAT Master is distributed in the hope that it will be useful, fp@2589: * but WITHOUT ANY WARRANTY; without even the implied warranty of fp@2589: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General fp@2589: * Public License for more details. fp@2589: * fp@2589: * You should have received a copy of the GNU General Public License along fp@2589: * with the IgH EtherCAT Master; if not, write to the Free Software fp@2589: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@2589: * fp@2589: * --- fp@2589: * fp@2589: * The license mentioned above concerns the source code only. Using the fp@2589: * EtherCAT technology and brand is only permitted in compliance with the fp@2589: * industrial property and similar rights of Beckhoff Automation GmbH. fp@2589: * fp@2589: *****************************************************************************/ fp@2589: fp@2589: /** fp@2589: \file fp@2589: EtherCAT register request structure. fp@2589: */ fp@2589: fp@2589: /*****************************************************************************/ fp@2589: fp@2589: #ifndef __EC_REG_REQUEST_H__ fp@2589: #define __EC_REG_REQUEST_H__ fp@2589: fp@2589: #include fp@2589: fp@2589: #include "globals.h" fp@2589: fp@2589: /*****************************************************************************/ fp@2589: fp@2589: /** Register request. fp@2589: */ fp@2589: struct ec_reg_request { fp@2589: struct list_head list; /**< List item. */ fp@2589: size_t mem_size; /**< Size of data memory. */ fp@2589: uint8_t *data; /**< Pointer to data memory. */ fp@2589: ec_direction_t dir; /**< Direction. EC_DIR_OUTPUT means writing to the fp@2589: slave, EC_DIR_INPUT means reading from the slave. */ fp@2589: uint16_t address; /**< Register address. */ fp@2589: size_t transfer_size; /**< Size of the data to transfer. */ fp@2589: ec_internal_request_state_t state; /**< Request state. */ fp@2589: uint16_t ring_position; /**< Ring position for emergency requests. */ fp@2589: }; fp@2589: fp@2589: /*****************************************************************************/ fp@2589: fp@2589: int ec_reg_request_init(ec_reg_request_t *, size_t); fp@2589: void ec_reg_request_clear(ec_reg_request_t *); fp@2589: fp@2589: /*****************************************************************************/ fp@2589: fp@2589: #endif