geekhack

geekhack Projects => Making Stuff Together! => Topic started by: TartanLlama on Sat, 15 April 2017, 05:18:49

Title: C++17 custom keyboard firmware
Post by: TartanLlama on Sat, 15 April 2017, 05:18:49
Hi everyone, first time posting here, wanted to share a project I've been working on.

I wrote a simple custom keyboard framework in C++17 which lets you describe your keyboard layout and wiring at an abstract level. All of the code for your firmware is then generated through the magic of C++ templates.

I'd love to hear any thoughts or suggestions for things which I could add to it. Unfortunately I only have one keyboard which I can test it on, but I tried to make it as easy as possible for others to add new keyboards.

If you want to try it out but have troubles getting it set up, just let me know and I can help out!

You can find the code here: https://github.com/TartanLlama/etkf (https://github.com/TartanLlama/etkf)
Title: Re: C++17 custom keyboard firmware
Post by: hasu on Mon, 17 April 2017, 18:50:58
Nice work! Subscribed this thread and the repository.
I don't know anything about C++ but it seems to be time to learn it :D
Title: Re: C++17 custom keyboard firmware
Post by: TartanLlama on Tue, 18 April 2017, 02:08:14
Thanks Hasu! I learned a lot about how to write this by reading the code for TMK  :)
Title: Re: C++17 custom keyboard firmware
Post by: joey on Tue, 18 April 2017, 02:46:43
Nice work!

I did some experimenting with C++ templates a while back for firmware.. but I've given up and I'm using rust now!
Title: Re: C++17 custom keyboard firmware
Post by: vvp on Tue, 18 April 2017, 05:23:36
Can you compile rust source code to ARM or AVR target with some small run time library like newlib?
Title: Re: C++17 custom keyboard firmware
Post by: joey on Tue, 18 April 2017, 05:52:30
Can you compile rust source code to ARM or AVR target with some small run time library like newlib?
Probably. But I'm not using any functions from that.
Title: Re: C++17 custom keyboard firmware
Post by: konkers on Wed, 19 April 2017, 10:41:28
apologies for the slight thread hijack...

.. but I've given up and I'm using rust now!

Cool, I'm currently learning rust!  What are you using for firmware development in Rust?  Zinc?  Something different?
Title: Re: C++17 custom keyboard firmware
Post by: joey on Wed, 19 April 2017, 10:48:11
apologies for the slight thread hijack...

.. but I've given up and I'm using rust now!

Cool, I'm currently learning rust!  What are you using for firmware development in Rust?  Zinc?  Something different?
Nothing, just making my own thing from scratch.

https://gitlab.com/jgouly/keyboard-app/tree/master
https://gitlab.com/jgouly/mkl27z-rs/tree/master
Title: Re: C++17 custom keyboard firmware
Post by: konkers on Wed, 19 April 2017, 14:30:05
Nothing, just making my own thing from scratch.

https://gitlab.com/jgouly/keyboard-app/tree/master
https://gitlab.com/jgouly/mkl27z-rs/tree/master

Seriously cool!  Thanks for the links.
Title: Re: C++17 custom keyboard firmware
Post by: No_joke on Sat, 06 May 2017, 03:17:25
Gotta love em templates  ;)
Awesome work!