forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Keymap] Update Helix:five_rows OLED code (qmk#14427)
* Stop using snprintf() in keymaps/five_rows/oled_display.c. The binary size becomes 1350 bytes smaller. make HELIX=verbose,core-oled helix/rev2/sc:five_rows (104 bytes over) -> (95%, 1256 bytes free) make helix/rev3_5rows:five_rows (528 bytes over) -> (97%, 830 bytes free) * add matrix scan rate display to OLED for keymaps/five_rows * add matrix_output_unselect_delay.c to helix keymaps/five_rows * add GPLv2 header * apply review comment
- Loading branch information
Showing
8 changed files
with
256 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
keyboards/helix/rev2/keymaps/five_rows/matrix_output_unselect_delay.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* Copyright 2021 mtei | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include QMK_KEYBOARD_H | ||
|
||
void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { | ||
/* If none of the keys are pressed, | ||
* there is no need to wait for time for the next line. */ | ||
if (key_pressed) { | ||
# ifdef MATRIX_IO_DELAY | ||
# if MATRIX_IO_DELAY > 0 | ||
wait_us(MATRIX_IO_DELAY); | ||
# endif | ||
# else | ||
wait_us(30); | ||
# endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
keyboards/helix/rev3_5rows/keymaps/five_rows/matrix_output_unselect_delay.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* Copyright 2021 mtei | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include QMK_KEYBOARD_H | ||
|
||
void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { | ||
/* If none of the keys are pressed, | ||
* there is no need to wait for time for the next line. */ | ||
if (key_pressed) { | ||
# ifdef MATRIX_IO_DELAY | ||
# if MATRIX_IO_DELAY > 0 | ||
wait_us(MATRIX_IO_DELAY); | ||
# endif | ||
# else | ||
wait_us(30); | ||
# endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.