src/config.h
Go to the documentation of this file.
1 #ifndef CONFIG_H
2 #define CONFIG_H
3 
4 #warning "Default config.h used!"
5 #define CAN_CONFIG_LOADED
6 
7 // -----------------------------------------------------------------------------
8 /* Global settings for building the can-lib and application program.
9  *
10  * The following two #defines must be set identically for the can-lib and
11  * your application program. They control the underlying CAN struct. If the
12  * settings disagree, the underlying CAN struct will be broken, with
13  * unpredictable results.
14  * If can.h detects that any of the #defines is not defined, it will set them
15  * to the default values shown here, so it is in your own interest to have a
16  * consistent setting. Ommiting the #defines in both can-lib and application
17  * program will apply the defaults in a consistent way too.
18  *
19  * Select if you want to use 29 bit identifiers.
20  */
21 #define SUPPORT_EXTENDED_CANID 1
22 
23 /* Select if you want to use timestamps.
24  * Timestamps are sourced from a register internal to the AT90CAN.
25  * Selecting them on any other controller will have no effect, they will
26  * be 0 all the time.
27  */
28 #define SUPPORT_TIMESTAMPS 0
29 
30 
31 // -----------------------------------------------------------------------------
32 /* Global settings for building the can-lib.
33  *
34  * Select ONE CAN controller for which you are building the can-lib.
35  */
36 #define SUPPORT_MCP2515 1
37 #define SUPPORT_AT90CAN 0
38 #define SUPPORT_SJA1000 0
39 
40 
41 // -----------------------------------------------------------------------------
42 /* Setting for MCP2515
43  *
44  * Declare which pins you are using for communication.
45  * Remember NOT to use them in your application!
46  * It is a good idea to use bits from the port that carries MOSI, MISO, SCK.
47  */
48 #define MCP2515_CS B,4
49 #define MCP2515_INT B,2
50 
51 // -----------------------------------------------------------------------------
52 // Setting for SJA1000
53 
54 #define SJA1000_INT E,0
55 #define SJA1000_MEMORY_MAPPED 1
56 
57 // memory-mapped interface
58 #define SJA1000_BASE_ADDR 0x8000 // for ATMega162
59 
60 /*
61 // port-interface
62 #define SJA1000_WR D,6
63 #define SJA1000_RD D,7
64 
65 #define SJA1000_ALE E,1
66 #define SJA1000_CS C,0
67 #define SJA1000_DATA A
68 */
69 
70 // -----------------------------------------------------------------------------
71 // Setting for AT90CAN
72 
73 // Number of CAN messages which are buffered in RAM additinally to the MObs
74 #define CAN_RX_BUFFER_SIZE 16
75 #define CAN_TX_BUFFER_SIZE 8
76 
77 // only available if CAN_TX_BUFFER_SIZE > 0
78 #define CAN_FORCE_TX_ORDER 1
79 
80 #endif // CONFIG_H


uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:02