blob: 7ab975634dd5a5068269fb1f40bd9a02ad792c31 [file] [log] [blame]
\ Driver for switch connected to a GPIO
3 value switch-gpio
: init-gpio-switch ( gpio# -- )
to switch-gpio
true gpio-input switch-gpio gpio-mode
;
: switch? ( -- flag ) switch-gpio gpio-pin@ 0= ;