Author Topic: TMK keyboard firmware  (Read 564554 times)

0 Members and 1 Guest are viewing this topic.

Offline primitiveType

  • Posts: 38
Re: TMK keyboard firmware
« Reply #500 on: Tue, 21 October 2014, 17:49:56 »
Tried it out today, the new changes work great! you're the man Hasu!

Offline zeroni13

  • Posts: 97
  • Location: Oslo, Norway
Re: TMK keyboard firmware
« Reply #501 on: Thu, 23 October 2014, 05:15:44 »
Hello, I see TMK Has support for Bpiphany's Kitten Paw, Could anyone convert or help me convert it so it works with the Ghost Squid aswell?

Kitten Paw FW: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/kitten_paw
Schematics: http://deskthority.net/w/images/1/1b/Costar_Replacement_Controllers_Schematics.PNG

I'm clueless to where to start and I would really love using TMK on my QuickFire XT.

Thanks.
My phantom build: http://bit.ly/1rEjqp5

Offline blackbox

  • Posts: 725
Re: TMK keyboard firmware
« Reply #502 on: Thu, 23 October 2014, 05:17:43 »
Hello, I see TMK Has support for Bpiphany's Kitten Paw, Could anyone convert or help me convert it so it works with the Ghost Squid aswell?

Kitten Paw FW: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/kitten_paw
Schematics: http://deskthority.net/w/images/1/1b/Costar_Replacement_Controllers_Schematics.PNG

I'm clueless to where to start and I would really love using TMK on my QuickFire XT.

Thanks.

I would also love to have TMK on my ghost squid.
Keyboards: Dell AT102W (matias standard clicky), Maltron two-hand 3D fully ergonomic keyboard (Vintage MX Black). CM QF XT (MX Grey) IBM model M

The LAN table!
http://geekhack.org/index.php?topic=62536.0

Offline xauser

  • Posts: 97
Re: TMK keyboard firmware
« Reply #503 on: Thu, 23 October 2014, 12:44:22 »
Hello, I see TMK Has support for Bpiphany's Kitten Paw, Could anyone convert or help me convert it so it works with the Ghost Squid aswell?

Kitten Paw FW: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/kitten_paw
Schematics: http://deskthority.net/w/images/1/1b/Costar_Replacement_Controllers_Schematics.PNG

I'm clueless to where to start and I would really love using TMK on my QuickFire XT.

Thanks.

If I remember right then all costar boards share the same matrix. The controllers only differ in row/column selection. Which firmware are you currently using on your controller (link)? And what are your compile options?

For a quality tmk port you'll need the actual board and the controller to do the final testing.

Offline blackbox

  • Posts: 725
Re: TMK keyboard firmware
« Reply #504 on: Thu, 23 October 2014, 13:31:25 »
Hello, I see TMK Has support for Bpiphany's Kitten Paw, Could anyone convert or help me convert it so it works with the Ghost Squid aswell?

Kitten Paw FW: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/kitten_paw
Schematics: http://deskthority.net/w/images/1/1b/Costar_Replacement_Controllers_Schematics.PNG

I'm clueless to where to start and I would really love using TMK on my QuickFire XT.

Thanks.

If I remember right then all costar boards share the same matrix. The controllers only differ in row/column selection. Which firmware are you currently using on your controller (link)? And what are your compile options?

For a quality tmk port you'll need the actual board and the controller to do the final testing.

Hello. We have the stock controller and the xt. Since we have not used the ghost squid yet we have no compile options. The compile options for the kitten paw should work in the port. As I see it the only thing that needs to be done is to correct the pinout.
Keyboards: Dell AT102W (matias standard clicky), Maltron two-hand 3D fully ergonomic keyboard (Vintage MX Black). CM QF XT (MX Grey) IBM model M

The LAN table!
http://geekhack.org/index.php?topic=62536.0

Offline xauser

  • Posts: 97
Re: TMK keyboard firmware
« Reply #505 on: Thu, 23 October 2014, 14:04:40 »

Hello. We have the stock controller and the xt. Since we have not used the ghost squid yet we have no compile options. The compile options for the kitten paw should work in the port. As I see it the only thing that needs to be done is to correct the pinout.

Looks like it! The QuickFire XT seems to be a fullsize board like the filco. Doesn't bpiphany provide the firmware for the Ghost Squid controller?

Offline blackbox

  • Posts: 725
Re: TMK keyboard firmware
« Reply #506 on: Thu, 23 October 2014, 14:58:52 »

Hello. We have the stock controller and the xt. Since we have not used the ghost squid yet we have no compile options. The compile options for the kitten paw should work in the port. As I see it the only thing that needs to be done is to correct the pinout.

Looks like it! The QuickFire XT seems to be a fullsize board like the filco. Doesn't bpiphany provide the firmware for the Ghost Squid controller?

These should be compatible:
http://deskthority.net/wiki/Costar_replacement_controllers#Firmwares

But we wanted to know if someone could make a port of tmk.
Keyboards: Dell AT102W (matias standard clicky), Maltron two-hand 3D fully ergonomic keyboard (Vintage MX Black). CM QF XT (MX Grey) IBM model M

The LAN table!
http://geekhack.org/index.php?topic=62536.0

Offline xauser

  • Posts: 97
Re: TMK keyboard firmware
« Reply #507 on: Thu, 23 October 2014, 15:03:12 »
I can't find the the controller "Ghost Squid" in bpiphany git repository that's why I'm asking which firmware bpiphany provides for these controllers.

