From f703054e93788619451e83a7897a51962f9912b4 Mon Sep 17 00:00:00 2001 From: alu Date: Sun, 18 Apr 2010 03:00:20 +0000 Subject: [PATCH] Hide CAN options, if CAN support is disabled --- can/config.in | 136 +++++++++++++++++++++++++------------------------- 1 file changed, 69 insertions(+), 67 deletions(-) diff --git a/can/config.in b/can/config.in index 2e4c76c..9c003c2 100644 --- a/can/config.in +++ b/can/config.in @@ -1,78 +1,80 @@ dep_bool_menu "CAN bus support" CAN_SUPPORT y -bool 'Use MCU builtin SPI support' SPI_HARDWARE +if [ "$CAN_SUPPORT" = "y" ]; then + bool 'Use MCU builtin SPI support' SPI_HARDWARE -choice 'SPI Port' \ - "PORTA 0 \ - PORTB 1 \ - PORTC 2 \ - PORTD 3" \ - 'PORTB' SPI_PORTIDX + choice 'SPI Port' \ + "PORTA 0 \ + PORTB 1 \ + PORTC 2 \ + PORTD 3" \ + 'PORTB' SPI_PORTIDX -choice 'Bit MOSI' \ - "Bit0 0 \ - Bit1 1 \ - Bit2 2 \ - Bit3 3 \ - Bit4 4 \ - Bit5 5 \ - Bit6 6 \ - Bit7 7" \ - 'Bit5' SPI_PIN_MOSI + choice 'Bit MOSI' \ + "Bit0 0 \ + Bit1 1 \ + Bit2 2 \ + Bit3 3 \ + Bit4 4 \ + Bit5 5 \ + Bit6 6 \ + Bit7 7" \ + 'Bit5' SPI_PIN_MOSI -choice 'Bit MISO' \ - "Bit0 0 \ - Bit1 1 \ - Bit2 2 \ - Bit3 3 \ - Bit4 4 \ - Bit5 5 \ - Bit6 6 \ - Bit7 7" \ - 'Bit6' SPI_PIN_MISO + choice 'Bit MISO' \ + "Bit0 0 \ + Bit1 1 \ + Bit2 2 \ + Bit3 3 \ + Bit4 4 \ + Bit5 5 \ + Bit6 6 \ + Bit7 7" \ + 'Bit6' SPI_PIN_MISO -choice 'Bit SCK' \ - "Bit0 0 \ - Bit1 1 \ - Bit2 2 \ - Bit3 3 \ - Bit4 4 \ - Bit5 5 \ - Bit6 6 \ - Bit7 7" \ - 'Bit7' SPI_PIN_SCK + choice 'Bit SCK' \ + "Bit0 0 \ + Bit1 1 \ + Bit2 2 \ + Bit3 3 \ + Bit4 4 \ + Bit5 5 \ + Bit6 6 \ + Bit7 7" \ + 'Bit7' SPI_PIN_SCK -choice 'Bit SS' \ - "Bit0 0 \ - Bit1 1 \ - Bit2 2 \ - Bit3 3 \ - Bit4 4 \ - Bit5 5 \ - Bit6 6 \ - Bit7 7" \ - 'Bit4' SPI_PIN_SS + choice 'Bit SS' \ + "Bit0 0 \ + Bit1 1 \ + Bit2 2 \ + Bit3 3 \ + Bit4 4 \ + Bit5 5 \ + Bit6 6 \ + Bit7 7" \ + 'Bit4' SPI_PIN_SS -dep_bool_menu "Use interrupt" CAN_INTERRUPT y + dep_bool_menu "Use interrupt" CAN_INTERRUPT y -choice 'Interrupt Port' \ - "PINA PINA \ - PINB PINB \ - PINC PINC \ - PIND PIND" \ - 'PIND' SPI_REG_PIN_MCP_INT - -choice 'Interrupt Bit' \ - "Bit0 0 \ - Bit1 1 \ - Bit2 2 \ - Bit3 3 \ - Bit4 4 \ - Bit5 5 \ - Bit6 6 \ - Bit7 7" \ - 'Bit2' SPI_PIN_MCP_INT - -endmenu + if [ "$CAN_INTERRUPT" = "y" ]; then + choice 'Interrupt Port' \ + "PINA PINA \ + PINB PINB \ + PINC PINC \ + PIND PIND" \ + 'PIND' SPI_REG_PIN_MCP_INT + choice 'Interrupt Bit' \ + "Bit0 0 \ + Bit1 1 \ + Bit2 2 \ + Bit3 3 \ + Bit4 4 \ + Bit5 5 \ + Bit6 6 \ + Bit7 7" \ + 'Bit2' SPI_PIN_MCP_INT + fi + endmenu +fi endmenu