diff options
| author | Noah Andrews <NoahAndrews@users.noreply.github.com> | 2016-03-28 18:37:39 -0400 |
|---|---|---|
| committer | Noah Andrews <NoahAndrews@users.noreply.github.com> | 2016-03-28 18:37:39 -0400 |
| commit | 535daad3cd812df58f4630df202a447836ac3084 (patch) | |
| tree | 4591f47555acb1d88f08caa7ab3bbb40fd828637 /quantum/template/template.c | |
| parent | ccf848917b7e931327f6c4a469877e9d8ef238ea (diff) | |
| parent | 4a43c5684476611370820bd9592712754c211c52 (diff) | |
Merge remote-tracking branch 'jackhumbert/master' into improve-buildguide
Diffstat (limited to 'quantum/template/template.c')
| -rw-r--r-- | quantum/template/template.c | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/quantum/template/template.c b/quantum/template/template.c index 7be7dfc3d1..cc52e496ff 100644 --- a/quantum/template/template.c +++ b/quantum/template/template.c @@ -1,29 +1,48 @@ #include "%KEYBOARD%.h" __attribute__ ((weak)) -void * matrix_init_user(void) { - // leave these blank +void matrix_init_user(void) { + // leave this function blank - it can be defined in a keymap file }; __attribute__ ((weak)) -void * matrix_scan_user(void) { - // leave these blank -}; +void matrix_scan_user(void) { + // leave this function blank - it can be defined in a keymap file +} + +__attribute__ ((weak)) +void process_action_user(keyrecord_t *record) { + // leave this function blank - it can be defined in a keymap file +} + +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { + // leave this function blank - it can be defined in a keymap file +} -void * matrix_init_kb(void) { +void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up - if (matrix_init_user) { - (*matrix_init_user)(); - } -}; + matrix_init_user(); +} -void * matrix_scan_kb(void) { +void matrix_scan_kb(void) { // put your looping keyboard code here // runs every cycle (a lot) - if (matrix_scan_user) { - (*matrix_scan_user)(); - } -};
\ No newline at end of file + matrix_scan_user(); +} + +void process_action_kb(keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + process_action_user(record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} |
