config.h
Go to the documentation of this file.
00001 /***********************************************************************/
00011 #ifndef CONFIG_H_
00012 #define CONFIG_H_
00013 
00014 /*
00015  * This file contains all constants named CONFIG_*.
00016  *
00017  * Prefix naming convention:
00018  * A prefix of CONFIG_ suggests that it is something
00019  * the application designer probably wants to tweak.
00020  * A prefix of BUS_ indicates that it is something going on on the CAN bus.
00021  */
00022 
00023  
00028 #define BUS_ARBITRATOR                  1
00029 #define BUS_DEVICE                      0
00030 #ifndef CONFIG_BUS_MODE //let Makefile override
00031 #       define CONFIG_BUS_MODE          BUS_ARBITRATOR
00032 #endif
00033 
00034 
00035 #define CONFIG_USE_MALLOC       1
00036 
00041 #define CONFIG_NUM_CANMSG 8
00042 
00047 #define CONFIG_TRIE_BITS_PER_NODE 2
00048 
00052 #define CONFIG_VENDOR_ID     1
00053 #define CONFIG_PRODUCT_ID    2
00054 #define CONFIG_SERIAL_NUMBER 3
00055 
00056 #ifndef F_CPU
00057 #       define F_CPU 16000000
00058 #endif
00059 
00060 
00061 
00062 
00063 /* ======================================================== */
00064 /*                                                      HAL                                                             */
00065 /* ======================================================== */
00066 
00075 #define DEVICE_DEF_ID           0xFF
00076 
00081 #define ARB_DEF_ID                      0x00
00082 
00083 
00084 
00085 
00086 
00102 #define         HW_CS_MCP2515_PORT                      DATA_PORT_B
00103 #define         HW_CS_MCP2515                           B0
00104 #define         HW_CS_MCP2515_DDR                       DATA_DIR_REG_B
00105  
00106  
00132 #define         HW_MISO_MCP2515                         B3
00133 #define         HW_MOSI_MCP2515                         B2
00134 #define         HW_MISO_MCP2515_DDR                     DATA_DIR_REG_B
00135 #define         HW_MISO_MCP2515_PIN                     PORT_INPUT_PIN_B
00136 #define         HW_MOSI_MCP2515_DDR                     DATA_DIR_REG_B
00137 #define         HW_MOSI_MCP2515_PORT            DATA_PORT_B
00138 #define         HW_SCK_MCP2515_DDR                      DATA_DIR_REG_B
00139 #define         HW_SCK_MCP2515                          B1
00140  
00141  
00142 
00143  
00144  
00160 #define         HW_MCP_EXT_INT                          0
00161 #define         HW_MCP_EXT_INT_DDR                      DDRD
00162 #define         HW_MCP_EXT_INT_PORT                     PORTD
00163 
00164  
00165  
00166  
00167  
00187 #define         HW_SOFT_EXT_INT_DDR             DDRE    
00188 #define         HW_SOFT_EXT_INT_PORT    PORTE
00189 #define         HW_SOFT_EXT_INT_1               PE4
00190 #define         HW_SOFT_EXT_INT_2               PE5
00191 
00192 
00213 #define         INT_SENDING                             INT4_VECTOR
00214 #define         INT_RECEIVING                   INT5_VECTOR
00215 #define         INT_SENDING_NUM                 4
00216 #define         INT_RECEIVING_NUM               5
00217 #define         TRIGGER_RECEIVING               HW_SOFT_EXT_INT_2
00218 #define         TRIGGER_SENDING                 HW_SOFT_EXT_INT_1
00219  
00220  
00221  
00222  
00223  
00233  #define        WDT_OFF         0
00234  #define        WDT_ON          1
00235  #define        WDT_MODE        WDT_OFF
00236  
00237  
00238  
00239  
00240  
00241  
00251 #define CONFIG_DEBUG_UART_INFO          1
00252 
00257 #define CONFIG_DEBUG_TEST_HLL           1
00258 
00259 
00264 #define MSG_AMOUNT_TEST         10000
00265 
00266 
00273 #define CONFIG_DEBUG_LED_TOGGLING       0
00274 #define HW_PORT_LED                                     PORTF
00275 #define HW_DDR_LED                                      DDRF
00276 #define HW_PORT_LED0                            PF0
00277 #define HW_PORT_LED1                            PF1
00278 #define HW_PORT_LED2                            PF2
00279 
00280 
00285 #define CONFIG_TESTING_HAL                      0
00286 
00287 
00288 /* Configuration mode in which some capacity properties of the system ...
00289 ... can be checked */
00290 #define CONFIG_DEBUG_CAPACITY           0
00291 
00292 /* UART - debugging */
00293 #if ( CONFIG_DEBUG_UART_INFO ) 
00294         #define         F_CPU           16000000UL
00295         #define         RS_BAUD         9600UL
00296         #define         RS_UBRR         ((F_CPU/16/RS_BAUD) - 1)
00297 #endif 
00298 
00299 
00300 /* FOR TESTING =================================================== */
00301 #define DATA_TO_SEND_1  0x5
00302 /* FOR TESTING =================================================== */
00303 
00304 #endif
 All Classes Files Functions Enumerations Enumerator Defines