From b68b722325e1f0f68387e161365fa8e31c79b7b2 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 23 Jun 2016 23:14:21 -0400 Subject: [PATCH] updates ez's matrix to spec --- keyboards/ergodox_ez/matrix.c | 8 ++++++++ quantum/quantum.c | 6 ------ readme.md | 19 ++++++++++--------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index 2a7dfba21d..e0de06c349 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -61,12 +61,20 @@ uint32_t matrix_scan_count; #endif +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + __attribute__ ((weak)) void matrix_init_kb(void) { + matrix_init_user(); } __attribute__ ((weak)) void matrix_scan_kb(void) { + matrix_scan_user(); } inline diff --git a/quantum/quantum.c b/quantum/quantum.c index 3f2edfc92c..9c0f9691ff 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1,11 +1,5 @@ #include "quantum.h" -__attribute__ ((weak)) -void matrix_init_kb(void) {} - -__attribute__ ((weak)) -void matrix_scan_kb(void) {} - __attribute__ ((weak)) bool process_action_kb(keyrecord_t *record) { return true; diff --git a/readme.md b/readme.md index fbd9203a57..ff75c0fe9e 100644 --- a/readme.md +++ b/readme.md @@ -85,7 +85,7 @@ If you have any problems building the firmware, you can try using a tool called 3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`. 4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below. -# Customizing, building, and flashing your keymap +# Customizing your keymap In every keymap folder, the following files are recommended: @@ -215,7 +215,7 @@ For a value of `4` for this imaginary setting. So we `undef` it first, then `def You can then override any settings, rather than having to copy and paste the whole thing. -## Editing your keymap +## Going beyond the keycodes Aside from the [basic keycodes](doc/keycode.txt), your keymap can include shortcuts to common operations. @@ -564,7 +564,7 @@ You can currently send 4 hex digits with your OS-specific modifier key (RALT for Enable the backlight from the Makefile. -# Custom Quantum functions for keyboards and keymaps +# Custom Quantum functions All of these functions are available in the `*_kb()` or `*_user()` variety. `kb` ones should only be used in the `/.c` file, and `user` ones should only be used in the `keymap.c`. The keyboard ones call the user ones - it's necessary to keep these calls to allow the keymap functions to work correctly. @@ -613,8 +613,9 @@ This gets called whenever there is a state change on your host LEDs (eg caps loc and can be tested against the `usb_led` with a conditional like `if (usb_led & (1<