-
-
Notifications
You must be signed in to change notification settings - Fork 40.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kb / user hooks - TMK vs QMK #1205
Comments
I wouldn't mind setting up a framework for more hooks like this, or even renaming some of the existing ones. I wasn't aware of the hooks TMK added - this might have happened after we forked. |
The matrix_init_ and matrix_scan_ functions seem to cover most scenarios. matrix_init worked fine for the tmk backlight code I'm working on from whitefox. It was using hook_init_early. Although, additional hooks may be less processor intensive in some cases where you don't need to run something every keyboard loop, just on a few discrete events. |
This would be nice to have. I've been using In case you're curious, tmk/tmk_keyboard@53bd4a0 was the commit that introduced hooks to TMK. There's more to that commit than just setting up hooks I believe, but the code for hooks looks pretty clean and fairly simple to move to QMK. |
This is partially done, now, actually. And #3113 |
I think the only thing that is left is bootmagic, actually. And we have And I'm not sure we really need the bootmagic hook. That can be done as part of the init functions. Right now, bootmagic lite does this during matrix_init. @jpetermans would you say that this could be closed? |
I haven't looked over everything in any detail, but there is no need for me to that. A quick review looks like it's all covered as you noted. Closing this issue. Thanks for the building in these additional options! |
* add default keymap: 1upkeyboards/pi60_rgb * update default keymaps: 40percentclub/polyandry promicro and teensy2 versions * add default keymap: ai03/lunar_ii * add default keymap: ano * update default keymap: bbrfkr/dynamis * add default keymap: binepad/bnr1/v1 * add default keymap: bolsa/bolsalice * update default keymap: bpiphany/ghost_squid * add default keymap: doio/kb16/rev1 * add default keymap: doio/kb16/rev2 * update default keymap: han60 * update default keymap: handwired/kbod * add default keymap: hotdox76v2 * add default keymap: hubble * add default keymap: huytbt/h50 * add default keymap: keebio/sinc/rev3 * add default keymap: kepler_33/proto * update default keymap: kopibeng/mnk65 * update default keymap: latincompass/latinpadble * update default keymap: macro3 * update default keymap: maxr1998/phoebe * update default keymap: mechlovin/kay65 * update default keymap: melgeek/mj6xy/rev3 * update default keymap: mode/m65hi_alpha * update default keymap: mwstudio/mw65_black * add default keymap: nightly_boards/octopadplus * update default keymap: splitkb/aurora/sweep/rev1 * add default keymap: star75 * update default keymap: wavtype/p01_ultra * add default keymap: wilba_tech/wt65_d * add default keymap: work_louder/numpad * add default keymap: yandrstudio/nz67v2 * add default keymap: binepad/bn006 * add default keymap: cannonkeys/brutalv2_1800 * update default keymap: horrortroll/chinese_pcb/black_e65 * update default keymap: horrortroll/chinese_pcb/devil68_pro * add default keymap: keychron/q1/iso_encoder
I'm in the process of trying to port over matt3o's whitefox backlight code from TMK and converting for infinity60. In another issue I opened, #1179, fredizzimo commented that he is working on a software solution for the ergodox that could be ported over. In the meantime, I thought I'd take a stab at porting over the hardward approach from the whitefox tmk code.
matt3o's led_controller code uses functions from tmk_core/common/hook.c which qmk does not have. I'm trying to translate to equivalent the kb / user level functions from qmk and want to make sure the timing of the calls is similar. My attempt is below. Bolded calls are used in led_controller.c from tmk. Do these look correct? My primary concern is matching the hook_early_init timing.
(unused in whitefox led_controller code)
(edit)
Full list of hooks to convert:
suspend_power_down_*
handles this, as of Add Suspend functions #3112)The text was updated successfully, but these errors were encountered: