mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 10:43:29 +00:00
doc: fix a typo in the rtcinterrupt example (#3981)
docs: fix a typo in the rtcinterrupt example, also provide a link to the interrupt online doc
This commit is contained in:
@@ -24,7 +24,9 @@ func main() {
|
|||||||
|
|
||||||
// Schedule and enable recurring interrupt.
|
// Schedule and enable recurring interrupt.
|
||||||
// The callback function is executed in the context of an interrupt handler,
|
// The callback function is executed in the context of an interrupt handler,
|
||||||
// so regular restructions for this sort of code apply: no blocking, no memory allocation, etc.
|
// so regular restrictions for this sort of code apply: no blocking, no memory allocation, etc.
|
||||||
|
// Please check the online documentation for the details about interrupts:
|
||||||
|
// https://tinygo.org/docs/concepts/compiler-internals/interrupts/
|
||||||
delay := time.Minute + 12*time.Second
|
delay := time.Minute + 12*time.Second
|
||||||
machine.RTC.SetInterrupt(uint32(delay.Seconds()), true, func() { println("Peekaboo!") })
|
machine.RTC.SetInterrupt(uint32(delay.Seconds()), true, func() { println("Peekaboo!") })
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user