Synopsis
typedef struct {
  void (*fn)(void *);
  void *arg;
  int __internal;
  PLATFORM_HOOK_s *__next;
} PLATFORM_HOOK_t;
Description

PLATFORM_HOOK_t describes a hook function that is typically executed asynchronously. The Platform Library provides a number of ways for hooks to be run, using high-frequency and low-frequency timers, and on the transitions of platform pins.

fn
Method to execute when the hook fires.
arg
Argument to pass to fn when the hook fires.
__internal
Private member for use by the Platform Library.
__next
Private member that points to the next hook function an a hook list. Do not assume anything about the list that this member points to.
Note

You only need to initialize fn and arg in the hook structure when passing the hook to a registration routine—the Platform Library takes care of managing __internal and __next.

See Also

platform_hook_pin_edge, platform_hook_background, platform_hook_timer