From 0eee4b0b160f15c27da9291e92477df04c02e8c0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 9 Dec 2020 18:02:30 +0100 Subject: arduino nano: add cpu frequency to kconfig --- src/arch/arduino-nano/Kconfig | 9 +++++++++ src/arch/arduino-nano/Makefile.inc | 4 ++++ 2 files changed, 13 insertions(+) (limited to 'src/arch') diff --git a/src/arch/arduino-nano/Kconfig b/src/arch/arduino-nano/Kconfig index 071c18a..ab25a8f 100644 --- a/src/arch/arduino-nano/Kconfig +++ b/src/arch/arduino-nano/Kconfig @@ -1,6 +1,15 @@ # Copyright 2020 Daniel Friesel # # SPDX-License-Identifier: CC0-1.0 + +config arch_arduino_nano_cpufreq +int "CPU Frequency" +#!accept [62500, 125000, 250000, 500000, 1000000, 2000000, 4000000, 8000000, 16000000] +range 62500 16000000 +default 16000000 +help + Assumes an externel 16MHz crystal to be present + config arch_arduino_nano_driver_adc bool "ADC (Analog-Digital-Converter)" select meta_driver_adc diff --git a/src/arch/arduino-nano/Makefile.inc b/src/arch/arduino-nano/Makefile.inc index e524027..2365cfd 100644 --- a/src/arch/arduino-nano/Makefile.inc +++ b/src/arch/arduino-nano/Makefile.inc @@ -13,6 +13,10 @@ ifdef CONFIG_arch_arduino_nano_mega168 BAUD = 19200 endif +ifdef CONFIG_arch_arduino_nano_cpufreq + cpu_freq = ${CONFIG_arch_arduino_nano_cpufreq} +endif + cpu_freq ?= 16000000 COMMON_FLAGS += -Werror=overflow -- cgit v1.2.3