geekhack

geekhack Projects => Making Stuff Together! => Topic started by: lunas on Sat, 11 March 2017, 22:23:08

Title: QMK & Infinity 60% LED support
Post by: lunas on Sat, 11 March 2017, 22:23:08
I've been diving into QMK for my Infinity 60%. I've got my layers/macros set and would love to get LEDs working. Initially just on/off but ultimately hoping for individual led control.


Before I jump down the rabbit hole, does QMK even support led control for Infinity 60's? Any suggestion where to start poking around in the firmware files?
Title: Re: QMK & Infinity 60% LED support
Post by: lunas on Mon, 13 March 2017, 18:28:29
Checking back on my own question. It's probably evident I'm stumbling around blind, but I added BACKLIGHT_ENABLED = yes to my Makefile which promptly broke the build. Stops with error 'BACKLIGHT_LEVELS' undeclared.  Setting that in config.h allowed the build, but none of the firmware shortcuts (BL_TOGG, BL_INC, etc.) seem to work, so it seems  infinity60 is not setup for LEDs out of the box in QMK.

I'm not a C programmer, so I'm probably out of my depth here, but I'm going to dig into the Whitefox LED code from a prior build I did to see if that yields any hints. Any suggestions are welcome!
Title: Re: QMK & Infinity 60% LED support
Post by: lunas on Tue, 20 June 2017, 19:23:55
After much trial and error, I've managed to create QMK backlight support for the Infinity 60% pcb (rev 1.1a). I adapted and expanded the code matt30 and flabbergast put together for the Whitefox which uses the same controller. Thanks to them to for laying the foundation.

I mainly wanted backlighting to indicate active layers, and I'm happy to finally have that visual cue.  It requires some updating in your keymap.c file to use, but if you compile the led_controller.c code into your firmware, you have a number of ways to interact with the led controller. Here is the readme: https://github.com/qmk/qmk_firmware/blob/master/keyboards/infinity60/keymaps/jpetermans/readme.md. (https://github.com/qmk/qmk_firmware/blob/master/keyboards/infinity60/keymaps/jpetermans/readme.md)

Someone else is using a different approach to create led support for the ergodox, which also has the same controller, so QMK might change this down the road. In the meantime, give it a try if you want backlighting on your newer Infinity boards.

Good luck!