85b2cbaca6
This patch allows user to simply select which GPIOs he wants to use and access them via /dev/gpio_a0 or similar device with standard gpio driver. By default gpio names match pin names printed on the board. So when enabling A3 pin, it will show as /dev/gpio_a3 in runtime. This name can be changed in kconfig. User can also select pin function (input, output, interrupt) as well as standard pin settings like, pull up/down, output type pushpull/open drain etc. All pins that are exposed via boards goldpins are listed in Kconfig. Extra pins that are supported by chiip but are not exposed for easy usage are not listed. To have this nice Kconfig configuration and for things to be easily debugable/understandable it requires code to have big Kconfig and header file with all possible definitions Because of file sizes I decided to split gpio related kconfig and header into separate files. Otherwise it would really make original files hard to read and find anything. Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
87 lines
1.9 KiB
Plaintext
87 lines
1.9 KiB
Plaintext
#
|
|
# For a description of the syntax of this configuration file,
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
#
|
|
|
|
if ARCH_BOARD_STM32F411_MINIMUM
|
|
|
|
config STM32F411MINIMUM_USBHOST_STACKSIZE
|
|
int "USB host waiter stack size"
|
|
default 1024
|
|
depends on USBHOST
|
|
|
|
config STM32F411MINIMUM_USBHOST_PRIO
|
|
int "USB host waiter task priority"
|
|
default 100
|
|
depends on USBHOST
|
|
|
|
config STM32F411MINIMUM_FLASH
|
|
bool "MTD driver for external 8Mbyte W25Q64FV FLASH on SPI1"
|
|
default n
|
|
select MTD
|
|
select MTD_W25
|
|
select MTD_SMART
|
|
select FS_SMARTFS
|
|
select STM32_SPI1
|
|
select MTD_BYTE_WRITE
|
|
---help---
|
|
Configures an MTD device for use with the onboard flash
|
|
|
|
config STM32F411MINIMUM_FLASH_MINOR
|
|
int "Minor number for the FLASH /dev/smart entry"
|
|
default 0
|
|
depends on STM32F411MINIMUM_FLASH
|
|
---help---
|
|
Sets the minor number for the FLASH MTD /dev entry
|
|
|
|
menuconfig STM32F411MINIMUM_HX711
|
|
bool "Enable hx711 scale sensor"
|
|
default n
|
|
select ADC_HX711
|
|
|
|
if STM32F411MINIMUM_HX711
|
|
|
|
choice
|
|
prompt "Select GPIO port for clock pin"
|
|
default STM32F411MINIMUM_HX711_CLK_PORTA
|
|
|
|
config STM32F411MINIMUM_HX711_CLK_PORTA
|
|
bool "Port A"
|
|
config STM32F411MINIMUM_HX711_CLK_PORTB
|
|
bool "Port B"
|
|
|
|
endchoice # Select GPIO port for clock pin
|
|
|
|
config STM32F411MINIMUM_HX711_CLK_PIN
|
|
int "Select GPIO pin number for clock pin"
|
|
default 1
|
|
range 0 15
|
|
|
|
choice
|
|
prompt "Select GPIO port for data pin"
|
|
default STM32F411MINIMUM_HX711_DATA_PORTA
|
|
|
|
config STM32F411MINIMUM_HX711_DATA_PORTA
|
|
bool "Port A"
|
|
config STM32F411MINIMUM_HX711_DATA_PORTB
|
|
bool "Port B"
|
|
|
|
endchoice # Select GPIO port for data pin
|
|
|
|
config STM32F411MINIMUM_HX711_DATA_PIN
|
|
int "Select GPIO pin number for data pin"
|
|
default 2
|
|
range 0 15
|
|
|
|
endif # STM32F411MINIMUM_HX711
|
|
|
|
menuconfig STM32F411MINIMUM_GPIO
|
|
select DEV_GPIO
|
|
bool "enable gpio subsystem"
|
|
|
|
if STM32F411MINIMUM_GPIO
|
|
source "boards/arm/stm32/stm32f411-minimum/Kconfig.gpio"
|
|
endif
|
|
|
|
endif
|