Sam Grove / Mbed 2 deprecated canopen_masternode

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers applicfg.h Source File

applicfg.h

00001 /*
00002 This file is part of CanFestival, a library implementing CanOpen Stack.
00003 
00004 Copyright (C): Edouard TISSERANT and Francis DUPIN
00005 AVR Port: Andreas GLAUSER and Peter CHRISTEN
00006 mbed port: sgrove
00007 
00008 See COPYING file for copyrights details.
00009 
00010 This library is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU Lesser General Public
00012 License as published by the Free Software Foundation; either
00013 version 2.1 of the License, or (at your option) any later version.
00014 
00015 This library is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 Lesser General Public License for more details.
00019 
00020 You should have received a copy of the GNU Lesser General Public
00021 License along with this library; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 
00025 #ifndef __APPLICFG__
00026 #define __APPLICFG__
00027 
00028 #include <string.h>
00029 #include <stdio.h>
00030 #include <stdint.h>
00031 
00032 // Integers
00033 #define INTEGER8    signed char
00034 #define INTEGER16   signed short int
00035 #define INTEGER24
00036 #define INTEGER32   signed int
00037 #define INTEGER40
00038 #define INTEGER48
00039 #define INTEGER56
00040 #define INTEGER64   signed __int64
00041 
00042 // Unsigned integers
00043 #define UNS8        unsigned char
00044 #define UNS16       unsigned short int
00045 #define UNS32       unsigned int
00046 /*
00047 #define UNS24
00048 #define UNS40
00049 #define UNS48
00050 #define UNS56
00051 #define UNS64
00052 */ 
00053 
00054 
00055 // Reals
00056 #define REAL32      float
00057 #define REAL64      double
00058 
00059 #include "canopen_can.h"
00060 
00061 // MSG functions
00062 // not finished, the strings have to be placed to the flash and printed out 
00063 // using the printf_P function
00064 /// Definition of MSG_ERR
00065 // ---------------------
00066 #ifdef DEBUG_ERR_CONSOLE_ON
00067 #define MSG_ERR(num, str, val)  \
00068           printf(num, ' ');     \
00069           printf(str);          \
00070           printf(val);          \
00071           printf('\n');
00072 #else
00073 #    define MSG_ERR(num, str, val)
00074 #endif
00075 
00076 /// Definition of MSG_WAR
00077 // ---------------------
00078 #ifdef DEBUG_WAR_CONSOLE_ON
00079 #define MSG_WAR(num, str, val)  \
00080           printf(num, ' ');     \
00081           printf(str);          \
00082           printf(val);          \
00083           printf('\n');
00084 #else
00085 #    define MSG_WAR(num, str, val)
00086 #endif
00087 
00088 typedef void* CAN_HANDLE;
00089 
00090 typedef void* CAN_PORT;
00091 
00092 #endif
00093 
00094