triffid/Teacup_Firmware — pull request #34 by drf5n (2012-09-27 17:11:49+00:00)
Title: Add ATmega32u4 / Teensy 2.0 support

Hi Triffid,

I've modified Teacup a bit to make it work with my Teensy 2.0 breadboard configuration which uses an atmega32u4 chip.

A couple problems I had to deal with is that Timer 4 differs the other AVR chips in that it is a 10 bit timer and the registers are different.

Additionally, the LUFA-recognizer code in the Makefile wouldn't detect 'usb' in the processor string, so I added a USE_LUFA flag to the logic.

Another problem I had was that the zero-PID values read from a blank EEPROM seem valid to Teacup, and I needed the default to work.

I've not tested it yet, since I've been running a much older modified version of Teacup using the Teensy usb_serial routines and a hacked up serial.c file. I thought the LUFA libraries might be well tested by others. I'll be able to actually test this code on my printer later this week.