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 
00027 #define BUS_ARBITRATOR                  1
00028 #define BUS_DEVICE                      0
00029 #ifndef CONFIG_BUS_MODE //let Makefile override
00030 #       define CONFIG_BUS_MODE          BUS_DEVICE
00031 #endif
00032 
00033 
00034 #define CONFIG_USE_MALLOC       1
00035 
00040 #define CONFIG_NUM_CANMSG 8
00041 
00046 #define CONFIG_TRIE_BITS_PER_NODE 2
00047 
00051 #define CONFIG_VENDOR_ID     1
00052 #define CONFIG_PRODUCT_ID    2
00053 #define CONFIG_SERIAL_NUMBER 3
00054 
00055 #ifndef F_CPU
00056 #       define F_CPU 16000000
00057 #endif
00058 
00059 
00060 
00061 
00062 /* ======================================================== */
00063 /*                                                      HAL                                                             */
00064 /* ======================================================== */
00065 
00070 #define         HW_CS_MCP2515_PORT                      DATA_PORT_B
00071 #define         HW_CS_MCP2515                           B0
00072 #define         HW_CS_MCP2515_DDR                       DATA_DIR_REG_B
00073  
00074 #define         HW_MISO_MCP2515                         B3
00075 #define         HW_MOSI_MCP2515                         B2
00076 #define         HW_MISO_MCP2515_DDR                     DATA_DIR_REG_B
00077 #define         HW_MISO_MCP2515_PIN                     PORT_INPUT_PIN_B
00078 #define         HW_MOSI_MCP2515_DDR                     DATA_DIR_REG_B
00079 #define         HW_MOSI_MCP2515_PORT            DATA_PORT_B
00080  
00081 #define         HW_SCK_MCP2515_DDR                      DATA_DIR_REG_B
00082 #define         HW_SCK_MCP2515                          B1
00083  
00084  
00085 #define         ENABLE_SPI_INT                          1
00086 #define         SPI_INTERRUPT                           ENABLE_SPI_INT
00087  
00088  
00089  
00105 #define         HW_MCP_EXT_INT                          0
00106 #define         HW_MCP_EXT_INT_DDR                      DDRD
00107 #define         HW_MCP_EXT_INT_PORT                     PORTD
00108 
00109  
00110  
00111  
00112  
00132 #define         HW_SOFT_EXT_INT_DDR             DDRE    
00133 #define         HW_SOFT_EXT_INT_PORT    PORTE
00134 #define         HW_SOFT_EXT_INT_1               PE4
00135 #define         HW_SOFT_EXT_INT_2               PE5
00136 //#define               HW_SOFT_EXT_INT_TRIG    PE5
00137 
00142 #define         INT_SENDING                             INT4_VECTOR
00143 
00148 #define         INT_RECEIVING                   INT5_VECTOR
00149 
00154 #define         INT_SENDING_NUM                 4
00155 
00160 #define         INT_RECEIVING_NUM               5
00161 
00166 #define         TRIGGER_RECEIVING               HW_SOFT_EXT_INT_2
00167 
00172 #define         TRIGGER_SENDING                 HW_SOFT_EXT_INT_1
00173  
00174  
00175  
00185  #define        WDT_OFF         0
00186  #define        WDT_ON          1
00187  #define        WDT_MODE        WDT_OFF
00188  
00189  
00190  
00191  
00197 /* Configuration mode in which some capacity properties of the system ...
00198 ... can be checked */
00199 #define CONFIG_DEBUG_CAPACITY           0
00200 
00201 
00206 #define CONFIG_DEBUG_UART_INFO          1
00207 
00212 #define CONFIG_DEBUG_TEST_HLL           1
00213 
00214 
00219 #define MSG_AMOUNT_TEST         10000
00220 
00221 /* Configuration mode in which some toggling diode while msg receiving and  ...
00222 ... sending can be started */
00223 #define CONFIG_DEBUG_LED_TOGGLING       0
00224 #define HW_PORT_LED                                     PORTF
00225 #define HW_DDR_LED                                      DDRF
00226 #define HW_PORT_LED0                            PF0
00227 #define HW_PORT_LED1                            PF1
00228 #define HW_PORT_LED2                            PF2
00229 
00230 
00235 #define CONFIG_TESTING_HAL                      0
00236 
00237 
00238 /* UART - debugging */
00239 #if ( CONFIG_DEBUG_UART_INFO ) 
00240         #define         F_CPU           16000000UL
00241         #define         RS_BAUD         9600UL
00242         #define         RS_UBRR         ((F_CPU/16/RS_BAUD) - 1)
00243 #endif 
00244 
00245 
00246 
00251 #define DEVICE_DEF_ID           0xFF
00252 
00257 #define ARB_DEF_ID                      0x00
00258 
00259 
00260 
00261 /* FOR TESTING =================================================== */
00262 #define DATA_TO_SEND_1  0x5
00263 /* FOR TESTING =================================================== */
00264 
00265 #endif
 All Classes Files Functions Enumerations Enumerator Defines