File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 66 "device/arm"
77
88 "machine"
9+
10+ "device/py32"
911)
1012
1113//export Reset_Handler
@@ -14,24 +16,24 @@ func main() {
1416
1517 machine .LED4 .Configure (machine.PinConfig {Mode : machine .PinOutput })
1618
17- ConfigureSystemTimer (8e6 )
19+ py32 .RCC .SetICSCR_HSI_FS (py32 .RCC_ICSCR_HSI_FS_Freq24MHz )
20+
21+ ConfigureSystemTimer (24e6 )
1822
1923 run ()
2024 exit (0 )
2125}
2226
23- const shift = 15
24-
2527func ConfigureSystemTimer (systemFrequencyHz uint32 ) {
2628 arm .SetupSystemTimer (systemFrequencyHz / 1000 )
2729}
2830
2931func ticksToNanoseconds (ticks timeUnit ) int64 {
30- return int64 (ticks * 1_000_000 )
32+ return int64 (ticks * 1000_000 )
3133}
3234
3335func nanosecondsToTicks (ns int64 ) timeUnit {
34- return timeUnit (ns / 1_000_000 )
36+ return timeUnit (ns / 1000_000 )
3537}
3638
3739var tickCounter uint64
You can’t perform that action at this time.
0 commit comments