diff -r 003cc3c63855 -r f49e5a6b7804 doc/doxygen/html/TestMasterSlave_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/doxygen/html/TestMasterSlave_8h-source.html Fri Jun 08 09:23:56 2007 +0200 @@ -0,0 +1,86 @@ + + +CanFestival: examples/TestMasterSlave/TestMasterSlave.h Source File + + + + +
+
+
+
+ +

TestMasterSlave.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 #ifdef USE_XENO
+00023 //#define eprintf(...) if(0){}
+00024 #define eprintf(...)
+00025 #else
+00026 #define eprintf(...) printf (__VA_ARGS__)
+00027 #endif
+00028 void print_message(Message *m);
+00029 
+00030 /*UNS8 canSend(CAN_HANDLE fd0, Message *m);*/
+00031 
+00032 #include "canfestival.h"
+00033 
+00034 /*
+00035 #define CAN_FIFO_LENGTH 100
+00036 
+00037 #define DECLARE_A_CAN_FIFO \
+00038 static Message FIFO[CAN_FIFO_LENGTH];\
+00039 static int FIFO_First = 0;\
+00040 static int FIFO_Last = 0;\
+00041 \
+00042 static void PutInFIFO(Message *m)\
+00043 {\
+00044         FIFO[FIFO_Last++] = *m;\
+00045         FIFO_Last %= CAN_FIFO_LENGTH;\
+00046 }\
+00047 \
+00048 static void GetFromFIFO(Message *m)\
+00049 {\
+00050         *m = FIFO[FIFO_First++];\
+00051         FIFO_First %= CAN_FIFO_LENGTH;\
+00052 }\
+00053 \
+00054 static void TransmitMessage(CO_Data* d, UNS32 id)\
+00055 {\
+00056         Message m;\
+00057         GetFromFIFO(&m);\
+00058         canDispatch(d, &m);\
+00059 }
+00060 */
+

Generated on Fri Jun 8 08:51:39 2007 for CanFestival by  + +doxygen 1.5.1
+ +