good. Removed the :: for Arduino compatibility. Should have added makeboards.txt to auatomate boards.txt building.
We now refrain from sending any USB data up to the PC until one or more of the following happens: * The PC has sent some data to us or tries to read some data from us (i.e. an application has opened the part and sent some data out or is trying to read data in) * The PC has activated a hardware handshaking line (i.e. an application has opened the port - most apps do this) Once we are sending data to the PC, we will continue to do so until one of the following things happens: * The PC has deactivated the hardware handshaking line (i.e. the app has closed the port) * The PC has not asked for any data from us for 50ms (this indicates that there is no application consuming the data on the PC side, and the PC's buffer is full, and it doesn't want any more data) I also bumped up the number of USB buffers to 16 (from 4), which seemed to help smooth things out somewhat This fix has been tested with the Firmata Test application (which failed before this code was changed) on Mac and Windows, and Jacob tested this patch on some of his difficult USB cases (where things were failing previosly) and all of these tests were suecesful.
* setSpeed() and setMode() now store the previous speed and mode which can be restored with unsetSpeed() and unsetMode() respectively. This allows you to use SPI devices on the same bus where different devices want to operate with different settings.
* There were some major typos in pgmspace that broke Ardino library compatability. * Some extra definitions have been added to support more data types * It is a good idea to force the undefinition of a macro before defining it as some libraries also define these macros. While ours generally override the others it does cause lots of nasty warnings.