Edit: I can offer to port TMK firmware to the "Ghost Squid" controller for free if someone will send me the board with a ghost squid controller for the time of porting.
« Last Edit: Thu, 23 October 2014, 15:30:40 by xauser »

Offline zeroni13

  • Posts: 97
  • Location: Oslo, Norway
Re: TMK keyboard firmware
« Reply #508 on: Thu, 23 October 2014, 17:28:45 »
I can't find the the controller "Ghost Squid" in bpiphany git repository that's why I'm asking which firmware bpiphany provides for these controllers.

Edit: I can offer to port TMK firmware to the "Ghost Squid" controller for free if someone will send me the board with a ghost squid controller for the time of porting.
Wouldn't it be possible to port it just by looking at the pin difference in these schematics? http://deskthority.net/w/images/1/1b/Costar_Replacement_Controllers_Schematics.PNG

Edit:
If not, and you need the controller for the job i would gladly send mine to you, but that kinda depends on where you are located at. I don't want to pay too much for shipping it back and forth.

Another option would be to try and help me port it because I have the controller.
« Last Edit: Fri, 24 October 2014, 04:44:52 by zeroni13 »
My phantom build: http://bit.ly/1rEjqp5

Offline xauser

  • Posts: 97
Re: TMK keyboard firmware
« Reply #509 on: Fri, 24 October 2014, 09:54:28 »
Wouldn't it be possible to port it just by looking at the pin difference in these schematics? http://deskthority.net/w/images/1/1b/Costar_Replacement_Controllers_Schematics.PNG

At least I would not release a firmware that I haven't tested. Maybe others will volunteer.

If not, and you need the controller for the job i would gladly send mine to you, but that kinda depends on where you are located at. I don't want to pay too much for shipping it back and forth.

Another option would be to try and help me port it because I have the controller.

I'm located in Germany. Remote debugging is very time consuming but If you want to try yourself there is a great howto from matt3o over at deskthority.

http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177.html

Offline phatdood9

  • Posts: 162
  • Location: sf bay area, ca
Re: TMK keyboard firmware
« Reply #510 on: Sun, 26 October 2014, 00:54:51 »
Is this firmware compatible with the new Duck Eagle (or Viper)? It's a 60% and doesn't have all the same keys as the Lightsaber/Lightsaver, so I'm assuming the default configuration won't work for it at the very least.

I was looking at  this today, and it seems to be a bit complicated w my limited knowledge ... the lightsaber appears to use 2 74HC237D 3-8bit multiplexers. The viper that I have in front of me just has one.

It looks straightforward enough to do simple matrix wiring, but this pcb appears to be quite complex. I recall loading a custom firmware in the past that would give me a full dump of all the actions pressed, maybe that would be a way to go about reverse engineering the matrix.

Any tips for figuring this out xauser? (iirc you did the lightsaber :))



Offline xauser

  • Posts: 97
Re: TMK keyboard firmware
« Reply #511 on: Sun, 26 October 2014, 10:41:21 »
I would start with pen, paper and a multimeter to analyse the circuit.

Offline Lubed Up Slug

  • Posts: 79
Re: TMK keyboard firmware
« Reply #512 on: Sat, 01 November 2014, 17:16:39 »
So I wanted to do a Pure layout with my board, but with different key assignments.

Is this the right way to do the key assignments?
Code: [Select]
#include "keymap_common.h"

const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /* 0: qwerty */
    KEYMAP_ANSI(
        ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC, \
        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS, \
        CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,  \
        LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,     FN1, \
        LCTL,LGUI,LALT,          SPC,                     FN2, RGUI,APP, RCTL),

    /* 1: FN1 */
    KEYMAP_ANSI(
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,UP,       FN1, \
        TRNS,TRNS,TRNS,          TRNS,                    TRNS,LEFT,DOWN,RGHT),
   
    /* 2: FN2 */
    KEYMAP_ANSI(
        GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL, \
        TRNS,TRNS,VOLU,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
        TRNS,TRNS,VOLD,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS, \
        TRNS,TRNS,TRNS,          TRNS,                    TRNS,TRNS,TRNS,TRNS),



};

const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TOGGLE(1)
[2] = ACTION_LAYER_TOGGLE(2)
};


Is this the correct way to put the layout into the matrix? Really the only parts changed are on the lines beginning K30.
Code: [Select]
/* ANSI valiant. No extra keys for ISO */
#define KEYMAP_ANSI( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, \
    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D,      K3E, \
    K40, K41, K42,           K45,                     K4A, K4B, K4C, K4D  \
) KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO,  K2D, \
    K30, NO,  K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \
    K40, K41, K42,           K45,                NO,  K4A, K4B, K4C, K4D  \
)

Do I need to change any of this part?
Code: [Select]
#define KEYMAP( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
    K40, K41, K42,           K45,                K49, K4A, K4B, K4C, K4D  \
) { \
    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \
    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \
    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D }, \
    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D }, \
    { KC_##K40, KC_##K41, KC_##K42, KC_NO,    KC_NO,    KC_##K45, KC_NO,    KC_NO,    KC_NO,    KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D }  \
}
« Last Edit: Sat, 01 November 2014, 17:19:01 by Lubed Up Slug »

Offline hasu

  • Thread Starter
  • Posts: 3131
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #513 on: Sat, 01 November 2014, 21:23:03 »
Hmm, I'm not sure what you are doing.

