edouard@629: /* edouard@629: This file is part of CanFestival, a library implementing CanOpen Stack. edouard@629: edouard@629: Copyright (C): Cosateq GmbH & Co.KG edouard@629: http://www.cosateq.com/ edouard@629: http://www.scale-rt.com/ edouard@629: edouard@629: See COPYING file for copyrights details. edouard@629: edouard@629: This library is free software; you can redistribute it and/or edouard@629: modify it under the terms of the GNU Lesser General Public edouard@629: License as published by the Free Software Foundation; either edouard@629: version 2.1 of the License, or (at your option) any later version. edouard@629: edouard@629: This library is distributed in the hope that it will be useful, edouard@629: but WITHOUT ANY WARRANTY; without even the implied warranty of edouard@629: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU edouard@629: Lesser General Public License for more details. edouard@629: edouard@629: You should have received a copy of the GNU Lesser General Public edouard@629: License along with this library; if not, write to the Free Software edouard@629: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA edouard@629: */ edouard@629: edouard@629: /* edouard@629: CAN driver interface for CO-PCICAN card. edouard@629: */ edouard@629: edouard@629: #ifndef _CO_PCICANOPS_ edouard@629: #define _CO_PCICANOPS_ edouard@629: edouard@629: #define NUM_CAN_CHANNELS 4 edouard@629: edouard@629: #define CMDQ_OPC_ENTER_RUN_MODE 0x01 edouard@629: #define CMDQ_OPC_ENTER_CONFIG_MODE 0x02 edouard@629: #define CMDQ_OPC_SET_CONFIG_CHANNEL 0xA2 edouard@629: edouard@629: typedef struct edouard@629: { edouard@629: unsigned char opcode; edouard@629: unsigned long param[15]; edouard@629: } co_pcican_config_t; edouard@629: edouard@629: typedef struct edouard@629: { edouard@629: unsigned char channelnum; edouard@629: unsigned long type; edouard@629: unsigned long size; edouard@629: unsigned long id; edouard@629: unsigned char data[8]; edouard@629: unsigned long timestamp_lo; edouard@629: unsigned long timestamp_hi; edouard@629: } co_pcican_message_t; edouard@629: edouard@629: /*============================================================================= edouard@629: supported operations edouard@629: ===========================================================================*/ edouard@629: #define CAN_CONFIG 2 edouard@629: #define CAN_WRITE 3 edouard@629: #define CAN_READ 4 edouard@629: edouard@629: /*============================================================================= edouard@629: directions edouard@629: ===========================================================================*/ edouard@629: #define RX 0 edouard@629: #define TX 1 edouard@629: edouard@629: /*============================================================================= edouard@629: supported types edouard@629: ===========================================================================*/ edouard@629: #define MSG_EXT 0x00000001 edouard@629: #define MSG_RTR 0x00000002 edouard@629: edouard@629: edouard@629: edouard@629: #endif edouard@629: