Author Topic: ATtiny85/DigiSpark firmware, where should I start?  (Read 3079 times)

0 Members and 1 Guest are viewing this topic.

Offline mkHeinzen

  • Thread Starter
  • Posts: 7
ATtiny85/DigiSpark firmware, where should I start?
« on: Mon, 13 July 2015, 09:15:47 »
I have a DigiSpark board which is essentially a ATtiny85 controller with Arduino Bootloader.

Their current V-USB implementation does not work as I need it to. The Keyboard implementation does not handle Keyboard Events (such as key_down, key_up, pressed, released). The only thing it implements is key stroke (the full course of clicking and releasing it), meaning that you can't have a "hold" effect.

With that said, where should I start off to rewrite or implement this functionality? I have access to the HID source codes as they are open source on GitHub.

I don't know a lot about V-USB or USB communication overall, but DigiSpark is pretty much the perfect solution for my needs and I think that working on this is far more interesting than wasting money on more expensive controllers.

Cheers!

Offline hasu

  • Posts: 3474
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ATtiny85/DigiSpark firmware, where should I start?
« Reply #1 on: Mon, 13 July 2015, 19:56:34 »
That library doesn't intend to implement a real keyboard, just sends ascii chars. V-USB is not guilty there.
You have to write keyboard library yourself but don't need to know deep of V-USB, just read usbdrv.h to know its interface. And send 8 bytes keyboard report with using V-USB directly.

https://github.com/digistump/DigisparkArduinoIntegration/blob/master/libraries/DigisparkKeyboard/usbdrv.h

Offline mkHeinzen

  • Thread Starter
  • Posts: 7
Re: ATtiny85/DigiSpark firmware, where should I start?
« Reply #2 on: Tue, 14 July 2015, 09:13:37 »
That library doesn't intend to implement a real keyboard, just sends ascii chars. V-USB is not guilty there.
You have to write keyboard library yourself but don't need to know deep of V-USB, just read usbdrv.h to know its interface. And send 8 bytes keyboard report with using V-USB directly.

https://github.com/digistump/DigisparkArduinoIntegration/blob/master/libraries/DigisparkKeyboard/usbdrv.h

Okay, that's something to start off. Thanks