what is your keyobard actually?
which code are you working on, your own or existent project?
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Lubed Up Slug

  • Posts: 79
Re: TMK keyboard firmware
« Reply #514 on: Sun, 02 November 2014, 00:40:36 »
Hmm, I'm not sure what you are doing.

what is your keyobard actually?
which code are you working on, your own or existent project?

Perhaps I should give a little more explanation. My layout is essentially a poker with an extra key on the 4th row from the top, to the right of the right shift. I was hoping to edit the gh60 file, by changing the matrix file (keymap_common.h) to add the extra key and then change the poker layout file(keymap_poker.c) to the layout I wanted. I think I didn't do the matrix correctly.

I actually worked it all out, except that my spacebar doesn't work, I think it could be a soldering issue or maybe the switch. Thank you so much for this firmware almost everything is working exactly as I want it to.
« Last Edit: Sun, 02 November 2014, 01:36:07 by Lubed Up Slug »

Offline kapish

  • Posts: 5
Re: TMK keyboard firmware
« Reply #515 on: Wed, 05 November 2014, 20:29:52 »
I might have miss out something when checking the keycode.c file, but cant seems to the keycode for pipe ( | ). Using it alot for work, had to keep on alternating with laptop keyboard. Anyone know the keycode for pipe?

Offline Lubed Up Slug

  • Posts: 79
Re: TMK keyboard firmware
« Reply #516 on: Wed, 05 November 2014, 21:45:06 »
I might have miss out something when checking the keycode.c file, but cant seems to the keycode for pipe ( | ). Using it alot for work, had to keep on alternating with laptop keyboard. Anyone know the keycode for pipe?

Well I'm not sure if you can make a single key pipe but the code for the backslash (\) key which is pipe when you hit shift is BSLS

Offline kapish

  • Posts: 5
Re: TMK keyboard firmware
« Reply #517 on: Thu, 06 November 2014, 01:18:53 »
I might have miss out something when checking the keycode.c file, but cant seems to the keycode for pipe ( | ). Using it alot for work, had to keep on alternating with laptop keyboard. Anyone know the keycode for pipe?

Well I'm not sure if you can make a single key pipe but the code for the backslash (\) key which is pipe when you hit shift is BSLS

Didnt notice that as I remap the second layer of backslash to another function. Fixed that and its working now. Thank you  ;D

Offline feizor

  • Posts: 690
  • Location: Melbourne, Australia
Re: TMK keyboard firmware
« Reply #518 on: Fri, 14 November 2014, 17:20:26 »
Can I use the tmk firmware on a otd cheat?

Offline f00000

  • Posts: 1
Re: TMK keyboard firmware
« Reply #519 on: Sun, 16 November 2014, 15:00:43 »
hi hasu! what a wonderful project!

can you help me please? i'm using ps2_usb with ibm m on mac (⌘ as LGUI, ⌥ as RALT) and i'm lost in C ... I need to map:

1) PrS directly to LSFT+LGUI+3
2) ScL directly to × (multiplication sign U+00D7)

Offline hasu

  • Thread Starter
  • Posts: 3131
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #520 on: Mon, 17 November 2014, 13:18:30 »
TMK basically requires a little knowledge of C and programming, unfortunately you need to learn unless you already have yet.

1) Not supported directly. With using ACTION_LAYER_MODS and Function you will be able to implement.
https://github.com/tmk/tmk_keyboard/blob/master/doc/keymap.md#35-momentary-switching-with-modifiers
https://github.com/tmk/tmk_keyboard/blob/master/doc/keymap.md#24-function-action

2) With using Macro or Function you can implement. How to input unicode char depends on your OS.
https://github.com/tmk/tmk_keyboard/blob/master/doc/keymap.md#23-macro-action
« Last Edit: Mon, 17 November 2014, 13:21:47 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline neverused

  • Posts: 572
Re: TMK keyboard firmware
« Reply #521 on: Sun, 23 November 2014, 13:25:50 »
I read on another build log that columns/rows greater than 16 in number are hard to implement on your firmware, is this true? I will likely have about 20 columns and 5 rows on my teensy ++ but would like to use your firmware.

Offline hasu

  • Thread Starter
  • Posts: 3131
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #522 on: Sun, 23 November 2014, 18:26:32 »
I read on another build log that columns/rows greater than 16 in number are hard to implement on your firmware, is this true? I will likely have about 20 columns and 5 rows on my teensy ++ but would like to use your firmware.

I don't think large matrix on TMK is so hard. It depends mainly on your C knowledge and skill. You better note that C has some pitfalls around int size on the MCU and integer promotion. To be honest I myself needed some trials and errors and to learn C a bit more, but it was fun totally in my case.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline VinnyCordeiro

  • Posts: 432
Re: TMK keyboard firmware
« Reply #523 on: Wed, 26 November 2014, 16:38:55 »
Searched about it, didn't find anything: is it possible in TMK to assign to a key the CEDILLA ( Ç )?

Offline hasu

  • Thread Starter
  • Posts: 3131
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #524 on: Wed, 26 November 2014, 17:33:18 »
Yes, you can use MACRO for the purpose. See this post, it'll help you greatly.
http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620

Note that to input lang specific chars depends on your OS and its keyboard layout and USB HID spec doesn't define it as far as I know.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Moralless

  • Posts: 526
  • Location: Sydney, Australia
Re: TMK keyboard firmware
« Reply #525 on: Thu, 27 November 2014, 06:51:10 »
Hasu I sent you a pm about this, but I guess it's relevant to this thread.

