Sam Grove
/
canopen_slavenode
CANfestival - an open source CANopen framework
framework/include/mbed/applicfg.h@6:bc64031ac849, 2012-09-26 (annotated)
- Committer:
- sam_grove
- Date:
- Wed Sep 26 05:43:05 2012 +0000
- Revision:
- 6:bc64031ac849
- Parent:
- 2:e0be90742924
Change a typecast in can_mbed.cpp from unit8_t * to char * to fit the CANMessage constructor
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sam_grove |
0:6219434a0cb5 | 1 | /* |
sam_grove |
0:6219434a0cb5 | 2 | This file is part of CanFestival, a library implementing CanOpen Stack. |
sam_grove |
0:6219434a0cb5 | 3 | |
sam_grove |
0:6219434a0cb5 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN |
sam_grove |
0:6219434a0cb5 | 5 | AVR Port: Andreas GLAUSER and Peter CHRISTEN |
sam_grove |
0:6219434a0cb5 | 6 | mbed port: sgrove |
sam_grove |
0:6219434a0cb5 | 7 | |
sam_grove |
0:6219434a0cb5 | 8 | See COPYING file for copyrights details. |
sam_grove |
0:6219434a0cb5 | 9 | |
sam_grove |
0:6219434a0cb5 | 10 | This library is free software; you can redistribute it and/or |
sam_grove |
0:6219434a0cb5 | 11 | modify it under the terms of the GNU Lesser General Public |
sam_grove |
0:6219434a0cb5 | 12 | License as published by the Free Software Foundation; either |
sam_grove |
0:6219434a0cb5 | 13 | version 2.1 of the License, or (at your option) any later version. |
sam_grove |
0:6219434a0cb5 | 14 | |
sam_grove |
0:6219434a0cb5 | 15 | This library is distributed in the hope that it will be useful, |
sam_grove |
0:6219434a0cb5 | 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
sam_grove |
0:6219434a0cb5 | 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
sam_grove |
0:6219434a0cb5 | 18 | Lesser General Public License for more details. |
sam_grove |
0:6219434a0cb5 | 19 | |
sam_grove |
0:6219434a0cb5 | 20 | You should have received a copy of the GNU Lesser General Public |
sam_grove |
0:6219434a0cb5 | 21 | License along with this library; if not, write to the Free Software |
sam_grove |
0:6219434a0cb5 | 22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
sam_grove |
0:6219434a0cb5 | 23 | */ |
sam_grove |
0:6219434a0cb5 | 24 | |
sam_grove |
0:6219434a0cb5 | 25 | #ifndef __APPLICFG__ |
sam_grove |
0:6219434a0cb5 | 26 | #define __APPLICFG__ |
sam_grove |
0:6219434a0cb5 | 27 | |
sam_grove |
0:6219434a0cb5 | 28 | #include <string.h> |
sam_grove |
0:6219434a0cb5 | 29 | #include <stdio.h> |
sam_grove |
0:6219434a0cb5 | 30 | #include <stdint.h> |
sam_grove |
0:6219434a0cb5 | 31 | |
sam_grove |
0:6219434a0cb5 | 32 | // Integers |
sam_grove |
0:6219434a0cb5 | 33 | #define INTEGER8 signed char |
sam_grove |
0:6219434a0cb5 | 34 | #define INTEGER16 signed short int |
sam_grove |
0:6219434a0cb5 | 35 | #define INTEGER24 |
sam_grove |
0:6219434a0cb5 | 36 | #define INTEGER32 signed int |
sam_grove |
0:6219434a0cb5 | 37 | #define INTEGER40 |
sam_grove |
0:6219434a0cb5 | 38 | #define INTEGER48 |
sam_grove |
0:6219434a0cb5 | 39 | #define INTEGER56 |
sam_grove |
0:6219434a0cb5 | 40 | #define INTEGER64 signed __int64 |
sam_grove |
0:6219434a0cb5 | 41 | |
sam_grove |
0:6219434a0cb5 | 42 | // Unsigned integers |
sam_grove |
0:6219434a0cb5 | 43 | #define UNS8 unsigned char |
sam_grove |
0:6219434a0cb5 | 44 | #define UNS16 unsigned short int |
sam_grove |
2:e0be90742924 | 45 | #define UNS32 unsigned int |
sam_grove |
0:6219434a0cb5 | 46 | /* |
sam_grove |
0:6219434a0cb5 | 47 | #define UNS24 |
sam_grove |
0:6219434a0cb5 | 48 | #define UNS40 |
sam_grove |
0:6219434a0cb5 | 49 | #define UNS48 |
sam_grove |
0:6219434a0cb5 | 50 | #define UNS56 |
sam_grove |
0:6219434a0cb5 | 51 | #define UNS64 |
sam_grove |
0:6219434a0cb5 | 52 | */ |
sam_grove |
0:6219434a0cb5 | 53 | |
sam_grove |
0:6219434a0cb5 | 54 | |
sam_grove |
0:6219434a0cb5 | 55 | // Reals |
sam_grove |
2:e0be90742924 | 56 | #define REAL32 float |
sam_grove |
2:e0be90742924 | 57 | #define REAL64 double |
sam_grove |
0:6219434a0cb5 | 58 | |
sam_grove |
0:6219434a0cb5 | 59 | #include "canopen_can.h" |
sam_grove |
0:6219434a0cb5 | 60 | |
sam_grove |
0:6219434a0cb5 | 61 | // MSG functions |
sam_grove |
0:6219434a0cb5 | 62 | // not finished, the strings have to be placed to the flash and printed out |
sam_grove |
0:6219434a0cb5 | 63 | // using the printf_P function |
sam_grove |
0:6219434a0cb5 | 64 | /// Definition of MSG_ERR |
sam_grove |
0:6219434a0cb5 | 65 | // --------------------- |
sam_grove |
0:6219434a0cb5 | 66 | #ifdef DEBUG_ERR_CONSOLE_ON |
sam_grove |
2:e0be90742924 | 67 | #define MSG_ERR(num, str, val) \ |
sam_grove |
2:e0be90742924 | 68 | printf(num, ' '); \ |
sam_grove |
2:e0be90742924 | 69 | printf(str); \ |
sam_grove |
2:e0be90742924 | 70 | printf(val); \ |
sam_grove |
0:6219434a0cb5 | 71 | printf('\n'); |
sam_grove |
0:6219434a0cb5 | 72 | #else |
sam_grove |
0:6219434a0cb5 | 73 | # define MSG_ERR(num, str, val) |
sam_grove |
0:6219434a0cb5 | 74 | #endif |
sam_grove |
0:6219434a0cb5 | 75 | |
sam_grove |
0:6219434a0cb5 | 76 | /// Definition of MSG_WAR |
sam_grove |
0:6219434a0cb5 | 77 | // --------------------- |
sam_grove |
0:6219434a0cb5 | 78 | #ifdef DEBUG_WAR_CONSOLE_ON |
sam_grove |
2:e0be90742924 | 79 | #define MSG_WAR(num, str, val) \ |
sam_grove |
2:e0be90742924 | 80 | printf(num, ' '); \ |
sam_grove |
2:e0be90742924 | 81 | printf(str); \ |
sam_grove |
2:e0be90742924 | 82 | printf(val); \ |
sam_grove |
0:6219434a0cb5 | 83 | printf('\n'); |
sam_grove |
0:6219434a0cb5 | 84 | #else |
sam_grove |
0:6219434a0cb5 | 85 | # define MSG_WAR(num, str, val) |
sam_grove |
0:6219434a0cb5 | 86 | #endif |
sam_grove |
0:6219434a0cb5 | 87 | |
sam_grove |
0:6219434a0cb5 | 88 | typedef void* CAN_HANDLE; |
sam_grove |
0:6219434a0cb5 | 89 | |
sam_grove |
0:6219434a0cb5 | 90 | typedef void* CAN_PORT; |
sam_grove |
0:6219434a0cb5 | 91 | |
sam_grove |
0:6219434a0cb5 | 92 | #endif |
sam_grove |
0:6219434a0cb5 | 93 | |
sam_grove |
0:6219434a0cb5 | 94 |