Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (10 sloc) 420 Bytes
\ Simple framework for blinking the onboard LED
\ define the pin.
\ Change if you have different hardware -- the rest should work
PC13 constant led.pin ( for blue pill boards )
\ PA1 constant led.pin ( for hytiny boards )
\ set output mode, push-pull driver
: led.init omode-pp led.pin io-mode! ;
: led.on led.pin ioc! ; \ LED lights up when port low
: led.off led.pin ios! ;
: led.toggle led.pin iox! ;
You can’t perform that action at this time.