I'm currently planning to build a 70-key keyboard and I'm interested in adding a LED for each individual key. However, with how the matrix would be structured I would need to use 21 of the 24 pins available to the teensy, so I'm unsure if it's possible to be able to connect all the LEDs to 1-3 pins as I also want to have a few LEDs that toggles to indicate things such as caps lock, fuction layers being activated. I cam across this in another thread and was wondering if your firmware would be able to support this and if it does how would i go about connecting this board to a teensy?

Thanks for any help :).

Offline hasu

  • Thread Starter
  • Posts: 3131
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #526 on: Thu, 27 November 2014, 19:16:27 »
TMK doesn't support that LED driver at this time, of course. But I think you can add support to your firmwaare with using TMK. And you may want to connect the driver to I2C pins of Teensy but any pins can be used with software I2C library.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline idollar

  • Posts: 5
Re: TMK keyboard firmware
« Reply #527 on: Tue, 02 December 2014, 18:14:07 »
Searched about it, didn't find anything: is it possible in TMK to assign to a key the CEDILLA ( Ç )?

Hi,

This is what I would do:

Set the  OS to "us international with dead-keys". CEDILLA "ć" will span if you type ' followed by c.

Add the following to the keyboard matrix definition:

Code: [Select]
/*
 * Macro definition
 */
enum macro_id {
    CEDILLA,
};

const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
    keyevent_t event = record->event;
    //uint8_t tap_count = record->tap_count;

    switch (id) {
        case CEDILLA:
            return (event.pressed ?
                    MACRO(  T(QUOT), W(100), T(C), END ) :
                    MACRO( END ) );
    }
    return MACRO_NONE;
}


const uint16_t PROGMEM fn_actions[] = {
    [0] = ACTION_MACRO(CEDILLA),
};
GRV

Once this is added, you should add "FN0" in the matrix were you want to the the CEDILLA

NOTE: I have not tested the code above. PM if needed. I

i$K

Offline Euf0ria

  • Posts: 20
  • Location: Sweden
Re: TMK keyboard firmware
« Reply #528 on: Tue, 09 December 2014, 01:42:58 »
About the LED backlighting, I'm building my own keyboard ("TANK 93" @ DT) right now and will implement a second matrix for the leds. They will be 100% individually controllable giving the ability to add cool effects and cluster light for functionality.
I will be using hasus code for the switch matrix in an Teensy++ 2.0 and then connect 2pcs of Texas instruments TLC5940 for the led matrix.  http://www.ti.com/product/TLC5940/samplebuy#topsidemarking

Well, this is the plan right now but as I learn as I go there might be changes along the way. I also have help from a programmer and hope he will be able to support me all the way in programming the missing pieces for controlling the TLC5940s  triggered from actions in hasus code.

He already made this demo for me:
http://youtu.be/q_Rq5RtNolk

Edit. Sorry for the bad youtube-link. Feel free to inform me on how to paste it properly;)
« Last Edit: Tue, 09 December 2014, 08:51:38 by Euf0ria »
All your base are belong to us

Offline hasu

  • Thread Starter
  • Posts: 3131
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #529 on: Wed, 10 December 2014, 10:20:52 »
USB-USB converter was updated and now supports USB Hub, I confirmed HHKB pro2(which has internal hub) works.
https://github.com/tmk/tmk_keyboard/commit/b47450da9ffc1c296b3ba6ecd189fced0b7b8ed9

This update is first for two years since initial release :D
http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html#p74854

Try it if interested.


EDIT:
Hardware requirement for USB-USB converter

Arduino Leonardo                                                                                               
    http://arduino.cc/en/Main/ArduinoBoardLeonardo                                                             
   
Circuit@Home USB Host Shield 2.0                                                                               
    https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino-assembled/
   
Buying Arduino Leonardo and USB Host Shield 2.0(from Circuit@home) will be the easiest way, you won't need even soldering iron.
Arduino's Shield will also work well but I think Sparkfun's needs to be modified.                             
   
    http://arduino.cc/en/Main/ArduinoUSBHostShield                                                             
    https://www.sparkfun.com/products/9947                                                                     
   
Also Pro Micro 3.3V(not Mini) or Teensy with mini host shield will work with some fixes on signal/power routing.
    https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini         
    https://www.sparkfun.com/products/12587                                                                   
    https://www.pjrc.com/teensy/td_libs_USBHostShield.html

And see README.
    https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb

USB power and capacitance:
    http://www.pjrc.com/teensy/td_libs_USBHostShield.html#capacitance
« Last Edit: Sun, 01 February 2015, 22:26:18 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline agodinhost

  • Posts: 767
  • Location: Brazil, RJ
  • Soylent green is people ...
    • Dr Ian O Xaman
Re: TMK keyboard firmware
« Reply #530 on: Sat, 03 January 2015, 09:51:47 »
Yesterday I added a portion of code to write de keyconf byte according to the Makefile.lufa configuration.
This code will enable NKRO by default.

I tested it into my keyboard with hid_listen and it worked fine. However I do not use the other "bootmagic / dip switch" features ...
I added the command 'W' to rewrite the eeprom with the new defaults - the previous version just wrote 0.

Couln't make my git work then I made the diff below.

Code: [Select]
common/avr/eeconfig.c          |  2 +-
 common/command.c               |  5 ++++
 common/eeconfig.h              | 58 ++++++++++++++++++++++++++++++++++++++++++
 keyboard/phantom/Makefile.lufa | 16 +++++++++---
 4 files changed, 77 insertions(+), 4 deletions(-)

