src/config.h
Go to the documentation of this file.
00001 /*
00002  * This file is in public domain.
00003  * The source code herein is used for testing,
00004  * and should provide an example of a sane configuration.
00005  */
00006 
00017 #ifndef CONFIG_H_
00018 #define CONFIG_H_
00019 
00020 /*
00021  * This file contains all constants named CONFIG_*.
00022  *
00023  * Prefix naming convention:
00024  * A prefix of CONFIG_ suggests that it is something
00025  * the application designer probably wants to tweak.
00026  * A prefix of BUS_ indicates that it is something going on on the CAN bus.
00027  */
00028 
00029  
00035 #define BUS_ARBITRATOR          1
00036 #define BUS_DEVICE              0
00037 #ifndef CONFIG_BUS_MODE //let Makefile override
00038 #   define CONFIG_BUS_MODE      BUS_DEVICE
00039 #endif
00040 
00045 #define CONFIG_NUM_CANMSG 8
00046 
00051 #define CONFIG_USE_MALLOC
00052 
00058 #define CONFIG_TRIE_BITS_PER_NODE 4
00059 
00064 #define CONFIG_SERIALIZE_CALLBACKS 1
00065 
00069 #define CONFIG_VENDOR_ID     1
00070 #define CONFIG_PRODUCT_ID    2
00071 #define CONFIG_SERIAL_NUMBER 3
00072 
00073 #ifndef F_CPU
00074 #   define F_CPU 16000000
00075 #endif
00076 
00077 
00078 
00079 
00080 
00081 
00082 
00083 
00084 /* ======================================================== */
00085 /*                          HAL                             */
00086 /* ======================================================== */
00087 
00096 #define CONFIG_DEVICE_DEF_ID        0xFF
00097 
00102 #define CONFIG_ARB_DEF_ID           0x01
00103 
00104 
00105 
00106 
00107 
00123 #define     HW_CS_MCP2515_PORT          DATA_PORT_B
00124 #define     HW_CS_MCP2515               B0
00125 #define     HW_CS_MCP2515_DDR           DATA_DIR_REG_B
00126  
00127  
00153 #define     HW_MISO_MCP2515             B3
00154 #define     HW_MOSI_MCP2515             B2
00155 #define     HW_MISO_MCP2515_DDR         DATA_DIR_REG_B
00156 #define     HW_MISO_MCP2515_PIN         PORT_INPUT_PIN_B
00157 #define     HW_MOSI_MCP2515_DDR         DATA_DIR_REG_B
00158 #define     HW_MOSI_MCP2515_PORT        DATA_PORT_B
00159 #define     HW_SCK_MCP2515_DDR          DATA_DIR_REG_B
00160 #define     HW_SCK_MCP2515              B1
00161  
00162  
00163 
00164  
00165  
00184 #define     HW_MCP_EXT_INT              0
00185 #define     HW_MCP_EXT_INT_DDR          DDRD
00186 #define     HW_MCP_EXT_INT_PORT         PORTD
00187 #define     CONFIG_MCP_INT              INT0_VECTOR
00188  
00189  
00190  
00191  
00211 #define     HW_SOFT_EXT_INT_DDR     DDRE    
00212 #define     HW_SOFT_EXT_INT_PORT    PORTE
00213 #define     HW_SOFT_EXT_INT_1       PE4
00214 #define     HW_SOFT_EXT_INT_2       PE5
00215 
00216 
00237 #define     CONFIG_INT_SENDING          INT4_VECTOR
00238 #define     CONFIG_INT_RECEIVING        INT5_VECTOR
00239 #define     CONFIG_INT_SEND_NUM         HW_SOFT_EXT_INT_1
00240 #define     CONFIG_INT_REC_NUM          HW_SOFT_EXT_INT_2
00241 #define     TRIGGER_RECEIVING           HW_SOFT_EXT_INT_2
00242 #define     TRIGGER_SENDING             HW_SOFT_EXT_INT_1
00243  
00244  
00245  
00246  
00247  
00257  #define    WDT_OFF     0
00258  #define    WDT_ON      1
00259  #define    CONFIG_WDT_MODE WDT_OFF
00260  
00261  
00262  
00263  
00264  
00265  
00275 #define CONFIG_DEBUG_UART_INFO      1
00276 
00281 #define CONFIG_DEBUG_TEST_HLL       1
00282 
00283 
00288 #define CONFIG_TESTING_HAL          0
00289 
00290 
00295 #define MSG_AMOUNT_TEST     10000
00296 
00297 
00302 #define DATA_TO_SEND_1  0x5
00303 
00304 
00310 #define CONFIG_DEBUG_LED_TOGGLING   0
00311 #define HW_PORT_LED                 PORTF
00312 #define HW_DDR_LED                  DDRF
00313 #define HW_PORT_LED0                PF0
00314 #define HW_PORT_LED1                PF1
00315 #define HW_PORT_LED2                PF2
00316 
00317 
00318 
00319 
00320 
00321 
00322 /* UART - debugging */
00323 #if ( CONFIG_DEBUG_UART_INFO ) 
00324     #define     RS_BAUD     9600UL
00325     #define     RS_UBRR     ((F_CPU/16/RS_BAUD) - 1)
00326 #endif 
00327 
00328 
00329 #endif
 All Classes Files Functions Enumerations Enumerator Defines