From 922b3106ed507c372339c7c6771f2b5ed8c2c234 Mon Sep 17 00:00:00 2001 From: kju Date: Fri, 22 Jan 2010 01:43:22 +0000 Subject: [PATCH] can support menu fixes, include header file --- can/config.in | 6 +++++- config.h | 1 - main.c | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/can/config.in b/can/config.in index aa7b857..2e4c76c 100644 --- a/can/config.in +++ b/can/config.in @@ -1,5 +1,7 @@ dep_bool_menu "CAN bus support" CAN_SUPPORT y +bool 'Use MCU builtin SPI support' SPI_HARDWARE + choice 'SPI Port' \ "PORTA 0 \ PORTB 1 \ @@ -51,7 +53,7 @@ choice 'Bit SS' \ Bit7 7" \ 'Bit4' SPI_PIN_SS -bool "Use interrupt" CAN_INTERRUPT +dep_bool_menu "Use interrupt" CAN_INTERRUPT y choice 'Interrupt Port' \ "PINA PINA \ @@ -72,3 +74,5 @@ choice 'Interrupt Bit' \ 'Bit2' SPI_PIN_MCP_INT endmenu + +endmenu diff --git a/config.h b/config.h index 0eaff67..e078f87 100644 --- a/config.h +++ b/config.h @@ -16,7 +16,6 @@ #define BORG_CAN // spi.[ch] defines -#define SPI_HARDWARE #if SPI_PORTIDX == 0 #define SPI_PORT PORTA diff --git a/main.c b/main.c index 979ada6..b0470a7 100644 --- a/main.c +++ b/main.c @@ -15,6 +15,10 @@ #include "joystick/joystick.h" #endif +#ifdef CAN_SUPPORT + #include "can/borg_can.h" +#endif + int main (void){ clear_screen(0);