CTL_STATUS_t platform_hook_timer(PLATFORM_HOOK_t *p, unsigned frequency);
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.
platform_hook_timer returns a standard status code. Hooking a timer is inherently platform-dependent and may fail for any of the following reasons:
platform_hook_timer is thread-safe.