drivers/can_copcican_comedi/co_pcicanops.h
author fbeaulier
Mon, 29 Aug 2011 17:31:55 +0200
changeset 665 90e6cf84a0d7
parent 629 b9274b595650
permissions -rw-r--r--
patch from Christian Taedcke <hacking@taedcke.com> : fix-wrong-resetSDOline-for-sdo-timeout.patch
FIXED: - The sdo line must not be closed at the end of SDOTimeoutAlarm() if the same sdo line is closed and reopened for a new transfer inside the callback. (Patch from Jaroslav Fojtik)
629
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     1
/*
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     2
This file is part of CanFestival, a library implementing CanOpen Stack.
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     3
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     4
Copyright (C): Cosateq GmbH & Co.KG
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     5
               http://www.cosateq.com/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     6
               http://www.scale-rt.com/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     7
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     8
See COPYING file for copyrights details.
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     9
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    10
This library is free software; you can redistribute it and/or
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    11
modify it under the terms of the GNU Lesser General Public
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    12
License as published by the Free Software Foundation; either
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    13
version 2.1 of the License, or (at your option) any later version.
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    14
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    15
This library is distributed in the hope that it will be useful,
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    16
but WITHOUT ANY WARRANTY; without even the implied warranty of
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    18
Lesser General Public License for more details.
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    19
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    20
You should have received a copy of the GNU Lesser General Public
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    21
License along with this library; if not, write to the Free Software
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    22
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    23
*/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    24
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    25
/*
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    26
	COMEDI interface for CO-PCICAN card.
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    27
*/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    28
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    29
#ifndef _CO_PCICANOPS_
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    30
#define _CO_PCICANOPS_
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    31
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    32
#define NUM_CAN_CHANNELS 4
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    33
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    34
#define CMDQ_OPC_ENTER_RUN_MODE     0x01
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    35
#define CMDQ_OPC_ENTER_CONFIG_MODE  0x02
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    36
#define CMDQ_OPC_SET_CONFIG_CHANNEL 0xA2
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    37
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    38
typedef struct message_t
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    39
{
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    40
  unsigned long type;
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    41
  unsigned long size;
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    42
  unsigned long id;
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    43
  unsigned char data[8];
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    44
  unsigned long timestamp_lo;
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    45
  unsigned long timestamp_hi;
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    46
} MESSAGE_T;
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    47
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    48
/*=============================================================================
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    49
  directions
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    50
  ===========================================================================*/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    51
#define RX         0
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    52
#define TX         1
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    53
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    54
/*=============================================================================
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    55
  supported types
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    56
  ===========================================================================*/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    57
#define MSG_EXT    0x00000001
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    58
#define MSG_RTR    0x00000002
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    59
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    60
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    61
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    62
#endif
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    63