Synopsis
CTL_STATUS_t platform_hook_pin_edge(int pin,
                                    PLATFORM_EDGE_t edge,
                                    PLATFORM_HOOK_t *hook);
Description

platform_hook_pin_edge hooks the function hook so that it is activated by an edge on pin pin. The edge parameter requests that the hook be triggered on a rising edge, a falling edge, or either edge.

The activated hook is executed in an interrupt context, not a task context, and without any surrounding calls to ctl_enter_isr and ctl_exit_isr. If your hook requires CTL facilities, you must ensure that you call ctl_enter_isr and ctl_exit_isr as you would in a standard CTL interrupt handler.

Return Value

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

See Also

PLATFORM_HOOK_t, PLATFORM_EDGE_t