Author Topic: C++17 custom keyboard firmware  (Read 3248 times)

0 Members and 1 Guest are viewing this topic.

Offline TartanLlama

  • Thread Starter
  • Posts: 2
C++17 custom keyboard firmware
« 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

Offline hasu

  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: C++17 custom keyboard firmware
« Reply #1 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

Offline TartanLlama

  • Thread Starter
  • Posts: 2
Re: C++17 custom keyboard firmware
« Reply #2 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  :)

Offline joey

  • Posts: 2296
  • Location: UK
Re: C++17 custom keyboard firmware
« Reply #3 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!

Offline vvp

  • Posts: 887
Re: C++17 custom keyboard firmware
« Reply #4 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?

Offline joey

  • Posts: 2296
  • Location: UK
Re: C++17 custom keyboard firmware
« Reply #5 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.

Offline konkers

  • Posts: 5
Re: C++17 custom keyboard firmware
« Reply #6 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?

Offline joey

  • Posts: 2296
  • Location: UK
Re: C++17 custom keyboard firmware
« Reply #7 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

Offline konkers

  • Posts: 5
Re: C++17 custom keyboard firmware
« Reply #8 on: Wed, 19 April 2017, 14:30:05 »

Offline No_joke

  • Posts: 12
Re: C++17 custom keyboard firmware
« Reply #9 on: Sat, 06 May 2017, 03:17:25 »
Gotta love em templates  ;)
Awesome work!