Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/refs/api/rtos/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

The event loop is a mechanism that you can use to defer the execution of code to a different context. A common use of an event loop is to postpone the execution of a code sequence from an interrupt handler to a user context.

#### Events Class Reference
##### Events Class Reference

[![View code](https://www.mbed.com/embed/?type=library)](https://docs.mbed.com/docs/mbed-os-api/en/mbed-os-5.5/api/Event_8h_source.html)

#### Events example: deferring from interrupt context
##### Events example: deferring from interrupt context

The code executes two handler functions (`rise_handler` and `fall_handler`) in two different contexts:

Expand All @@ -15,13 +15,13 @@ The code executes two handler functions (`rise_handler` and `fall_handler`) in t

[![View code](https://www.mbed.com/embed/?url=https://developer.mbed.org/teams/mbed_example/code/events_ex_1/)](https://developer.mbed.org/teams/mbed_example/code/events_ex_1/file/6ae734681f16/main.cpp)

#### Events example: posting events to the queue
##### Events example: posting events to the queue

The code below demonstrates queueing functions to be called after a delay and queueing functions to be called periodically.

[![View code](https://www.mbed.com/embed/?url=https://developer.mbed.org/teams/mbed_example/code/events_ex_2/)](https://developer.mbed.org/teams/mbed_example/code/events_ex_2/file/488fe91e2e80/main.cpp)

#### Events example: chaining events from more than one queue
##### Events example: chaining events from more than one queue

Event queues easily align with module boundaries, where internal state can be
implicitly synchronized through event dispatch. Multiple modules can use
Expand Down