Details | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 59 | jimmy | 1 | /** |
| 2 | * Configuration file for the CAN.C software module. |
||
| 3 | */ |
||
| 4 | |||
| 5 | #ifndef CAN_CFG_H_ |
||
| 6 | #define CAN_CFG_H_ |
||
| 7 | |||
| 8 | /*----------------------------------------------------------------------------- |
||
| 9 | * Defines |
||
| 10 | *---------------------------------------------------------------------------*/ |
||
| 11 | |||
| 12 | /** |
||
| 142 | jimmy | 13 | * CAN controller. Determines which CAN controller hardware is used. The |
| 14 | * supported controllers are listed in can.h. |
||
| 59 | jimmy | 15 | */ |
| 142 | jimmy | 16 | #define CAN_CONTROLLER CAN_CONTROLLER_MCP2515 |
| 17 | //#define CAN_CONTROLLER CAN_CONTROLLER_NULL |
||
| 59 | jimmy | 18 | |
| 19 | |||
| 127 | jimmy | 20 | /** |
| 21 | * CAN bitrate. Possible bitrates are listed in can.h. |
||
| 22 | */ |
||
| 421 | eqlazer | 23 | #define CAN_BITRATE CAN_BITRATE_250K |
| 127 | jimmy | 24 | |
| 25 | |||
| 142 | jimmy | 26 | /** |
| 27 | * Size of the CAN message reception queue (in terms of number of CAN messages). |
||
| 28 | * Set to 0 to completely disable the TX queue mechanism (messages will be sent |
||
| 29 | * directly to the controller). |
||
| 30 | */ |
||
| 31 | #define CAN_QUEUE_SIZE_RX 8 |
||
| 32 | |||
| 33 | |||
| 34 | /** |
||
| 35 | * Size of the CAN message transmission queue (in terms of number of CAN messages). |
||
| 36 | * Set to 0 to completely disable the RX queue mechanism (messages are received |
||
| 37 | * directly from the controller rather from a reception queue). |
||
| 38 | */ |
||
| 39 | #define CAN_QUEUE_SIZE_TX 4 |
||
| 40 | |||
| 41 | |||
| 42 | /** |
||
| 43 | * Number of transmit buffers available in the CAN controller hardware. This |
||
| 44 | * information is needed in order to optimize the loop that empties the TX |
||
| 45 | * queue in each service call. |
||
| 46 | */ |
||
| 47 | #define CAN_CONTROLLER_NR_TX_BUFFERS 3 |
||
| 48 | |||
| 49 | |||
| 50 | /** |
||
| 51 | * Number of receive buffers available in the CAN controller hardware. This |
||
| 52 | * information is needed in order to optimize the loop that fetches new |
||
| 53 | * messages from the controller and puts them into the RX queue. |
||
| 54 | */ |
||
| 55 | #define CAN_CONTROLLER_NR_RX_BUFFERS 2 |
||
| 56 | |||
| 57 | |||
| 59 | jimmy | 58 | #endif /*CAN_CFG_H_*/ |