Button configurations add to source ~/stm32f429-linux-builder/uclinux/arch/arm/mach-stm32/iomux.c.
You can detect user button state from STM32f429 dicovery board.
Added code:
/* PA01 = USER Button1 */ gpio_dsc.port = 0; gpio_dsc.pin = 0; stm32f2_gpio_config(&gpio_dsc, STM32F2_GPIO_ROLE_IN); |
# echo 0 > /sys/class/gpio/export # echo in > /sys/class/gpio/gpio0/direction # cat /sys/class/gpio/gpio0/value 1 or 0 <-- Button state |
No comments:
Post a Comment