master
rgb_matrix
planck_rev6
error_log_cleanup
info_json_docs
info_json_updates
keycode_versioning
readme-update
cb2x1800
new_project_fix
moxygen
clueboard_hotswap
handwire
twi2c
arm_audio_fixes
xmega_support
audio_out
gb_port
clueboard_1
info_json_populate
pjrc_hid
subvendor_ids
stm32l476
docs
matrix_update
ps2avrgb
travis_phases
dz_support
make_autocomplete
hid_api
clueboard_arm
sid
keyboards_json
keyboard_identifiers
pp_definitions
teensy_lc_synth
eeprom_update
process_keycode_update
b6_b7_audio
example_keyboards
preonic-1.0
planck-4.0
preonic-2.0
planck-5.0
planck-4.2
planck-4.1
ergodox_ez-161205
0.6.9
0.6.8
0.6.7
0.6.6
0.6.5
0.6.4
0.6.3
0.6.20
0.6.2
0.6.19
0.6.18
0.6.17
0.6.16
0.6.15
0.6.14
0.6.13
0.6.12
0.6.11
0.6.10
0.6.1
0.6.0
0.5.99
0.5.98
0.5.97
0.5.96
0.5.95
0.5.94
0.5.93
0.5.92
0.5.91
0.5.90
0.5.9
0.5.89
0.5.88
0.5.87
0.5.86
0.5.85
0.5.84
0.5.83
0.5.82
0.5.81
0.5.80
0.5.8
0.5.79
0.5.78
0.5.77
0.5.76
0.5.75
0.5.74
0.5.73
0.5.72
0.5.71
0.5.70
0.5.7
0.5.69
0.5.68
0.5.67
0.5.66
0.5.65
0.5.64
0.5.63
0.5.62
0.5.61
0.5.60
0.5.6
0.5.59
0.5.58
0.5.57
0.5.56
0.5.55
0.5.54
0.5.53
0.5.52
0.5.51
0.5.50
0.5.5
0.5.49
0.5.48
0.5.47
0.5.46
0.5.45
0.5.44
0.5.43
0.5.42
0.5.41
0.5.40
0.5.4
0.5.39
0.5.38
0.5.37
0.5.36
0.5.35
0.5.34
0.5.33
0.5.32
0.5.31
0.5.30
0.5.3
0.5.29
0.5.28
0.5.27
0.5.264
0.5.263
0.5.262
0.5.261
0.5.260
0.5.26
0.5.259
0.5.258
0.5.257
0.5.256
0.5.255
0.5.254
0.5.253
0.5.252
0.5.251
0.5.250
0.5.25
0.5.249
0.5.248
0.5.247
0.5.246
0.5.245
0.5.244
0.5.243
0.5.242
0.5.241
0.5.240
0.5.24
0.5.239
0.5.238
0.5.237
0.5.236
0.5.235
0.5.234
0.5.233
0.5.232
0.5.231
0.5.230
0.5.23
0.5.229
0.5.228
0.5.227
0.5.226
0.5.225
0.5.224
0.5.223
0.5.222
0.5.221
0.5.220
0.5.22
0.5.219
0.5.218
0.5.217
0.5.216
0.5.215
0.5.214
0.5.213
0.5.212
0.5.211
0.5.210
0.5.21
0.5.209
0.5.208
0.5.207
0.5.206
0.5.205
0.5.204
0.5.203
0.5.202
0.5.201
0.5.200
0.5.20
0.5.2
0.5.199
0.5.198
0.5.197
0.5.196
0.5.195
0.5.194
0.5.193
0.5.192
0.5.191
0.5.190
0.5.189
0.5.188
0.5.187
0.5.186
0.5.185
0.5.184
0.5.183
0.5.182
0.5.181
0.5.180
0.5.179
0.5.178
0.5.177
0.5.176
0.5.175
0.5.174
0.5.173
0.5.172
0.5.171
0.5.170
0.5.17
0.5.169
0.5.168
0.5.167
0.5.166
0.5.165
0.5.164
0.5.163
0.5.162
0.5.161
0.5.160
0.5.16
0.5.159
0.5.158
0.5.157
0.5.156
0.5.155
0.5.154
0.5.153
0.5.152
0.5.151
0.5.150
0.5.15
0.5.149
0.5.148
0.5.147
0.5.146
0.5.145
0.5.144
0.5.143
0.5.142
0.5.141
0.5.140
0.5.14
0.5.139
0.5.138
0.5.137
0.5.136
0.5.135
0.5.134
0.5.133
0.5.132
0.5.131
0.5.130
0.5.13
0.5.129
0.5.128
0.5.127
0.5.126
0.5.125
0.5.124
0.5.123
0.5.122
0.5.121
0.5.120
0.5.12
0.5.119
0.5.118
0.5.117
0.5.116
0.5.115
0.5.114
0.5.113
0.5.112
0.5.111
0.5.110
0.5.11
0.5.109
0.5.108
0.5.107
0.5.106
0.5.105
0.5.104
0.5.103
0.5.102
0.5.101
0.5.100
0.5.10
0.5.1
0.5.0
${ noResults }
11 Commits (c10264ef790f4bc11ca42b5fb759fc793bdb6f1e)
Author | SHA1 | Message | Date |
---|---|---|---|
Seebs | d1feb8744a |
Don't "unselect" left-hand rows
"unselecting" left-hand rows is a wasted i2c transaction. On the left-hand side, the ergodox uses a GPIO expander. It does *not* change "direction" (input/output) of pins, it just sets pins high or low. But all the pins are written at once. There's no way to change just one pin's value; you send a full byte of all eight row pins. (Not all of them are in use, but that doesn't matter.) So every pin is either +V or ground. This is in contrast with the right-hand side, which is using input mode to make pins be neutral. So there's no need to "deselect" the rows on the left side at all. To select row 0, you set the GPIO register for the rows to 0xFE. The previous code would then set it back to 0xFF, then set it to 0xFD on the next cycle. But we can just omit the intervening step, and set it to 0xFD next cycle, and get the same results. And yes, I tested that the keyboard still works. On my system, scan rate as reported by DEBUG_SCAN_RATE goes from 445 or so to 579 or so, thus, from ~2.24ms to ~1.73ms. Signed-off-by: seebs <seebs@seebs.net> |
7 years ago |
Seebs | 7fbe6c3594 |
improve ergodox ez performance
With these changes, the ergodox ez goes from 315 scans per second when no keys are pressed (~3.17ms/scan) to 447 (~2.24ms/scan). The changes to the pin read are just condensing the logic, and replacing a lot of conditional operations with a single bitwise inversion. The change to row scanning is more significant, and merits explanation. In general, you can only scan one row of a keyboard at a time, because if you scan two rows, you no longer know which row is pulling a given column down. But in the Ergodox design, this isn't the case; the left hand is controlled by an I2C-based GPIO expander, and the columns and rows are *completely separate* electrically from the columns and rows on the right-hand side. So simply reading rows in parallel offers two significant improvements. One is that we no longer need the 30us delay after each right-hand row, because we're spending more than 30us communicating with the left hand over i2c. Another is that we're no longer wastefully sending i2c messages to the left hand to unselect rows when no rows had actually been selected in the first place. These delays were, between them, coming out to nearly 30% of the time spent in each scan. Signed-off-by: seebs <seebs@seebs.net> |
7 years ago |
Don Armstrong | 2e3b99f7f1 | update left led support | 7 years ago |
Jack Humbert | d2ff66a985 |
Creates a layouts/ folder for keymaps shared between keyboards (#1609)
* include variables and .h files as pp directives * start layout compilation * split ergodoxes up * don't compile all layouts for everything * might seg fault * reset layouts variable * actually reset layouts * include rules.mk instead * remove includes from rules.mk * update variable setting * load visualizer from path * adds some more examples * adds more layouts * more boards added * more boards added * adds documentation for layouts * use lowercase names for LAYOUT_ * add layout.json files for each layout * add community folder, default keymaps for layouts * touch-up default layouts * touch-up layouts, some keyboard rules.mk * update documentation for layouts * fix up serial/i2c switches |
7 years ago |
Fred Sundvik | 9af995c59b |
Initial structure for Ergodox as subprojects
Only the EZ default keymaps compiles at the moment though. |
8 years ago |
Jack Humbert | 3577e26fd9 | fix/annotate wait_us lines | 8 years ago |
Jack Humbert | 86a7b060ef | Adds wait to i2c (debounce) | 8 years ago |
Jack Humbert | eafaba6b53 | Improves debounce | 8 years ago |
Jack Humbert | 65faab3b89 |
Moves features to their own files (process_*), adds tap dance feature (#460)
* non-working commit * working * subprojects implemented for planck * pass a subproject variable through to c * consolidates clueboard revisions * thanks for letting me know about conflicts.. * turn off audio for yang's * corrects starting paths for subprojects * messing around with travis * semicolon * travis script * travis script * script for travis * correct directory (probably), amend files to commit * remove origin before adding * git pull, correct syntax * git checkout * git pull origin branch * where are we? * where are we? * merging * force things to happen * adds commit message, adds add * rebase, no commit message * rebase branch * idk! * try just pull * fetch - merge * specify repo branch * checkout * goddammit * merge? idk * pls * after all * don't split up keyboards * syntax * adds quick for all-keyboards * trying out new script * script update * lowercase * all keyboards * stop replacing compiled.hex automatically * adds if statement * skip automated build branches * forces push to automated build branch * throw an add in there * upstream? * adds AUTOGEN * ignore all .hex files again * testing out new repo * global ident * generate script, keyboard_keymap.hex * skip generation for now, print pandoc info, submodule update * try trusty * and sudo * try generate * updates subprojects to keyboards * no idea * updates to keyboards * cleans up clueboard stuff * setup to use local readme * updates cluepad, planck experimental * remove extra led.c [ci skip] * audio and midi moved over to separate files * chording, leader, unicode separated * consolidate each [skip ci] * correct include * quantum: Add a tap dance feature (#451) * quantum: Add a tap dance feature With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter. To make it clear how this is different from `ACTION_FUNCTION_TAP`, lets explore a certain setup! We want one key to send `Space` on single tap, but `Enter` on double-tap. With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be send first. Thus, `SPC a` will result in `a SPC` being sent, if they are typed within `TAPPING_TERM`. With the tap dance feature, that'll come out as `SPC a`, correctly. The implementation hooks into two parts of the system, to achieve this: into `process_record_quantum()`, and the matrix scan. We need the latter to be able to time out a tap sequence even when a key is not being pressed, so `SPC` alone will time out and register after `TAPPING_TERM` time. But lets start with how to use it, first! First, you will need `TAP_DANCE_ENABLE=yes` in your `Makefile`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array. This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are two possible options: * `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. * `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the current state of the tap-dance action. The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. And that's the bulk of it! Do note, however, that this implementation does have some consequences: keys do not register until either they reach the tapping ceiling, or they time out. This means that if you hold the key, nothing happens, no repeat, no nothing. It is possible to detect held state, and register an action then too, but that's not implemented yet. Keys also unregister immediately after being registered, so you can't even hold the second tap. This is intentional, to be consistent. And now, on to the explanation of how it works! The main entry point is `process_tap_dance()`, called from `process_record_quantum()`, which is run for every keypress, and our handler gets to run early. This function checks whether the key pressed is a tap-dance key. If it is not, and a tap-dance was in action, we handle that first, and enqueue the newly pressed key. If it is a tap-dance key, then we check if it is the same as the already active one (if there's one active, that is). If it is not, we fire off the old one first, then register the new one. If it was the same, we increment the counter and the timer. This means that you have `TAPPING_TERM` time to tap the key again, you do not have to input all the taps within that timeframe. This allows for longer tap counts, with minimal impact on responsiveness. Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-dance keys. For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros. In the end, lets see a full example! ```c enum { CT_SE = 0, CT_CLN, CT_EGG }; /* Have the above three on the keymap, TD(CT_SE), etc... */ void dance_cln (qk_tap_dance_state_t *state) { if (state->count == 1) { register_code (KC_RSFT); register_code (KC_SCLN); unregister_code (KC_SCLN); unregister_code (KC_RSFT); } else { register_code (KC_SCLN); unregister_code (KC_SCLN); reset_tap_dance (state); } } void dance_egg (qk_tap_dance_state_t *state) { if (state->count >= 100) { SEND_STRING ("Safety dance!"); reset_tap_dance (state); } } const qk_tap_dance_action_t tap_dance_actions[] = { [CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT) ,[CT_CLN] = ACTION_TAP_DANCE_FN (dance_cln) ,[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg) }; ``` This addresses #426. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org> * hhkb: Fix the build with the new tap-dance feature Signed-off-by: Gergely Nagy <algernon@madhouse-project.org> * tap_dance: Move process_tap_dance further down Process the tap dance stuff after midi and audio, because those don't process keycodes, but row/col positions. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org> * tap_dance: Use conditionals instead of dummy functions To be consistent with how the rest of the quantum features are implemented, use ifdefs instead of dummy functions. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org> * Merge branch 'master' into quantum-keypress-process # Conflicts: # Makefile # keyboards/planck/rev3/config.h # keyboards/planck/rev4/config.h * update build script |
8 years ago |
Jack Humbert | b68b722325 | updates ez's matrix to spec | 8 years ago |
Jack Humbert | 649b33d778 |
Renames keyboard folder to keyboards, adds couple of tmk's fixes (#432)
* fixes from tmk's repo * rename keyboard to keyboards |
9 years ago |