qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.31k stars 39.45k forks source link

Support for Massdrop x Input Club K-Type #1942

Closed KMontag42 closed 6 years ago

KMontag42 commented 7 years ago

Wuddup yooooo!

Any plans to add support for the new K-Type to QMK??

belak commented 7 years ago

Adding basic support shouldn't be hard, but adding full LED support will most likely be a challenge. Last I knew there was still quite a bit of work left to do on the visualization front.

If you're interested in doing the port yourself, it should be as simple as copying a different TKL keyboard and updating it with the correct info (CPU, matrix layout, etc) from the following links:

EDIT: If I have time later today, I'll look at adding basic support

belak commented 7 years ago

I started on it but haven't gotten it running yet. I've got most of the busywork and scancodes done (I think)... but I haven't been able to find any info on which chip this is built on (among other things) so it's definitely missing some important settings.

KMontag42 commented 7 years ago

If you have a branch I'd be happy to help out however possible, let me know.

<3

belak commented 7 years ago

Once I have a build that flashes properly, I'll look at opening a PR. There is a branch at https://github.com/qmk/qmk_firmware/compare/master...belak:k-type-support but keep in mind this doesn't work at all right now.

belak commented 7 years ago

This patch is needed to get the firmware to boot (we'll look at including this in a board file similar to the clueboard support eventually). However, USB support is still broken.

The following code comes from here:

chibios-contrib % git diff
diff --git a/os/hal/ports/KINETIS/K20x/hal_lld.c b/os/hal/ports/KINETIS/K20x/hal_lld.c
index e6eeed8..cb8edd8 100644
--- a/os/hal/ports/KINETIS/K20x/hal_lld.c
+++ b/os/hal/ports/KINETIS/K20x/hal_lld.c
@@ -93,8 +93,10 @@ void hal_lld_init(void) {
  *
  * @special
  */
+#define WDOG_TMROUTL            *(volatile uint16_t *)0x40052012^M
 void k20x_clock_init(void) {
 #if !KINETIS_NO_INIT
+  while (WDOG_TMROUTL < 2); // Must wait for WDOG timer if already running, before jumping^M

   /* Disable the watchdog */
   WDOG->UNLOCK = 0xC520;
KMontag42 commented 6 years ago

sorry for the late reply, I will be trying this out over the weekend!!!!