Last active
May 8, 2024 23:12
-
-
Save lf94/4ac501df6119be38743fa22028c6a9f2 to your computer and use it in GitHub Desktop.
WeAct STM32F103C8T6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\ pins | |
: port.b $40010C00 ; | |
: port.b.odr port.b $C + ; | |
: pb2.init 8 lshift port.b ; | |
: pb2.out 2 lshift port.b.odr ; | |
\ device | |
: blue-led.init %0010 pb2.init ! ; | |
: blue-led.on -1 pb2.out ! ; | |
: blue-led.off 0 pb2.out ! ; | |
: blue-led.blink 100 0 do blue-led.on 100000 0 do loop blue-led.off 100000 0 do loop loop ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment