![]() |
Contains all constant and pre-processor directives for code configuration. This file common both for HAL and HLL. More...
Go to the source code of this file.
Defines | |
#define | BUS_ARBITRATOR 1 |
#define | BUS_DEVICE 0 |
#define | CONFIG_BUS_MODE BUS_DEVICE |
#define | CONFIG_USE_MALLOC 1 |
#define | CONFIG_NUM_CANMSG 8 |
#define | CONFIG_TRIE_BITS_PER_NODE 2 |
#define | CONFIG_VENDOR_ID 1 |
#define | CONFIG_PRODUCT_ID 2 |
#define | CONFIG_SERIAL_NUMBER 3 |
#define | F_CPU 16000000 |
#define | CONFIG_DEVICE_DEF_ID 0xFF |
#define | CONFIG_ARB_DEF_ID 0x01 |
#define | HW_CS_MCP2515_PORT DATA_PORT_B |
#define | HW_CS_MCP2515 B0 |
#define | HW_CS_MCP2515_DDR DATA_DIR_REG_B |
#define | HW_MISO_MCP2515 B3 |
#define | HW_MOSI_MCP2515 B2 |
#define | HW_MISO_MCP2515_DDR DATA_DIR_REG_B |
#define | HW_MISO_MCP2515_PIN PORT_INPUT_PIN_B |
#define | HW_MOSI_MCP2515_DDR DATA_DIR_REG_B |
#define | HW_MOSI_MCP2515_PORT DATA_PORT_B |
#define | HW_SCK_MCP2515_DDR DATA_DIR_REG_B |
#define | HW_SCK_MCP2515 B1 |
#define | HW_MCP_EXT_INT 0 |
#define | HW_MCP_EXT_INT_DDR DDRD |
#define | HW_MCP_EXT_INT_PORT PORTD |
#define | CONFIG_MCP_INT INT0_VECTOR |
#define | HW_SOFT_EXT_INT_DDR DDRE |
#define | HW_SOFT_EXT_INT_PORT PORTE |
#define | HW_SOFT_EXT_INT_1 PE4 |
#define | HW_SOFT_EXT_INT_2 PE5 |
#define | CONFIG_INT_SENDING INT4_VECTOR |
#define | CONFIG_INT_RECEIVING INT5_VECTOR |
#define | CONFIG_INT_SEND_NUM HW_SOFT_EXT_INT_1 |
#define | CONFIG_INT_REC_NUM HW_SOFT_EXT_INT_2 |
#define | TRIGGER_RECEIVING HW_SOFT_EXT_INT_2 |
#define | TRIGGER_SENDING HW_SOFT_EXT_INT_1 |
#define | WDT_OFF 0 |
#define | WDT_ON 1 |
#define | CONFIG_WDT_MODE WDT_OFF |
#define | CONFIG_DEBUG_UART_INFO 1 |
#define | CONFIG_DEBUG_TEST_HLL 1 |
#define | CONFIG_TESTING_HAL 0 |
#define | MSG_AMOUNT_TEST 10000 |
#define | DATA_TO_SEND_1 0x5 |
#define | CONFIG_DEBUG_LED_TOGGLING 0 |
#define | HW_PORT_LED PORTF |
#define | HW_DDR_LED DDRF |
#define | HW_PORT_LED0 PF0 |
#define | HW_PORT_LED1 PF1 |
#define | HW_PORT_LED2 PF2 |
#define | RS_BAUD 9600UL |
#define | RS_UBRR ((F_CPU/16/RS_BAUD) - 1) |
Contains all constant and pre-processor directives for code configuration. This file common both for HAL and HLL.
#define CONFIG_ARB_DEF_ID 0x01 |
Arbitrator default ID
#define CONFIG_BUS_MODE BUS_DEVICE |
Determines type of node within the system
#define CONFIG_DEBUG_LED_TOGGLING 0 |
Configuration mode in which some toggling diode while msg receiving
and sending can be started.
#define CONFIG_DEBUG_TEST_HLL 1 |
Configuration mode in which HLL is included into testing
#define CONFIG_DEBUG_UART_INFO 1 |
CONFIGURATION modes External interrupt port specification
Configuration mode in which some informations are sent through UART
#define CONFIG_DEVICE_DEF_ID 0xFF |
Default nodes ID
Device default ID
#define CONFIG_INT_REC_NUM HW_SOFT_EXT_INT_2 |
Determinates number of interrupt routine responsible for message receiving
#define CONFIG_INT_RECEIVING INT5_VECTOR |
Determinates number of interrupt routine responsible for message receiving
#define CONFIG_INT_SEND_NUM HW_SOFT_EXT_INT_1 |
Determinates number of interrupt routine responsible for message sending
#define CONFIG_INT_SENDING INT4_VECTOR |
Determinates vector of interrupt routine responsible for message sending
#define CONFIG_MCP_INT INT0_VECTOR |
External interrupt handler name
#define CONFIG_NUM_CANMSG 8 |
Number of CAN messages reserved in the memory pool of the High Level Layer, shared by all sockets.
#define CONFIG_TESTING_HAL 0 |
Configuration mode in which only HAL is tested - modified main function needed
#define CONFIG_TRIE_BITS_PER_NODE 2 |
The height of the tree used for indexing node ids in arbitrator is 8 divided by this number.
#define CONFIG_VENDOR_ID 1 |
Used in the Bind request.
#define CONFIG_WDT_MODE WDT_OFF |
WATCHDOG Properties
Watchdog timer ON/OFF
#define DATA_TO_SEND_1 0x5 |
Data to send (only for testing)
#define HW_CS_MCP2515 B0 |
Chip select - pin determination
#define HW_CS_MCP2515_DDR DATA_DIR_REG_B |
Chip select - DDR (port direction)
#define HW_CS_MCP2515_PORT DATA_PORT_B |
SPI SPI port specification for MCP2515
Chip select - PORT
#define HW_MCP_EXT_INT 0 |
EXTERNAL interrupt External interrupt port specification
External interrupt - number of interrupt
#define HW_MCP_EXT_INT_DDR DDRD |
External interrupt - port direction
#define HW_MCP_EXT_INT_PORT PORTD |
External interrupt - port number
#define HW_MISO_MCP2515 B3 |
SPI MISO - pin determination
#define HW_MISO_MCP2515_DDR DATA_DIR_REG_B |
SPI MISO - DDR ( port direction )
#define HW_MISO_MCP2515_PIN PORT_INPUT_PIN_B |
SPI MISO - PIN value
#define HW_MOSI_MCP2515 B2 |
SPI MOSI - pin determination
#define HW_MOSI_MCP2515_DDR DATA_DIR_REG_B |
SPI MOSI - DDR ( port direction )
#define HW_MOSI_MCP2515_PORT DATA_PORT_B |
SPI MOSI - PORT ( output value )
#define HW_SCK_MCP2515 B1 |
SPI CLK - pin determination
#define HW_SCK_MCP2515_DDR DATA_DIR_REG_B |
SPI SCK - DDR (port direction)
#define HW_SOFT_EXT_INT_1 PE4 |
Software interrupt 1 - port number
#define HW_SOFT_EXT_INT_2 PE5 |
Software interrupt 2 - port number
#define HW_SOFT_EXT_INT_DDR DDRE |
EXTERNAL interrupt as SOFTWARE interrupt Software int basing on external interrupt of uC - be careful with number of interrupt ... ... to not destroy communication with CAN controller
Software interrupt - port direction
#define HW_SOFT_EXT_INT_PORT PORTE |
Software interrupt - port value
#define MSG_AMOUNT_TEST 10000 |
Number of messages for HAL testing
#define TRIGGER_RECEIVING HW_SOFT_EXT_INT_2 |
It determines port responsible for triggering receiving mechanism
#define TRIGGER_SENDING HW_SOFT_EXT_INT_1 |
It determines port responsible for triggering sending mechanism