2010-01-22 00:17:29 +00:00
|
|
|
dep_bool_menu "CAN bus support" CAN_SUPPORT y
|
|
|
|
|
2010-04-18 03:00:20 +00:00
|
|
|
if [ "$CAN_SUPPORT" = "y" ]; then
|
|
|
|
bool 'Use MCU builtin SPI support' SPI_HARDWARE
|
2010-01-22 01:43:22 +00:00
|
|
|
|
2010-04-18 03:00:20 +00:00
|
|
|
choice 'SPI Port' \
|
|
|
|
"PORTA 0 \
|
|
|
|
PORTB 1 \
|
|
|
|
PORTC 2 \
|
|
|
|
PORTD 3" \
|
|
|
|
'PORTB' SPI_PORTIDX
|
2010-01-22 00:17:29 +00:00
|
|
|
|
2010-04-18 03:00:20 +00:00
|
|
|
choice 'Bit MOSI' \
|
|
|
|
"Bit0 0 \
|
|
|
|
Bit1 1 \
|
|
|
|
Bit2 2 \
|
|
|
|
Bit3 3 \
|
|
|
|
Bit4 4 \
|
|
|
|
Bit5 5 \
|
|
|
|
Bit6 6 \
|
|
|
|
Bit7 7" \
|
|
|
|
'Bit5' SPI_PIN_MOSI
|
2010-01-22 00:17:29 +00:00
|
|
|
|
2010-04-18 03:00:20 +00:00
|
|
|
choice 'Bit MISO' \
|
|
|
|
"Bit0 0 \
|
|
|
|
Bit1 1 \
|
|
|
|
Bit2 2 \
|
|
|
|
Bit3 3 \
|
|
|
|
Bit4 4 \
|
|
|
|
Bit5 5 \
|
|
|
|
Bit6 6 \
|
|
|
|
Bit7 7" \
|
|
|
|
'Bit6' SPI_PIN_MISO
|
2010-01-22 00:17:29 +00:00
|
|
|
|
2010-04-18 03:00:20 +00:00
|
|
|
choice 'Bit SCK' \
|
|
|
|
"Bit0 0 \
|
|
|
|
Bit1 1 \
|
|
|
|
Bit2 2 \
|
|
|
|
Bit3 3 \
|
|
|
|
Bit4 4 \
|
|
|
|
Bit5 5 \
|
|
|
|
Bit6 6 \
|
|
|
|
Bit7 7" \
|
|
|
|
'Bit7' SPI_PIN_SCK
|
2010-01-22 00:17:29 +00:00
|
|
|
|
2010-04-18 03:00:20 +00:00
|
|
|
choice 'Bit SS' \
|
|
|
|
"Bit0 0 \
|
|
|
|
Bit1 1 \
|
|
|
|
Bit2 2 \
|
|
|
|
Bit3 3 \
|
|
|
|
Bit4 4 \
|
|
|
|
Bit5 5 \
|
|
|
|
Bit6 6 \
|
|
|
|
Bit7 7" \
|
|
|
|
'Bit4' SPI_PIN_SS
|
2010-01-22 00:17:29 +00:00
|
|
|
|
2010-04-18 03:00:20 +00:00
|
|
|
dep_bool_menu "Use interrupt" CAN_INTERRUPT y
|
2010-01-22 00:17:29 +00:00
|
|
|
|
2010-04-18 03:00:20 +00:00
|
|
|
if [ "$CAN_INTERRUPT" = "y" ]; then
|
|
|
|
choice 'Interrupt Port' \
|
|
|
|
"PINA PINA \
|
|
|
|
PINB PINB \
|
|
|
|
PINC PINC \
|
|
|
|
PIND PIND" \
|
|
|
|
'PIND' SPI_REG_PIN_MCP_INT
|
2010-01-22 01:43:22 +00:00
|
|
|
|
2010-04-18 03:00:20 +00:00
|
|
|
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
|
2010-01-22 01:43:22 +00:00
|
|
|
endmenu
|