diff --git a/common/avr/eeconfig.c b/common/avr/eeconfig.c
index 5bd47dc..8c8bbca 100644
--- a/common/avr/eeconfig.c
+++ b/common/avr/eeconfig.c
@@ -8,7 +8,7 @@ void eeconfig_init(void)
     eeprom_write_word(EECONFIG_MAGIC,          EECONFIG_MAGIC_NUMBER);
     eeprom_write_byte(EECONFIG_DEBUG,          0);
     eeprom_write_byte(EECONFIG_DEFAULT_LAYER,  0);
-    eeprom_write_byte(EECONFIG_KEYMAP,         0);
+    eeprom_write_byte(EECONFIG_KEYMAP,         EECONFIG_KEYMAP_DEFAULTS);
     eeprom_write_byte(EECONFIG_MOUSEKEY_ACCEL, 0);
 #ifdef BACKLIGHT_ENABLE
     eeprom_write_byte(EECONFIG_BACKLIGHT,      0);
diff --git a/common/command.c b/common/command.c
index 1a507e3..6ab844e 100644
--- a/common/command.c
+++ b/common/command.c
@@ -125,6 +125,7 @@ static void command_common_help(void)
     print("t: print timer count\n");
     print("s: print status\n");
     print("e: print eeprom config\n");
+    print("w: write eeprom config\n");
 #ifdef NKRO_ENABLE
     print("n: toggle NKRO\n");
 #endif
@@ -191,6 +192,10 @@ static bool command_common(uint8_t code)
             print_eeconfig();
             break;
 #endif
