Skip to content

Commit

Permalink
doc: provide a link to the interrupt online doc
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
graugans committed Nov 1, 2023
1 parent 841a396 commit 70efd41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/examples/rtcinterrupt/rtcinterrupt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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!") })

Expand Down

0 comments on commit 70efd41

Please sign in to comment.