Update pyb.Switch() to support multiple buttons?
Posted: Thu Oct 10, 2019 2:22 am
On boards such as the MCUDev Black STM32F407VET6, there are 2x user buttons.
In the board definition I've defined KEY0 as the main switch.
Is it worth updating pyb.Switch() to support multiple switches? eg.
pyb.Switch() == KEY0
pyb.Switch(1) == KEY0
pyb.Switch(2) == KEY1
Or is pyb.Switch deprecated in favour of just using machine.Pin and pin.irq()?
In the board definition I've defined KEY0 as the main switch.
Is it worth updating pyb.Switch() to support multiple switches? eg.
pyb.Switch() == KEY0
pyb.Switch(1) == KEY0
pyb.Switch(2) == KEY1
Or is pyb.Switch deprecated in favour of just using machine.Pin and pin.irq()?