File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -5,17 +5,13 @@ package runtime
55import (
66 "device/arm"
77
8- "machine"
9-
108 "device/py32"
119)
1210
1311//export Reset_Handler
1412func main () {
1513 preinit ()
1614
17- machine .LED4 .Configure (machine.PinConfig {Mode : machine .PinOutput })
18-
1915 py32 .RCC .SetICSCR_HSI_FS (py32 .RCC_ICSCR_HSI_FS_Freq24MHz )
2016
2117 ConfigureSystemTimer (24e6 )
@@ -24,6 +20,8 @@ func main() {
2420 exit (0 )
2521}
2622
23+ // Configure SysTick to fire every 1ms on given system frequency.
24+ // This should be called after any changes to the system clock frequency.
2725func ConfigureSystemTimer (systemFrequencyHz uint32 ) {
2826 arm .SetupSystemTimer (systemFrequencyHz / 1000 )
2927}
@@ -61,10 +59,4 @@ func putchar(c byte) {
6159//export SysTick_Handler
6260func handleSysTick () {
6361 tickCounter = tickCounter + 1
64- //machine.LED4.Set(!machine.LED4.Get())
65- machine .LED4 .High ()
66- for i := 0 ; i < 100 ; i ++ {
67- arm .Asm ("nop" )
68- }
69- machine .LED4 .Low ()
7062}
You can’t perform that action at this time.
0 commit comments