@@ -22,14 +22,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
22
22
#include "led.h"
23
23
24
24
/* -------------------------------------
25
- * Hardware / one-off hooks
25
+ * Protocol hooks
26
26
* ------------------------------------- */
27
27
28
- /* Called once, before initialising USB . */
28
+ /* Called once, very early stage of initialization, just after processor startup . */
29
29
/* Default behaviour: do nothing. */
30
30
void hook_early_init (void );
31
31
32
- /* Called once, after USB is connected and keyboard initialised . */
32
+ /* Called once, very last stage of initialization, just before keyboard loop . */
33
33
/* Default behaviour: do nothing. */
34
34
void hook_late_init (void );
35
35
@@ -47,12 +47,9 @@ void hook_usb_suspend_loop(void);
47
47
* the "normal" indicator LED status by default. */
48
48
void hook_usb_wakeup (void );
49
49
50
- /* Called once, on checking the bootmagic combos. */
51
- /* Default behaviour: do nothing. */
52
- void hook_bootmagic (void );
53
50
54
51
/* -------------------------------------
55
- * Keyboard / periodic hooks
52
+ * Keyboard hooks
56
53
* ------------------------------------- */
57
54
58
55
/* Called periodically from the keyboard loop (very often!) */
@@ -63,12 +60,21 @@ void hook_keyboard_loop(void);
63
60
/* Default behaviour: do nothing. */
64
61
void hook_matrix_change (keyevent_t event );
65
62
63
+ /* Called on default layer state change event. */
64
+ /* Default behaviour: do nothing. */
65
+ void hook_default_layer_change (uint32_t default_layer_state );
66
+
66
67
/* Called on layer state change event. */
67
68
/* Default behaviour: do nothing. */
68
- void hook_layer_change (uint8_t layer_state );
69
+ void hook_layer_change (uint32_t layer_state );
69
70
70
71
/* Called on indicator LED update event (when reported from host). */
71
- /* Default behaviour: calls keyboard_set_leds (for compatibility) . */
72
+ /* Default behaviour: calls keyboard_set_leds. */
72
73
void hook_keyboard_leds_change (uint8_t led_status );
73
74
75
+ /* Called once, on checking the bootmagic combos. */
76
+ /* Default behaviour: do nothing. */
77
+ void hook_bootmagic (void );
78
+
79
+
74
80
#endif /* _HOOKS_H_ */
0 commit comments