/*******************************************************************************
 * %LICENSE_PROPRIETARY%
 * INTEL CONFIDENTIAL
 * Copyright 2007,2008,2009 Intel Corporation All Rights Reserved.
 * 
 * The source code contained or described herein and all documents related to the
 * source code ("Material") are owned by Intel Corporation or its suppliers or
 * licensors. Title to the Material remains with Intel Corporation or its
 * suppliers and licensors. The Material may contain trade secrets and proprietary
 * and confidential information of Intel Corporation and its suppliers and
 * licensors, and is protected by worldwide copyright and trade secret laws and
 * treaty provisions. No part of the Material may be used, copied, reproduced,
 * modified, published, uploaded, posted, transmitted, distributed, or disclosed
 * in any way without Intels prior express written permission.
 * No license under any patent, copyright, trade secret or other intellectual
 * property right is granted to or conferred upon you by disclosure or delivery
 * of the Materials, either expressly, by implication, inducement, estoppel or
 * otherwise. Any license under such intellectual property rights must be
 * express and approved by Intel in writing.
 * 
 * Include any supplier copyright notices as supplier requires Intel to use.
 * Include supplier trademarks or logos as supplier requires Intel to use,
 * preceded by an asterisk.
 * An asterisked footnote can be added as follows: 
 *   *Third Party trademarks are the property of their respective owners.
 * 
 * Unless otherwise agreed by Intel in writing, you may not remove or alter this
 * notice or any other notice embedded in Materials by Intel or Intels suppliers
 * or licensors in any way.
 * 
 *  version: Embedded.X.1.0.3-127
 *******************************************************************************/

#ifndef __CAN_USER_H__
#define __CAN_USER_H__

/*******************************************************************************
 * Device IO control codes.
 *******************************************************************************/

#define IOCTL_CAN_BASE	0x8000

#define ICP_CAN_IO_RESET \
	CTL_CODE(IOCTL_CAN_BASE, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_RUN \
   CTL_CODE(IOCTL_CAN_BASE, 0x801, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_STOP \
   CTL_CODE(IOCTL_CAN_BASE, 0x802, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_RUN_GET \
   CTL_CODE(IOCTL_CAN_BASE, 0x803, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_FILTER \
   CTL_CODE(IOCTL_CAN_BASE, 0x804, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_FILTER_GET \
   CTL_CODE(IOCTL_CAN_BASE, 0x805, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_CUSTOM \
   CTL_CODE(IOCTL_CAN_BASE, 0x806, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_SIMPLE \
   CTL_CODE(IOCTL_CAN_BASE, 0x807, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_TIMING_GET \
   CTL_CODE(IOCTL_CAN_BASE, 0x808, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_BLOCK \
   CTL_CODE(IOCTL_CAN_BASE, 0x809, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_NON_BLOCK \
   CTL_CODE(IOCTL_CAN_BASE, 0x80a, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_BLOCK_GET \
   CTL_CODE(IOCTL_CAN_BASE, 0x80b, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_LISTEN \
   CTL_CODE(IOCTL_CAN_BASE, 0x80c, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_ACTIVE \
   CTL_CODE(IOCTL_CAN_BASE, 0x80d, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_LISTEN_GET \
   CTL_CODE(IOCTL_CAN_BASE, 0x80e, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_ARBITER_ROUND_ROBIN \
   CTL_CODE(IOCTL_CAN_BASE, 0x80f, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_ARBITER_FIXED_PRIORITY \
   CTL_CODE(IOCTL_CAN_BASE, 0x810, METHOD_BUFFERED, FILE_ANY_ACCESS)
	 
#define ICP_CAN_IO_ARBITER_GET \
   CTL_CODE(IOCTL_CAN_BASE, 0x811, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_ERROR_STATS_GET \
   CTL_CODE(IOCTL_CAN_BASE, 0x812, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_RESTART_MODE_AUTO \
   CTL_CODE(IOCTL_CAN_BASE, 0x813, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_RESTART_MODE_MANUAL \
   CTL_CODE(IOCTL_CAN_BASE, 0x814, METHOD_BUFFERED, FILE_ANY_ACCESS)	 

#define ICP_CAN_IO_RESTART_MODE_GET \
   CTL_CODE(IOCTL_CAN_BASE, 0x815, METHOD_BUFFERED, FILE_ANY_ACCESS)	 
	 
#define ICP_CAN_IO_BUFFER_LINK_SET \
   CTL_CODE(IOCTL_CAN_BASE, 0x816, METHOD_BUFFERED, FILE_ANY_ACCESS)	 

#define ICP_CAN_IO_BUFFER_LINK_CLEAR \
   CTL_CODE(IOCTL_CAN_BASE, 0x817, METHOD_BUFFERED, FILE_ANY_ACCESS)	 

 #define ICP_CAN_IO_BUFFER_LINK_GET \
   CTL_CODE(IOCTL_CAN_BASE, 0x818, METHOD_BUFFERED, FILE_ANY_ACCESS)
	 
#define ICP_CAN_IO_RX_ENABLE_SET \
   CTL_CODE(IOCTL_CAN_BASE, 0x819, METHOD_BUFFERED, FILE_ANY_ACCESS)	 

#define ICP_CAN_IO_RX_ENABLE_CLEAR \
   CTL_CODE(IOCTL_CAN_BASE, 0x81a, METHOD_BUFFERED, FILE_ANY_ACCESS)	 

 #define ICP_CAN_IO_RX_ENABLE_GET \
   CTL_CODE(IOCTL_CAN_BASE, 0x81b, METHOD_BUFFERED, FILE_ANY_ACCESS)

#define ICP_CAN_IO_TX_ENABLE_SET \
   CTL_CODE(IOCTL_CAN_BASE, 0x81c, METHOD_BUFFERED, FILE_ANY_ACCESS)	 

#define ICP_CAN_IO_TX_ENABLE_CLEAR \
   CTL_CODE(IOCTL_CAN_BASE, 0x81d, METHOD_BUFFERED, FILE_ANY_ACCESS)	 

 #define ICP_CAN_IO_TX_ENABLE_GET \
   CTL_CODE(IOCTL_CAN_BASE, 0x81e, METHOD_BUFFERED, FILE_ANY_ACCESS)

#endif /* __CAN_USER_H__ */
