diff options
Diffstat (limited to 'docs/custom_quantum_functions.md')
| -rw-r--r-- | docs/custom_quantum_functions.md | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 694b421e7..494e76996 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md | |||
| @@ -144,6 +144,14 @@ This is useful for setting up stuff that you may need elsewhere, but isn't hardw | |||
| 144 | * Keyboard/Revision: `void matrix_init_kb(void)` | 144 | * Keyboard/Revision: `void matrix_init_kb(void)` |
| 145 | * Keymap: `void matrix_init_user(void)` | 145 | * Keymap: `void matrix_init_user(void)` |
| 146 | 146 | ||
| 147 | ### Low-level Matrix Overrides Function Documentation :id=low-level-matrix-overrides | ||
| 148 | |||
| 149 | * GPIO pin initialisation: `void matrix_init_pins(void)` | ||
| 150 | * This needs to perform the low-level initialisation of all row and column pins. By default this will initialise the input/output state of each of the GPIO pins listed in `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no initialisation of pin state will occur within QMK itself, instead deferring to the keyboard's override. | ||
| 151 | * `COL2ROW`-based row reads: `void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)` | ||
| 152 | * `ROW2COL`-based column reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)` | ||
| 153 | * `DIRECT_PINS`-based reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)` | ||
| 154 | * These three functions need to perform the low-level retrieval of matrix state of relevant input pins, based on the matrix type. Only one of the functions should be implemented, if needed. By default this will iterate through `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, configuring the inputs and outputs based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no manipulation of matrix GPIO pin state will occur within QMK itself, instead deferring to the keyboard's override. | ||
| 147 | 155 | ||
| 148 | ## Keyboard Post Initialization code | 156 | ## Keyboard Post Initialization code |
| 149 | 157 | ||
| @@ -374,7 +382,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 374 | } | 382 | } |
| 375 | } | 383 | } |
| 376 | ``` | 384 | ``` |
| 377 | And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EEP_RST` keycode or [Bootmagic](feature_bootmagic.md) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued. | 385 | And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EEP_RST` keycode or [Bootmagic Lite](feature_bootmagic.md) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued. |
| 378 | 386 | ||
| 379 | ```c | 387 | ```c |
| 380 | void eeconfig_init_user(void) { // EEPROM is getting reset! | 388 | void eeconfig_init_user(void) { // EEPROM is getting reset! |
