![]() This is the kind that is used in Go (actually CGo) for exporting functions. I think it's best to use //export instead of our custom //go:export pragma, for consistency (they are equivalent in TinyGo). Therefore I've updated all instances to the standard format (except for two that are updated in https://github.com/tinygo-org/tinygo/pull/1024). No smoke tests changed (when comparing the output hash), except for some wasm tests that include DWARF debug info and tend to be flaky anyway. |
||
---|---|---|
.. | ||
README.md | ||
systick.go |
TinyGo ARM SysTick example
This example uses the ARM System Timer to blink an LED. The timer fires an interrupt 10 times per second. The interrupt handler toggles the LED on and off.
Many ARM-based chips have this timer feature. If you run the example and the LED blinks, then you have one.
The System Timer runs from a cycle counter. The more cycles, the slower the LED will blink. This counter is 24 bits wide, which places an upper bound on the number of cycles, and the slowness of the blinking.