can.h

Go to the documentation of this file.
00001 /*
00002 This file is part of CanFestival, a library implementing CanOpen Stack. 
00003 
00004 Copyright (C): Edouard TISSERANT and Francis DUPIN
00005 
00006 See COPYING file for copyrights details.
00007 
00008 This library is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU Lesser General Public
00010 License as published by the Free Software Foundation; either
00011 version 2.1 of the License, or (at your option) any later version.
00012 
00013 This library is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 Lesser General Public License for more details.
00017 
00018 You should have received a copy of the GNU Lesser General Public
00019 License along with this library; if not, write to the Free Software
00020 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 */
00022 
00023 #ifndef __can_h__
00024 #define __can_h__
00025 
00026 #include "applicfg.h"
00028 /*
00029 union SHORT_CAN {
00030   struct { UNS8 b0,b1; } b;
00031   UNS32 w;
00032 };
00033 */
00034 
00035 typedef struct {
00036   UNS32 w; /* 32 bits */
00037 } SHORT_CAN;
00038 
00039 
00041 typedef struct {
00042   SHORT_CAN cob_id;     /* l'ID du mesg */
00043   UNS8 rtr;                     /* remote transmission request. 0 if not rtr, 
00044                    1 for a rtr message */
00045   UNS8 len;                     /* message length (0 to 8) */
00046   UNS8 data[8]; /* data */
00047 } Message;
00048 
00049 #define Message_Initializer {0,0,0,{0,0,0,0,0,0,0,0}}
00050 
00051 typedef UNS8 (*canSend_t)(Message *);
00052 
00053 #endif /* __can_h__ */

Generated on Mon Jul 2 19:10:16 2007 for CanFestival by  doxygen 1.5.1