Skip to content

Commit

Permalink
teleport/native: switch from wrongly used user to kb function, boost …
Browse files Browse the repository at this point in the history
…matrix scan rate (qmk#21172)

* enable LTO

* change from _user to _kb function

* switch matrix io delay to nops, add opt=3 for higher scan rates

* disable console which was enabled for testing but collides with endpoint used by VIA

* switched from opt=3 to opt=2

* Update keyboards/teleport/native/native.c

Co-authored-by: Joel Challis <git@zvecr.com>

* slightly upped debounce, as some testers had chatter with async + default debounce

---------

Co-authored-by: Joel Challis <git@zvecr.com>
  • Loading branch information
2 people authored and autoferrit committed Dec 6, 2023
1 parent dcd63ce commit 5dd32b4
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 4 deletions.
5 changes: 4 additions & 1 deletion keyboards/teleport/native/ansi/keymaps/perfmode/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

/* Increase eeprom size to allow for 5 layers */
#define WEAR_LEVELING_BACKING_SIZE 16384
#define WEAR_LEVELING_LOGICAL_SIZE 4096
#define WEAR_LEVELING_LOGICAL_SIZE 4096

/* Increase debounce, as asym eager seems to lead to chatter with the fast polling rate in some cases */
#define DEBOUNCE 7
3 changes: 3 additions & 0 deletions keyboards/teleport/native/ansi/keymaps/perfmode/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
*/
#include QMK_KEYBOARD_H

// tested and working
void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); }

enum layers{
BASE,
GAME,
Expand Down
1 change: 1 addition & 0 deletions keyboards/teleport/native/ansi/keymaps/perfmode/rules.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DEBOUNCE_TYPE = asym_eager_defer_pk
OPT = 2

VIA_ENABLE = yes

3 changes: 2 additions & 1 deletion keyboards/teleport/native/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true
"nkro": true,
"lto": true
},
"diode_direction": "ROW2COL",
"matrix_pins": {
Expand Down
5 changes: 4 additions & 1 deletion keyboards/teleport/native/iso/keymaps/perfmode/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

/* Increase eeprom size to allow for 5 layers */
#define WEAR_LEVELING_BACKING_SIZE 16384
#define WEAR_LEVELING_LOGICAL_SIZE 4096
#define WEAR_LEVELING_LOGICAL_SIZE 4096

/* Increase debounce, as asym eager seems to lead to chatter with the fast polling rate in some cases */
#define DEBOUNCE 7
3 changes: 3 additions & 0 deletions keyboards/teleport/native/iso/keymaps/perfmode/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
*/
#include QMK_KEYBOARD_H

// tested and working
void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); }

enum layers{
BASE,
GAME,
Expand Down
1 change: 1 addition & 0 deletions keyboards/teleport/native/iso/keymaps/perfmode/rules.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DEBOUNCE_TYPE = asym_eager_defer_pk
OPT = 2

VIA_ENABLE = yes

4 changes: 3 additions & 1 deletion keyboards/teleport/native/native.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
#include "quantum.h"

/* This board has !SDB of the is31 wired to D2. Set high to enable */
void keyboard_post_init_user(void) {
void keyboard_post_init_kb(void) {
setPinOutput(B9);
writePinHigh(B9);

keyboard_post_init_user();
}

#ifdef RGB_MATRIX_ENABLE
Expand Down

0 comments on commit 5dd32b4

Please sign in to comment.