Skip to content

Instantly share code, notes, and snippets.

@ChuckM
Last active August 29, 2015 14:12
Show Gist options
  • Save ChuckM/b56c25fb99764d48492f to your computer and use it in GitHub Desktop.
Save ChuckM/b56c25fb99764d48492f to your computer and use it in GitHub Desktop.
How to do a simple callback example
void
callback(void) {
... do what you need to do ...;
}
void notify_on_true(uint32_t gpio_bit, (void ()) *callme) {
if (read_gpio() & gpio_bit) != 0) {
*callme();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment