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