Skip to content

Commit

Permalink
Fix Kconfig style
Browse files Browse the repository at this point in the history
Remove spaces from Kconfig files
Add TABs
Replace help => ---help---
Remove extra TABs
Add comments
  • Loading branch information
simbit18 authored and acassis committed Nov 20, 2024
1 parent c0f776d commit 7df0e94
Show file tree
Hide file tree
Showing 6 changed files with 195 additions and 151 deletions.
64 changes: 54 additions & 10 deletions arch/arm/src/stm32h5/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1110,145 +1110,188 @@ choice
depends on STM32H5_I2C1
prompt "I2C1 Input Clock Selection"
default STM32H5_I2C1_CLK_PCLK1

config STM32H5_I2C1_CLK_CSI
bool "CSI"

config STM32H5_I2C1_CLK_HSI
bool "HSI"

config STM32H5_I2C1_CLK_PCLK1
bool "PCLK1"

config STM32H5_I2C1_CLK_PLL3R
bool "PLL3R"
endchoice

endchoice # I2C1 Input Clock Selection

choice
depends on STM32H5_I2C2
prompt "I2C2 Input Clock Selection"
default STM32H5_I2C2_CLK_PCLK1

config STM32H5_I2C2_CLK_CSI
bool "CSI"

config STM32H5_I2C2_CLK_HSI
bool "HSI"

config STM32H5_I2C2_CLK_PCLK1
bool "PCLK1"

config STM32H5_I2C2_CLK_PLL3R
bool "PLL3R"
endchoice

endchoice # I2C2 Input Clock Selection

choice
depends on STM32H5_I2C3
prompt "I2C3 Input Clock Selection"
default STM32H5_I2C3_CLK_PCLK3

config STM32H5_I2C3_CLK_CSI
bool "CSI"

config STM32H5_I2C3_CLK_HSI
bool "HSI"

config STM32H5_I2C3_CLK_PCLK3
bool "PCLK3"

config STM32H5_I2C3_CLK_PLL3R
bool "PLL3R"
endchoice

endchoice # I2C3 Input Clock Selection

choice
depends on STM32H5_I2C4
prompt "I2C4 Input Clock Selection"
default STM32H5_I2C4_CLK_PCLK3

config STM32H5_I2C4_CLK_CSI
bool "CSI"

config STM32H5_I2C4_CLK_HSI
bool "HSI"

config STM32H5_I2C4_CLK_PCLK3
bool "PCLK3"

config STM32H5_I2C4_CLK_PLL3R
bool "PLL3R"
endchoice

endmenu
endchoice # I2C4 Input Clock Selection

endmenu # Clock Selection

menu "Rise/Fall Override"

config STM32H5_I2C1_RF_OVERRIDE
bool "I2C1"
default n
depends on STM32H5_I2C1

config STM32H5_I2C2_RF_OVERRIDE
bool "I2C2"
default n
depends on STM32H5_I2C2

config STM32H5_I2C3_RF_OVERRIDE
bool "I2C3"
default n
depends on STM32H5_I2C3

config STM32H5_I2C4_RF_OVERRIDE
bool "I2C4"
default n
depends on STM32H5_I2C4

menu "Rise/Fall Values"

config STM32H5_I2C1_RISE
int "I2C1 Rise Time (ns)"
range 0 1000
default 20
depends on STM32H5_I2C1_RF_OVERRIDE

config STM32H5_I2C1_FALL
int "I2C1 Fall Time (ns)"
range 0 300
default 20
depends on STM32H5_I2C1_RF_OVERRIDE

config STM32H5_I2C2_RISE
int "I2C2 Rise Time (ns)"
range 0 1000
default 20
depends on STM32H5_I2C2_RF_OVERRIDE

config STM32H5_I2C2_FALL
int "I2C2 Fall Time (ns)"
range 0 300
default 20
depends on STM32H5_I2C2_RF_OVERRIDE

config STM32H5_I2C3_RISE
int "I2C3 Rise Time (ns)"
range 0 1000
default 20
depends on STM32H5_I2C3_RF_OVERRIDE

config STM32H5_I2C3_FALL
int "I2C3 Fall Time (ns)"
range 0 300
default 20
depends on STM32H5_I2C3_RF_OVERRIDE

config STM32H5_I2C4_RISE
int "I2C4 Rise Time (ns)"
range 0 1000
default 20
depends on STM32H5_I2C4_RF_OVERRIDE

config STM32H5_I2C4_FALL
int "I2C4 Fall Time (ns)"
range 0 300
default 20
depends on STM32H5_I2C4_RF_OVERRIDE
endmenu
endmenu

endmenu # Rise/Fall Values

endmenu # Rise/Fall Override

menu "Filtering"

menu "Digital Filters"

config STM32H5_I2C1_DNF
int "I2C1 Digital Noise Filter"
range 0 15
default 0
depends on STM32H5_I2C1

config STM32H5_I2C2_DNF
int "I2C2 Digital Noise Filter"
range 0 15
default 0
depends on STM32H5_I2C2

config STM32H5_I2C3_DNF
int "I2C3 Digital Noise Filter"
range 0 15
default 0
depends on STM32H5_I2C3

config STM32H5_I2C4_DNF
int "I2C4 Digital Noise Filter"
range 0 15
default 0
depends on STM32H5_I2C4
endmenu

endmenu # Digital Filters

menu "Analog Filters"

config STM32H5_I2C1_ANFOFF
int "Turn off I2C1 Analog Filter (0=on, 1=off)"
default 1
Expand All @@ -1272,9 +1315,10 @@ config STM32H5_I2C4_ANFOFF
default 1
range 0 1
depends on STM32H5_I2C4
endmenu

endmenu
endmenu # Analog Filters

endmenu # Filtering

config STM32H5_I2C_DYNTIMEO
bool "Use dynamic timeouts"
Expand Down
Loading

0 comments on commit 7df0e94

Please sign in to comment.