]> rtime.felk.cvut.cz Git - CanFestival-3.git/blob - include/AVR/config.h
fixed : deprecation warning with the module "sets" when using python 2.6
[CanFestival-3.git] / include / AVR / config.h
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 _CONFIG_H_
25 #define _CONFIG_H_
26
27 #ifdef  __IAR_SYSTEMS_ICC__
28 #include <ioavr.h>
29 #include <intrinsics.h>
30 #include "iar.h"
31 #else   // GCC
32 #include <inttypes.h>
33 #include <avr\io.h>
34 #include <avr\interrupt.h>
35 #include <avr/pgmspace.h>
36 #include <avr\sleep.h>
37 #include <avr\wdt.h>
38 #endif  // GCC
39
40 //#define WD_SLEEP
41 // Needed defines by Atmel lib
42 #define FOSC           8000        // 8 MHz External cristal
43 #ifndef F_CPU
44 #define F_CPU          (1000UL*FOSC) // Need for AVR GCC
45 #endif
46 #define CAN_BAUDRATE    125
47
48 // Needed defines by Canfestival lib
49 #define MAX_CAN_BUS_ID 1
50 #define SDO_MAX_LENGTH_TRANSFERT 32
51 #define SDO_MAX_SIMULTANEOUS_TRANSFERTS 1
52 #define NMT_MAX_NODE_ID 128
53 #define SDO_TIMEOUT_MS 3000U
54 #define MAX_NB_TIMER 8
55
56 // CANOPEN_BIG_ENDIAN is not defined
57 #define CANOPEN_LITTLE_ENDIAN 1
58
59 #define US_TO_TIMEVAL_FACTOR 8
60
61 #define REPEAT_SDO_MAX_SIMULTANEOUS_TRANSFERTS_TIMES(repeat)\
62 repeat
63 #define REPEAT_NMT_MAX_NODE_ID_TIMES(repeat)\
64 repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat repeat
65
66 #define EMCY_MAX_ERRORS 8
67 #define REPEAT_EMCY_MAX_ERRORS_TIMES(repeat)\
68 repeat repeat repeat repeat repeat repeat repeat repeat
69
70
71 #endif /* _CONFIG_H_ */