1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/hifive1b: change clock Kconfig parameter to always have a value

As clock.c uses C conditionals for its code, the configuration macros
should always be defined. This is done by moving the dependencies to a
condition in the prompt, making them configurable only when applicable.
This commit is contained in:
Leandro Lanzieri 2020-09-16 09:10:50 +02:00
parent 5d96a6383d
commit 3829963c73
No known key found for this signature in database
GPG Key ID: 13559905E2EBEAA5

View File

@ -40,32 +40,29 @@ config USE_CLOCK_HFROSC
bool "Direct High frequency internal oscillator (HFROSC)"
endchoice
if USE_CLOCK_HFXOSC_PLL
# the configuration macros must always be defined for clock.c to compile
config CLOCK_PLL_F
int "F: REFR multiply factor"
int "F: REFR multiply factor" if USE_CLOCK_HFXOSC_PLL
default 39
config CLOCK_PLL_Q
int "Q: VCO divide factor"
int "Q: VCO divide factor" if USE_CLOCK_HFXOSC_PLL
default 1
endif
config CLOCK_DESIRED_FREQUENCY
int "Desired clock frequency"
int
prompt "Desired clock frequency" if USE_CLOCK_HFROSC_PLL
default 320000000
range 1000000 320000000
depends on USE_CLOCK_HFROSC_PLL
if USE_CLOCK_HFROSC
config CLOCK_HFROSC_TRIM
int "TRIM: input frequency multiplier"
int "TRIM: input frequency multiplier" if USE_CLOCK_HFROSC
default 6
range 0 31
config CLOCK_HFROSC_DIV
int "DIV: output frequency divider"
int "DIV: output frequency divider" if USE_CLOCK_HFROSC
default 1
range 0 63
endif
endmenu