From 841a3968f5bb9fa7c246ed9f990750183e508ee5 Mon Sep 17 00:00:00 2001 From: Christian Ege Date: Sun, 29 Oct 2023 10:19:49 +0100 Subject: [PATCH 1/2] doc: fix a typo in the rtcinterrupt example Signed-off-by: Christian Ege --- src/examples/rtcinterrupt/rtcinterrupt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/examples/rtcinterrupt/rtcinterrupt.go b/src/examples/rtcinterrupt/rtcinterrupt.go index 7211e4c30b..1f1a6f814e 100644 --- a/src/examples/rtcinterrupt/rtcinterrupt.go +++ b/src/examples/rtcinterrupt/rtcinterrupt.go @@ -24,7 +24,7 @@ func main() { // Schedule and enable recurring interrupt. // 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. delay := time.Minute + 12*time.Second machine.RTC.SetInterrupt(uint32(delay.Seconds()), true, func() { println("Peekaboo!") }) From 70efd41dbc1f643f37266ffa54779ea5b6c21b6f Mon Sep 17 00:00:00 2001 From: Christian Ege Date: Wed, 1 Nov 2023 09:35:15 +0100 Subject: [PATCH 2/2] doc: provide a link to the interrupt online doc The examples shall be short and not overloaded with too much information. The details can be read up in the documentation. Signed-off-by: Christian Ege --- src/examples/rtcinterrupt/rtcinterrupt.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/examples/rtcinterrupt/rtcinterrupt.go b/src/examples/rtcinterrupt/rtcinterrupt.go index 1f1a6f814e..83d30bcc68 100644 --- a/src/examples/rtcinterrupt/rtcinterrupt.go +++ b/src/examples/rtcinterrupt/rtcinterrupt.go @@ -25,6 +25,8 @@ func main() { // Schedule and enable recurring interrupt. // The callback function is executed in the context of an interrupt handler, // 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 machine.RTC.SetInterrupt(uint32(delay.Seconds()), true, func() { println("Peekaboo!") })