hid_keyb
10 years agoFixed return code for usbFunctionWrite to indicate no more data.
Pat Thoyts [Wed, 6 Nov 2013 22:20:21 +0000 (22:20 +0000)]
Fixed return code for usbFunctionWrite to indicate no more data.

On some hubs the device was being polled rapidly which slowed down the
heartbeat led indicating too much processing was going on. It turns out
we failed to respond correctly when the LED status was set and the host
permanently attempted to get a response from the device.

Also reworked the initialization code and tidied up and added more
comments.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
10 years agoChange fuse settings to preserve the eeprom when reprogramming.
Pat Thoyts [Wed, 6 Nov 2013 22:18:25 +0000 (22:18 +0000)]
Change fuse settings to preserve the eeprom when reprogramming.

This allows the serial number and calibration setting to be written once
and preserved subsequently.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
10 years agoWhitespace cleanup.
Pat Thoyts [Fri, 1 Nov 2013 10:35:14 +0000 (10:35 +0000)]
Whitespace cleanup.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
10 years agoStore device serial number in EEPROM and arrange to generate uniquely.
Pat Thoyts [Fri, 1 Nov 2013 10:32:56 +0000 (10:32 +0000)]
Store device serial number in EEPROM and arrange to generate uniquely.

Use the EEMEM attribute to generate an eeprom specific hex file which we
then modify using a python script to configure unique serial numbers.
Also, avoid writing the calibration value unless it has changed to extend
the device lifetime as eeprom is limited to around 100K writes.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
10 years agoInclude gEDA (gschem and pcb) schematic and PCB layout for USB stick.
Pat Thoyts [Wed, 30 Oct 2013 09:10:30 +0000 (09:10 +0000)]
Include gEDA (gschem and pcb) schematic and PCB layout for USB stick.

This is the schematic and layout for a USB stick on 9x24 hole stripboard
using a USB-B connector and v-usb with an ATtiny45 to provide the USB
connectivity and 2 connectors at the far end to use for sensors or buttons.
The connectors are both pulled high on one pin and the second pin is ground
so can be used with buttons or sensors (thermistor or LDR has worked).

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
10 years agoFirmware for an ATtiny45 based 2 key keyboard.
Pat Thoyts [Tue, 29 Oct 2013 23:53:14 +0000 (23:53 +0000)]
Firmware for an ATtiny45 based 2 key keyboard.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>