author | mwildbolz |
Mon, 01 Oct 2012 17:01:36 +0200 | |
changeset 750 | bfb63ff7106e |
parent 694 | 8dd1e58b3815 |
permissions | -rw-r--r-- |
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 _CONFIG_H_ |
|
25 |
#define _CONFIG_H_ |
|
26 |
||
675
e5c5101c4f0b
FIXED: - The AVR example now compiles in linux.
Christian Taedcke <hacking@taedcke.com>
parents:
375
diff
changeset
|
27 |
|
375 | 28 |
#ifdef __IAR_SYSTEMS_ICC__ |
29 |
#include <ioavr.h> |
|
30 |
#include <intrinsics.h> |
|
31 |
#include "iar.h" |
|
32 |
#else // GCC |
|
33 |
#include <inttypes.h> |
|
675
e5c5101c4f0b
FIXED: - The AVR example now compiles in linux.
Christian Taedcke <hacking@taedcke.com>
parents:
375
diff
changeset
|
34 |
#include <avr/io.h> |
e5c5101c4f0b
FIXED: - The AVR example now compiles in linux.
Christian Taedcke <hacking@taedcke.com>
parents:
375
diff
changeset
|
35 |
#include <avr/interrupt.h> |
375 | 36 |
#include <avr/pgmspace.h> |
675
e5c5101c4f0b
FIXED: - The AVR example now compiles in linux.
Christian Taedcke <hacking@taedcke.com>
parents:
375
diff
changeset
|
37 |
#include <avr/sleep.h> |
e5c5101c4f0b
FIXED: - The AVR example now compiles in linux.
Christian Taedcke <hacking@taedcke.com>
parents:
375
diff
changeset
|
38 |
#include <avr/wdt.h> |
375 | 39 |
#endif // GCC |
40 |
||
41 |
//#define WD_SLEEP |
|
42 |
// Needed defines by Atmel lib |
|
43 |
#define FOSC 8000 // 8 MHz External cristal |
|
44 |
#ifndef F_CPU |
|
45 |
#define F_CPU (1000UL*FOSC) // Need for AVR GCC |
|
46 |
#endif |
|
47 |
#define CAN_BAUDRATE 125 |
|
48 |
||
49 |
// Needed defines by Canfestival lib |
|
50 |
#define MAX_CAN_BUS_ID 1 |
|
694
8dd1e58b3815
There is no English word "transfert". Fix all the typos.
JaFojtik
parents:
675
diff
changeset
|
51 |
#define SDO_MAX_LENGTH_TRANSFER 32 |
675
e5c5101c4f0b
FIXED: - The AVR example now compiles in linux.
Christian Taedcke <hacking@taedcke.com>
parents:
375
diff
changeset
|
52 |
#define SDO_BLOCK_SIZE 16 |
694
8dd1e58b3815
There is no English word "transfert". Fix all the typos.
JaFojtik
parents:
675
diff
changeset
|
53 |
#define SDO_MAX_SIMULTANEOUS_TRANSFERS 1 |
375 | 54 |
#define NMT_MAX_NODE_ID 128 |
55 |
#define SDO_TIMEOUT_MS 3000U |
|
56 |
#define MAX_NB_TIMER 8 |
|
57 |
||
58 |
// CANOPEN_BIG_ENDIAN is not defined |
|
59 |
#define CANOPEN_LITTLE_ENDIAN 1 |
|
60 |
||
61 |
#define US_TO_TIMEVAL_FACTOR 8 |
|
62 |
||
694
8dd1e58b3815
There is no English word "transfert". Fix all the typos.
JaFojtik
parents:
675
diff
changeset
|
63 |
#define REPEAT_SDO_MAX_SIMULTANEOUS_TRANSFERS_TIMES(repeat)\ |
375 | 64 |
repeat |
65 |
#define REPEAT_NMT_MAX_NODE_ID_TIMES(repeat)\ |
|
66 |
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 |
|
67 |
||
68 |
#define EMCY_MAX_ERRORS 8 |
|
69 |
#define REPEAT_EMCY_MAX_ERRORS_TIMES(repeat)\ |
|
70 |
repeat repeat repeat repeat repeat repeat repeat repeat |
|
71 |
||
72 |
||
73 |
#endif /* _CONFIG_H_ */ |