+        case KC_W:
+            eeconfig_init();
+ print("eeprom written\n");
+            break;
         case KC_CAPSLOCK:
             if (host_get_driver()) {
                 host_driver = host_get_driver();
diff --git a/common/eeconfig.h b/common/eeconfig.h
index 3cd1a17..41aa88b 100644
--- a/common/eeconfig.h
+++ b/common/eeconfig.h
@@ -49,6 +49,64 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define EECONFIG_KEYMAP_SWAP_BACKSLASH_BACKSPACE    (1<<6)
 #define EECONFIG_KEYMAP_NKRO                        (1<<7)
 
+/* keyconf bit defaults */
+#ifdef SWAP_CONTROL_CAPSLOCK
+#define SWAP_CONTROL_CAPSLOCK_DEFAULT EECONFIG_KEYMAP_SWAP_CONTROL_CAPSLOCK
+#else
+#define SWAP_CONTROL_CAPSLOCK_DEFAULT 0
+#endif
+
+#ifdef CAPSLOCK_TO_CONTROL
+#define CAPSLOCK_TO_CONTROL_DEFAULT EECONFIG_KEYMAP_CAPSLOCK_TO_CONTROL
+#else
+#define CAPSLOCK_TO_CONTROL_DEFAULT 0
+#endif
+
+#ifdef SWAP_LALT_LGUI
+#define SWAP_LALT_LGUI_DEFAULT EECONFIG_KEYMAP_SWAP_LALT_LGUI
+#else
+#define SWAP_LALT_LGUI_DEFAULT 0
+#endif
+
+#ifdef SWAP_RALT_RGUI
+#define SWAP_RALT_RGUI_DEFAULT EECONFIG_KEYMAP_SWAP_RALT_RGUI
+#else
+#define SWAP_RALT_RGUI_DEFAULT 0
+#endif
+
+#ifdef NO_GUI
+#define NO_GUI_DEFAULT EECONFIG_KEYMAP_NO_GUI
+#else
+#define NO_GUI_DEFAULT 0
+#endif
+
+#ifdef SWAP_GRAVE_ESC
+#define SWAP_GRAVE_ESC_DEFAULT EECONFIG_KEYMAP_SWAP_GRAVE_ESC
+#else
+#define SWAP_GRAVE_ESC_DEFAULT 0
+#endif
+
+#ifdef SWAP_BACKSLASH_BACKSPACE
+#define SWAP_BACKSLASH_BACKSPACE_DEFAULT EECONFIG_KEYMAP_SWAP_BACKSLASH_BACKSPACE
+#else
+#define SWAP_BACKSLASH_BACKSPACE_DEFAULT 0
+#endif
+
+#ifdef NKRO_ENABLE
+#define NKRO_ENABLE_DEFAULT EECONFIG_KEYMAP_NKRO
+#else
+#define NKRO_ENABLE_DEFAULT 0
+#endif
+
+#define EECONFIG_KEYMAP_DEFAULTS \
+ SWAP_CONTROL_CAPSLOCK_DEFAULT | \
+ CAPSLOCK_TO_CONTROL_DEFAULT | \
+ SWAP_LALT_LGUI_DEFAULT | \
+ SWAP_RALT_RGUI_DEFAULT | \
+ NO_GUI_DEFAULT | \
+ SWAP_GRAVE_ESC_DEFAULT | \
+ SWAP_BACKSLASH_BACKSPACE_DEFAULT | \
+ NKRO_ENABLE_DEFAULT
 
 bool eeconfig_is_enabled(void);
 
diff --git a/keyboard/phantom/Makefile.lufa b/keyboard/phantom/Makefile.lufa
index 97756de..d77eb8d 100644
--- a/keyboard/phantom/Makefile.lufa
+++ b/keyboard/phantom/Makefile.lufa
@@ -101,10 +101,20 @@ BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
 #MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
 EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
 CONSOLE_ENABLE = yes # Console for debug(+400)
-COMMAND_ENABLE = yes    # Commands for debug and configuration
-#SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
-#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
+COMMAND_ENABLE = yes # Commands for debug and configuration
+#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
 
+#
+# keyconf bit defaults
+#
+#SWAP_CONTROL_CAPSLOCK = yes
+#CAPSLOCK_TO_CONTROL = yes
+#SWAP_LALT_LGUI = yes
+#SWAP_RALT_RGUI = yes
+#NO_GUI = yes
+#SWAP_GRAVE_ESC = yes
+#SWAP_BACKSLASH_BACKSPACE = yes
+NKRO_ENABLE = yes # USB Nkey Rollover - supported ONLY in LUFA
 
 # Boot Section Size in bytes
 #   Teensy halfKay   512

I hope it helps.
« Last Edit: Sat, 03 January 2015, 09:55:05 by agodinhost »
Building one square I2C keyboard with those 1200 switches (thanks JDCarpe)
GH60 |GH60-Alps |GH60-BT |GHPad/GHPad Alps |GH60-Case |Alps TKL |EL Wire |OS Controller, Round 2 |My Custom Keyboard |WTT/WTB

Offline hasu

  • Thread Starter
  • Posts: 3131
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #531 on: Thu, 08 January 2015, 10:47:10 »
I added initial support for Masdrop Infinity which based on mbed(cortex-M) and is not full fucinton yet; mouse keys, media keys, NKRO and etc.
https://github.com/tmk/tmk_keyboard/tree/master/keyboard/infinity

I don't think many users are around here yet, but if you have it try this.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Hzza

  • Posts: 377
  • Location: Windsor, UK
Re: TMK keyboard firmware
« Reply #532 on: Thu, 08 January 2015, 12:05:11 »
I added initial support for Masdrop Infinity which based on mbed(cortex-M) and is not full fucinton yet; mouse keys, media keys, NKRO and etc.
https://github.com/tmk/tmk_keyboard/tree/master/keyboard/infinity

I don't think many users are around here yet, but if you have it try this.

Brilliant, I'll give this a go when I get mine.
« Last Edit: Thu, 08 January 2015, 12:18:00 by Hzza »

Offline spiceBar

  • Posts: 998
    • ChessTiger.com
Re: TMK keyboard firmware
« Reply #533 on: Mon, 19 January 2015, 17:20:51 »
I added initial support for Masdrop Infinity which based on mbed(cortex-M) and is not full fucinton yet; mouse keys, media keys, NKRO and etc.
https://github.com/tmk/tmk_keyboard/tree/master/keyboard/infinity

I don't think many users are around here yet, but if you have it try this.

Has anyone confirmed that the TMK firmware works fine with the Infinity keyboard?

Had I known that TMK would be adapted to it, I would have purchased one. Now I have to wait for the next drop.

Offline loudaslife

  • Posts: 10
  • Location: Kansas, USA
Re: TMK keyboard firmware
« Reply #534 on: Mon, 19 January 2015, 19:34:37 »
Sorry if this is a noob question, but all 18 of the Pro Micro's IO pins can be used for the matrix, correct? Only 12 of the pins are labeled as digital IO, the rest are either ADC or Serial connections. The firmware will still work and treat them all as normal DIO pins?

So, to make a keyboard with a Pro Micro, I would first have to take a pin label from the Pro Micro (TX0, for example), reference the Pro Micro's schematic to find the MCU's pin label (PD3 TX), then reference the Teensy 2.0's Schematic to find the corresponding Teensy pin label (D3), which I can then FINALLY type into matrix.c

Is everything I've said in this post correct?
« Last Edit: Mon, 19 January 2015, 19:43:36 by loudaslife »

Offline hasu

  • Thread Starter
  • Posts: 3131
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #535 on: Wed, 21 January 2015, 07:21:16 »
You can use all pins, but note that you may have problem with PB0 because of LED.

I have to know pin names like PD3 in Pro Micro schematic, you can forget Teensy. Pin name PD3 means third pin of port D and in source code you have to use register names like DDRD, PORTD and PIND(in case of port D).
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline kirkvomit

  • Posts: 23
Re: TMK keyboard firmware
« Reply #536 on: Fri, 23 January 2015, 14:55:27 »
Can somebody explain how I can flash my keyboard over USB?
I installed TMK on my NerD 60 using USBasp programmer and avrdude.
Keyboard seems to work fine with TMK software.

When I press LShift+RShift+B (I changed KC_PAUSE to KC_B in common/command.c file),  keyboard stops to register any inputs for a few seconds, so I guess jump to bootloader is working.

I tried to flash keyboard using dfu-programmer and avrdude and have no success with them:

~$ sudo dfu-programmer atmega32u4 erase
dfu-programmer: no device present.

-----------------------------------------------------------------------------

~$ sudo avrdude -p atmega32u4 -c avr109 -P /dev/tty0 -U flash:w:nerd_lufa.hex -vvvv

avrdude: Version 6.0.1, compiled on Oct 21 2013 at 15:55:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/trofimoff/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty0
         Using Programmer              : avr109
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : butterfly
         Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .avrdude: Send: . [1b]
avrdude: Send: S [53]
avrdude: ser_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding

-------------------------------------------------------------------------------------------

Can somebody explain what I'm doing wrong?

Offline zarquon

  • Posts: 17
  • Location: Hungary
Re: TMK keyboard firmware
« Reply #537 on: Sat, 24 January 2015, 17:26:23 »
I'm using the tmk firmware and quite enjoying it:)
I'm keep refining my fn keys and ran into this: I an fn key which is, let's say: ACTION_MODS_KEY(MOD_RALT, KC_F) so basically a dedicated [ button.
But I would like to make it a dual role dedicated [ button, which types [ if I tap it, but switches to layer 5 if I hold it down (momentary switching).
So I'd like to have a combo of ACTION_LAYER_TAP_KEY where the key is an ACTION_MODS_KEY.
Is there a solution for this I'm not aware of or it's only possible with a custom function?
I'm not very good at C, I barely understand it.

Offline hasu

  • Thread Starter
  • Posts: 3131
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #538 on: Sat, 24 January 2015, 18:11:00 »
zarquon,
unfortunately you have to develop your C skill, it is not possible to realize that function without writing code.

kirkvomit,
Hmm, I'm not sure what you are doing and I don't know about that keyboard at all.
So I have to do wild guess totally...

What does NerD 60 has controller? Really ATMega32U4? What does the keyboard have bootloader?
Tmk does not include bootloader nor remove/change bootloader. I think you can program it with same method that you programmed it the frist time.

Not that to make bootloader jump work correctlly you need to set correct bootloader size in config.h.

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline kirkvomit

  • Posts: 23
Re: TMK keyboard firmware
« Reply #539 on: Sun, 25 January 2015, 06:08:26 »
Hasu,

Yes, controller is ATMega32U4, before flashing board with TMK firmware I changed its bootloader for ATMega32U4-usbdevice_dfu-1_0_0.hex from this page http://www.atmel.com/devices/atmega32u4.aspx?tab=documents.

I think the problem is that I'm using wrong serial port - Arduino Leonardo board creates /dev/ttyACM0 device in my system, but there is no any new /dev/tty device when Nerd 60 is connected...

About bootloader size, did you mean "OPT_DEFS += -DBOOTLOADER_SIZE=4096" from Makefile?

Offline xauser

  • Posts: 97
Re: TMK keyboard firmware
« Reply #540 on: Sun, 25 January 2015, 06:12:59 »
When I press LShift+RShift+B (I changed KC_PAUSE to KC_B in common/command.c file),  keyboard stops to register any inputs for a few seconds, so I guess jump to bootloader is working.

If you jump to bootloader by software keyboard stops registering key presses as long as you don't start application code again. If your keyboards just stops for a few seconds then you have to debug why and what is happening instead. If keyboard is at bootloader you'll see an Atmega device listed in your usb stack instead of a NerD TMK keyboard.

NerD 60 and 80 have ATMega32U4 controllers and were tested with Atmel DFU loader. All those details are in the Makefile. (This post was written with NerD 60 and tmk firmware)

@hasu, would you please merge my latest pull request for NerD project it fixes an important keymap issue.

Offline kirkvomit

  • Posts: 23
Re: TMK keyboard firmware
« Reply #541 on: Sun, 25 January 2015, 15:41:49 »
When I press LShift+RShift+B (I changed KC_PAUSE to KC_B in common/command.c file),  keyboard stops to register any inputs for a few seconds, so I guess jump to bootloader is working.

If you jump to bootloader by software keyboard stops registering key presses as long as you don't start application code again. If your keyboards just stops for a few seconds then you have to debug why and what is happening instead. If keyboard is at bootloader you'll see an Atmega device listed in your usb stack instead of a NerD TMK keyboard.

NerD 60 and 80 have ATMega32U4 controllers and were tested with Atmel DFU loader. All those details are in the Makefile. (This post was written with NerD 60 and tmk firmware)

@hasu, would you please merge my latest pull request for NerD project it fixes an important keymap issue.

Can you please say what are values of your fuse and lock bits?
And can you explain how can I debug TMK software?

Offline samwisekoi

  • MAWG since 1997
  • * Administrator
  • Posts: 2480
  • Location: Mt. View, California
  • Sorry, moving houses. Be back ASAP.
    • Tweet samwisekoi
Re: TMK keyboard firmware
« Reply #542 on: Sun, 25 January 2015, 17:21:49 »
Prepping a dev environment to build a version of tmk for the JD45 and SD-60.  LMDE with gcc-avr and all dependencies installed. 

Testing compiler and environment with compiles of stock projects, I am able to make non-pjrc sucessfully, but for both phantom and gh60, Makefile.pjrc results in a compile error:

Code: [Select]
ron@silence:~/Downloads/tmk_keyboard-master_20150125/keyboard/gh60$ make -f Makefile clean
ron@silence:~/Downloads/tmk_keyboard-master_20150125/keyboard/gh60$ make -f Makefile
...
Size after:
   text    data     bss     dec     hex filename
  23634      56     178   23868    5d3c gh60_lufa.elf

-------- end --------
ron@silence:~/Downloads/tmk_keyboard-master_20150125/keyboard/gh60$ make -f Makefile.pjrc clean
ron@silence:~/Downloads/tmk_keyboard-master_20150125/keyboard/gh60$ make -f Makefile.pjrc
...
../../protocol/pjrc/main.c: In function ‘main’:
../../protocol/pjrc/main.c:60:5: warning: implicit declaration of function ‘sleep_led_init’ [-Wimplicit-function-declaration]
     sleep_led_init();
     ^
../../protocol/pjrc/main.c:64:13: error: too many arguments to function ‘suspend_power_down’
             suspend_power_down(WDTO_120MS);
             ^
In file included from ../../protocol/pjrc/main.c:36:0:
../../common/suspend.h:9:6: note: declared here
 void suspend_power_down(void);
      ^
make: *** [obj_gh60_pjrc/protocol/pjrc/main.o] Error 1

Identical behavior with the phantom.

This is the latest version of the package; downloaded and extracted today.  Should I try an older version?  My assumption is that both the gh60 and phantom code are long-established and clean.

Any thoughts, firmware people?

Thanks in advance,

 - Ron | samwisekoi
Sig auto-typed by my GH36 LH keypad.
I like keyboards and case modding.  Everything about a computer should be silent -- except the KEYBOARD!

'85 IBM F-122/Soarer Keyboard |  Leopold FC200 TKL (Browns) + GH36 Keypad (Browns/Greens) | GH-122 (Whites/Greens) with Nuclear Data Green keycaps in a Unicomp case

Offline abjr

  • Posts: 171
  • Location: Connecticut
    • abjr.org
Re: TMK keyboard firmware
« Reply #543 on: Sun, 25 January 2015, 17:53:38 »
You get this error because suspend_power_down() is called with a parameter when the function isn't defined to take one. I'm not sure there is a need to use the Makefile.pjrc, but you can fix this in 2 ways:

Code: [Select]

1)  In tmk_keyboard/protocol/pjrc/main.c change suspend_power_down(WDTO_120MS); to suspend_power_down();

OR

2)  In tmk_keyboard/common/suspend.h: change void suspend_power_down(void); to void suspend_power_down(uint8_t wdto);
    In tmk_keyboard/common/avr/suspend.c rewrite the suspend_power_down() function to:
    void suspend_power_down(uint8_t wdto)
    {
         power_down(wdto);
    }

#2 will break the LUFA Makefile though. The PJRC calls the function with a parameter while the LUFA code doesn't so the inconsistency would need to be fixed as the suspend.c code is common to both.
« Last Edit: Sun, 25 January 2015, 19:05:11 by abjr »
CM QFR | magicforce 68 (Gateron) | magicforce 68 (Outemu) | Acros 6311-K

Offline hasu

  • Thread Starter
  • Posts: 3131
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #544 on: Sun, 25 January 2015, 20:30:05 »
samwisekoi and abjr,
Fixed the error in master branch with method #1.
Thanks for your reporting and fix.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline samwisekoi

  • MAWG since 1997
  • * Administrator
  • Posts: 2480
  • Location: Mt. View, California
  • Sorry, moving houses. Be back ASAP.
    • Tweet samwisekoi
Re: TMK keyboard firmware
« Reply #545 on: Sun, 25 January 2015, 20:34:45 »
Thanks very much!  I took option #1, and it compiled clean.

Absent a GH60, there is no way to tell if it worked, however!  Hmmm.  Time to finally build my Phantom?

Anyhow, thank you very much.

The odd thing is that I did not have this problem a month or so ago.

Hey, wait!  Someone just checked a fix in!

 - Ron | samwisekoi

[edit]
    It was hasu being fast as lightning!  Thank you sir!
[/edit]
I like keyboards and case modding.  Everything about a computer should be silent -- except the KEYBOARD!

'85 IBM F-122/Soarer Keyboard |  Leopold FC200 TKL (Browns) + GH36 Keypad (Browns/Greens) | GH-122 (Whites/Greens) with Nuclear Data Green keycaps in a Unicomp case

Offline xauser

  • Posts: 97
Re: TMK keyboard firmware
« Reply #546 on: Mon, 26 January 2015, 13:30:38 »
Can you please say what are values of your fuse and lock bits?
And can you explain how can I debug TMK software?

I have no programmer attached to the NerD pcb now, so I can't read the fuses at the moment. You should keep all fuses the way they were set by GON unless you're sure about what you're doing!

You can place printf everywhere you like in tmk firmware. These get visible by pressing both shifts and d. You'll see them in hid_listen. But these debugs will be in application code not in bootloader.

Offline primitiveType

  • Posts: 38
Re: TMK keyboard firmware
« Reply #547 on: Tue, 27 January 2015, 13:36:58 »
Quick question ... Does TMK/Teensy support 104-key?

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Posts: 4388
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: TMK keyboard firmware
« Reply #548 on: Tue, 27 January 2015, 14:00:49 »
Quick question ... Does TMK/Teensy support 104-key?

Technically yes, but the electrical layout is not going to match the physical row and column layout.  There just is not enough pins.  Though you should be able to use a Teensy 2.0++ version for extra pins and work just fine.  For example a full size layout will be 22 columns and 6 rows which is 28 pins plus 4 for 3 lock LEDs.  The standard Teensy does not have that many pins, but if you are creative with the electrical layout you can go 10x11 matrix for a total of 110 switches possible.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich
Order Form for MDC Mouse Pad
Contact Form for questions

IBM F Revival Services Now with VIDEO

Offline abjr

  • Posts: 171
  • Location: Connecticut
    • abjr.org
Re: TMK keyboard firmware
« Reply #549 on: Tue, 27 January 2015, 14:44:23 »
samwisekoi and abjr,
Fixed the error in master branch with method #1.
Thanks for your reporting and fix.

 :thumb:
CM QFR | magicforce 68 (Gateron) | magicforce 68 (Outemu) | Acros 6311-K