00001 /********************************************************* 00002 * * 00003 * Advanced Ring Buffer Redundant Application for CAN * 00004 * * 00005 ********************************************************* 00006 * ArbraCan.c * 00007 ********************************************************* 00008 * This program is free software; you can redistribute * 00009 * it and/or modify it under the terms of the GNU General* 00010 * Public License as published by the Free Software * 00011 * Foundation; either version 2 of the License, or (at * 00012 * your option) any later version. * 00013 * * 00014 * This program is distributed in the hope that it will * 00015 * be useful, but WITHOUT ANY WARRANTY; without even the * 00016 * implied warranty of MERCHANTABILITY or FITNESS FOR A * 00017 * PARTICULAR PURPOSE. See the GNU General Public * 00018 * License for more details. * 00019 * * 00020 * You should have received a copy of the GNU General * 00021 * Public License along with this program; if not, write * 00022 * to The Free Software Foundation, Inc. * 00023 * 675 Mass Ave * 00024 * Cambridge * 00025 * MA 02139 * 00026 * USA. * 00027 ********************************************************* 00028 * * 00029 * Author: Edouard TISSERANT * 00030 * Contact: edouard.tisserant@esstin.u-nancy.fr * 00031 * Version: 1.0 * 00032 * Modification date: * 00033 * Description: * 00034 *-------------------------------------------------------* 00035 * Header file for ArbraCan.c and structure definitions * 00036 * to communicate with it. * 00037 * * 00038 *********************************************************/ 00039 00040 #define MESS_BUFF_SIZE 256 00041 #define PRIORITY_LEVELS 8 00042 00043 /* ioctl's for canboard. */ 00044 #define SCHAR_MAJOR 91 00045 #define CANBOARD_IOCTL_BASE 0x7a 00046 #define CANBOARD_READ _IOR(CANBOARD_IOCTL_BASE, 0, unsigned long) 00047 #define CANBOARD_WRITE _IOW(CANBOARD_IOCTL_BASE, 2, unsigned long) 00048 #define CANBOARD_STATUS _IOR(CANBOARD_IOCTL_BASE, 4, unsigned long) 00049 00050 /* No blocking access in RealTime OS*/ 00051 #define CANBOARD_READ_BLOCK _IOR(CANBOARD_IOCTL_BASE, 1, unsigned long) 00052 #define CANBOARD_WRITE_BLOCK _IOW(CANBOARD_IOCTL_BASE, 3, unsigned long) 00053 00054 #define Rx 0 00055 #define Tx 1