klipper/src/avr/Kconfig
Kevin O'Connor 4fcf5a31f5 pwmcmds: Add Kconfig option to allow boards to disable hardware PWM commands
Some boards may not support hardware based PWM.  Update the build so
that those commands do not need to be compiled if they are not
available.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-06-13 23:18:59 -04:00

94 lines
2.0 KiB
Plaintext

# Kconfig settings for AVR processors
if MACH_AVR
config AVR_SELECT
bool
default y
select HAVE_GPIO_ADC
select HAVE_GPIO_SPI
select HAVE_GPIO_HARD_PWM
config BOARD_DIRECTORY
string
default "avr"
choice
prompt "Processor model"
config MACH_atmega168
bool "atmega168"
config MACH_atmega644p
bool "atmega644p"
config MACH_at90usb1286
bool "at90usb1286"
config MACH_atmega1280
bool "atmega1280"
config MACH_atmega2560
bool "atmega2560"
endchoice
config MCU
string
default "atmega168" if MACH_atmega168
default "atmega644p" if MACH_atmega644p
default "at90usb1286" if MACH_at90usb1286
default "atmega1280" if MACH_atmega1280
default "atmega2560" if MACH_atmega2560
choice
prompt "Processor speed"
config AVR_FREQ_8000000
bool "8Mhz"
config AVR_FREQ_16000000
bool "16Mhz"
config AVR_FREQ_20000000
bool "20Mhz"
endchoice
config CLOCK_FREQ
int
default 8000000 if AVR_FREQ_8000000
default 16000000 if AVR_FREQ_16000000
default 20000000 if AVR_FREQ_20000000
config CLEAR_PRESCALER
bool "Manually clear the CPU prescaler field at startup"
default n
help
Some AVR chips ship with a "clock prescaler" that causes the
chip to run at 1/8th speed. Enable this setting to clear the
prescaler field at startup which will cause the chip to run
without a clock divisor.
config AVR_CLKPR
int
default 0 if CLEAR_PRESCALER
default -1
config AVR_STACK_SIZE
int
default 256 if MACH_atmega2560
default 128
config AVR_WATCHDOG
bool "Support for automated reset on watchdog timeout"
default y
config AVR_USBSERIAL
bool
depends on MACH_at90usb1286
default y
config AVR_SERIAL
depends on !AVR_USBSERIAL
bool
default y
config SERIAL_BAUD
depends on AVR_SERIAL
int "Baud rate for serial port"
default 250000
config SERIAL_BAUD_U2X
depends on AVR_SERIAL
bool "Use AVR Baud 2X mode"
default y
endif