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