config.h
Go to the documentation of this file.
00001 /***********************************************************************/
00012 #ifndef CONFIG_H_
00013 #define CONFIG_H_
00014 
00015 /*
00016  * This file contains all constants named CONFIG_*.
00017  *
00018  * Prefix naming convention:
00019  * A prefix of CONFIG_ suggests that it is something
00020  * the application designer probably wants to tweak.
00021  * A prefix of BUS_ indicates that it is something going on on the CAN bus.
00022  */
00023 
00024  
00029 #define BUS_ARBITRATOR                  1
00030 #define BUS_DEVICE                      0
00031 #ifndef CONFIG_BUS_MODE
00032 #       define CONFIG_BUS_MODE          BUS_DEVICE
00033 #endif
00034 
00035 
00036 #define CONFIG_USE_MALLOC       1
00037 
00042 #define CONFIG_NUM_CANMSG 8
00043 
00048 #define CONFIG_TRIE_BITS_PER_NODE 2
00049 
00053 #define CONFIG_VENDOR_ID     1
00054 #define CONFIG_PRODUCT_ID    2
00055 #define CONFIG_SERIAL_NUMBER 3
00056 
00057 #ifndef F_CPU
00058 #       define F_CPU 16000000
00059 #endif
00060 
00061 
00062 
00063 
00064 
00065 
00066 
00067 
00068 /* ======================================================== */
00069 /*                                                      HAL                                                             */
00070 /* ======================================================== */
00071 
00080 #define CONFIG_DEVICE_DEF_ID            0xFF
00081 
00086 #define CONFIG_ARB_DEF_ID                       0x01
00087 
00088 
00089 
00090 
00091 
00107 #define         HW_CS_MCP2515_PORT                      DATA_PORT_B
00108 #define         HW_CS_MCP2515                           B0
00109 #define         HW_CS_MCP2515_DDR                       DATA_DIR_REG_B
00110  
00111  
00137 #define         HW_MISO_MCP2515                         B3
00138 #define         HW_MOSI_MCP2515                         B2
00139 #define         HW_MISO_MCP2515_DDR                     DATA_DIR_REG_B
00140 #define         HW_MISO_MCP2515_PIN                     PORT_INPUT_PIN_B
00141 #define         HW_MOSI_MCP2515_DDR                     DATA_DIR_REG_B
00142 #define         HW_MOSI_MCP2515_PORT            DATA_PORT_B
00143 #define         HW_SCK_MCP2515_DDR                      DATA_DIR_REG_B
00144 #define         HW_SCK_MCP2515                          B1
00145  
00146  
00147 
00148  
00149  
00168 #define         HW_MCP_EXT_INT                          0
00169 #define         HW_MCP_EXT_INT_DDR                      DDRD
00170 #define         HW_MCP_EXT_INT_PORT                     PORTD
00171 #define         CONFIG_MCP_INT                          INT0_VECTOR
00172  
00173  
00174  
00175  
00195 #define         HW_SOFT_EXT_INT_DDR             DDRE    
00196 #define         HW_SOFT_EXT_INT_PORT    PORTE
00197 #define         HW_SOFT_EXT_INT_1               PE4
00198 #define         HW_SOFT_EXT_INT_2               PE5
00199 
00200 
00221 #define         CONFIG_INT_SENDING                      INT4_VECTOR
00222 #define         CONFIG_INT_RECEIVING            INT5_VECTOR
00223 #define         CONFIG_INT_SEND_NUM                     HW_SOFT_EXT_INT_1
00224 #define         CONFIG_INT_REC_NUM                      HW_SOFT_EXT_INT_2
00225 #define         TRIGGER_RECEIVING                       HW_SOFT_EXT_INT_2
00226 #define         TRIGGER_SENDING                         HW_SOFT_EXT_INT_1
00227  
00228  
00229  
00230  
00231  
00241  #define        WDT_OFF         0
00242  #define        WDT_ON          1
00243  #define        CONFIG_WDT_MODE WDT_OFF
00244  
00245  
00246  
00247  
00248  
00249  
00259 #define CONFIG_DEBUG_UART_INFO          1
00260 
00265 #define CONFIG_DEBUG_TEST_HLL           1
00266 
00267 
00272 #define CONFIG_TESTING_HAL                      0
00273 
00274 
00279 #define MSG_AMOUNT_TEST         10000
00280 
00281 
00286 #define DATA_TO_SEND_1  0x5
00287 
00288 
00294 #define CONFIG_DEBUG_LED_TOGGLING       0
00295 #define HW_PORT_LED                                     PORTF
00296 #define HW_DDR_LED                                      DDRF
00297 #define HW_PORT_LED0                            PF0
00298 #define HW_PORT_LED1                            PF1
00299 #define HW_PORT_LED2                            PF2
00300 
00301 
00302 
00303 
00304 
00305 
00306 /* UART - debugging */
00307 #if ( CONFIG_DEBUG_UART_INFO ) 
00308         #define         RS_BAUD         9600UL
00309         #define         RS_UBRR         ((F_CPU/16/RS_BAUD) - 1)
00310 #endif 
00311 
00312 
00313 #endif
 All Classes Files Functions Enumerations Enumerator Defines