Skip to content

Commit 40ae2b1

Browse files
committed
WIP
1 parent 443dce6 commit 40ae2b1

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/runtime/runtime_py32.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@ package runtime
55
import (
66
"device/arm"
77

8-
"machine"
9-
108
"device/py32"
119
)
1210

1311
//export Reset_Handler
1412
func 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.
2725
func ConfigureSystemTimer(systemFrequencyHz uint32) {
2826
arm.SetupSystemTimer(systemFrequencyHz / 1000)
2927
}
@@ -61,10 +59,4 @@ func putchar(c byte) {
6159
//export SysTick_Handler
6260
func 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
}

0 commit comments

Comments
 (0)