2008-12-03 05:40:16 +00:00
|
|
|
#ifndef CONFIG_H_
|
|
|
|
#define CONFIG_H_
|
|
|
|
|
|
|
|
#include "autoconf.h"
|
|
|
|
|
2010-01-22 00:17:29 +00:00
|
|
|
#ifdef CAN_SUPPORT
|
|
|
|
#define BORG_CAN
|
2008-12-03 05:40:16 +00:00
|
|
|
|
2011-10-28 21:52:17 +00:00
|
|
|
// spi.[ch] defines
|
|
|
|
//spi port default config
|
2010-01-22 00:17:29 +00:00
|
|
|
#if SPI_PORTIDX == 0
|
2011-10-28 21:52:17 +00:00
|
|
|
#define SPI_PORT PORTA
|
|
|
|
#define SPI_DDR DDRA
|
|
|
|
#define SPI_PIN PINA
|
2010-01-22 00:17:29 +00:00
|
|
|
#elif SPI_PORTIDX == 1
|
2011-10-28 21:52:17 +00:00
|
|
|
#define SPI_PORT PORTB
|
|
|
|
#define SPI_DDR DDRB
|
|
|
|
#define SPI_PIN PINB
|
2010-01-22 00:17:29 +00:00
|
|
|
#elif SPI_PORTIDX == 2
|
2011-10-28 21:52:17 +00:00
|
|
|
#define SPI_PORT PORTC
|
|
|
|
#define SPI_DDR DDRC
|
|
|
|
#define SPI_PIN PINC
|
2010-01-22 00:17:29 +00:00
|
|
|
#elif SPI_PORTIDX == 3
|
2011-10-28 21:52:17 +00:00
|
|
|
#define SPI_PORT PORTD
|
|
|
|
#define SPI_DDR DDRD
|
|
|
|
#define SPI_PIN PIND
|
2010-01-22 00:17:29 +00:00
|
|
|
#endif
|
2008-12-03 05:40:16 +00:00
|
|
|
|
|
|
|
// can.[ch] defines
|
|
|
|
#define CAN_RX_BUFFER_SIZE 2 //only used for Interrupt
|
|
|
|
#define CAN_TX_BUFFER_SIZE 2 //only used for Interrupt
|
2010-01-22 00:17:29 +00:00
|
|
|
#endif
|
2008-12-03 05:40:16 +00:00
|
|
|
|
|
|
|
#define INIT_EEPROM
|
|
|
|
|
|
|
|
//#define UART_BAUD_RATE 115200L
|
|
|
|
|
|
|
|
#endif /* CONFIG_H_ */
|