Synopsis
CTL_STATUS_t platform_hook_timer(PLATFORM_HOOK_t *p,
                                 unsigned frequency);
Description

platform_hook_timer hooks hook so that it is activated repetitively frequency times per second. The platform executes the hook in an interrupt context, not a task context.

Hooking onto a timer is a good way to execute code at a reliable fixed frequency to scan LED matrices or switches, for instance.

Return Value

platform_hook_timer returns a standard status code. Hooking a timer is inherently platform-dependent and may fail for any of the following reasons:

Thread Safety

platform_hook_timer is thread-safe.

See Also

PLATFORM_HOOK_t, platform_unhook_timer