PaulStoffregen/cores — pull request #3 by xxxajk (2013-12-15 01:41:02+00:00)
Title: Fix Serial

This fixes while(!Serial); not waiting on the teensy 3.0/3.1.
Two important things changed, one based on code and comments in the Arduino code base.
1: fixed uint8_t -> uint16_t for the control status.
2: There is a race condition that is possible when USB is initializing. A delay of 10microseconds is the fix.
Please see
https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/CDC.cpp#L225-L238
for the comment.

I have not tested this for the Teensy 2.0++ that I own, but if the code for that is different than the stock Arduino code, you will have to patch for those as well.