Prevent optimising out the hook functions

With the Layer code not using the hooks anymore, the Arduino builder will tell
the linker to remove any unreferenced code. As we are using dot_a_linkage, that
means that the hook functions will be removed due to being unreferenced before
plugins had a chance to reference them.

Add a dummy call in Keyboardio_::setup() to prevent this case.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/77/head
Gergely Nagy 8 years ago
parent 8d9ca8040c
commit 0d187af2c8

@ -14,6 +14,9 @@ Keyboardio_::setup(const byte keymap_count) {
KeyboardHardware.setup();
LEDControl.setup();
event_handler_hook_add (NULL);
loop_hook_add (NULL);
Layer.defaultLayer (Storage.load_primary_keymap (keymap_count));
}

Loading…
Cancel
Save