diff --git a/src/avr/Kconfig b/src/avr/Kconfig index e430b246..f1e747ab 100644 --- a/src/avr/Kconfig +++ b/src/avr/Kconfig @@ -102,28 +102,29 @@ config AVR_STACK_SIZE config AVR_WATCHDOG bool default y + config USBSERIAL - bool "Use USB for communication (instead of serial)" - depends on MACH_at90usb1286 || MACH_at90usb646 || MACH_atmega32u4 - default y -config SERIAL - depends on !USBSERIAL bool - default y +config SERIAL + bool + default y if !USBSERIAL choice - depends on SERIAL - prompt "Serial Port" if LOW_LEVEL_OPTIONS && (MACH_atmega2560 || MACH_atmega1280 || MACH_atmega644p || MACH_atmega1284p) - help - Select the serial device to use on the AVR chip. This is - almost always UART0. + prompt "Communication interface" if LOW_LEVEL_OPTIONS && (MACH_atmega2560 || MACH_atmega1280 || MACH_atmega644p || MACH_atmega1284p || MACH_at90usb1286 || MACH_at90usb646 || MACH_atmega32u4) + config AVR_USB + bool "USB" if MACH_at90usb1286 || MACH_at90usb646 || MACH_atmega32u4 + select USBSERIAL config AVR_SERIAL_UART0 - bool "UART0" + bool "UART0" if !(MACH_at90usb1286 || MACH_at90usb646 || MACH_atmega32u4) + select SERIAL config AVR_SERIAL_UART1 bool "UART1" + select SERIAL config AVR_SERIAL_UART2 bool "UART2" if MACH_atmega2560 || MACH_atmega1280 + select SERIAL config AVR_SERIAL_UART3 bool "UART3" if MACH_atmega2560 || MACH_atmega1280 + select SERIAL endchoice config SERIAL_BAUD_U2X depends on SERIAL && !SIMULAVR @@ -134,7 +135,7 @@ config SERIAL_PORT int default 3 if AVR_SERIAL_UART3 default 2 if AVR_SERIAL_UART2 - default 1 if MACH_at90usb1286 || MACH_at90usb646 || MACH_atmega32u4 || AVR_SERIAL_UART1 + default 1 if AVR_SERIAL_UART1 default 0 config SIMULAVR