diff --git a/src/hooks.cpp b/src/hooks.cpp index f304b51a..c4fa9a08 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -24,6 +24,11 @@ event_handler_hook_use (custom_handler_t hook) { event_handler_hook_append (hook); } +void +event_handler_hook_add (custom_handler_t hook) { + event_handler_hook_use (hook); +} + void loop_hook_replace (custom_loop_t oldHook, custom_loop_t newHook) { for (byte i = 0; i < HOOK_MAX; i++) { @@ -47,3 +52,8 @@ loop_hook_use (custom_loop_t hook) { } loop_hook_append (hook); } + +void +loop_hook_add (custom_loop_t hook) { + loop_hook_use (hook); +} diff --git a/src/hooks.h b/src/hooks.h index 686cd207..b8084092 100644 --- a/src/hooks.h +++ b/src/hooks.h @@ -28,13 +28,13 @@ extern custom_handler_t eventHandlers[HOOK_MAX]; void event_handler_hook_use (custom_handler_t hook); void event_handler_hook_append (custom_handler_t hook); +void event_handler_hook_add (custom_handler_t hook) __attribute__((deprecated)); void event_handler_hook_replace (custom_handler_t oldHook, custom_handler_t newHook); -#define event_handler_hook_add event_handler_hook_use typedef void (*custom_loop_t)(bool postClear); extern custom_loop_t loopHooks[HOOK_MAX]; void loop_hook_use (custom_loop_t hook); void loop_hook_append (custom_loop_t hook); +void loop_hook_add (custom_loop_t hook) __attribute__((deprecated)); void loop_hook_replace (custom_loop_t oldHook, custom_loop_t newHook); -#define loop_hook_add loop_hook_use