energia/Energia — pull request #184 by m000z0rz (2013-02-09 21:40:49+00:00)
Title: Porting SoftwareSerial library to Energia

Ported the SoftwareSerial library to Energia so multiple serial ports can be used. Also, HardwareSerial only does up to 9600 baud, but this works up to 115200 baud. Also modified the SoftwareSerial example from Arduino to use pins P1.4 and P1.3

Porting this mostly consisted of altering the tuned delay assembler instructions and tweaking the tuning constants. I have only tweaked them for 16MHz CPU frequency, but included comments that could help someone calculate and refine values for other frequencies/baud rates. I also modified the interrupt handling to simply use attachInterrupt and detachInterrupt; the Arduino version used low level interrupt access, but I didn't see a need for it here.

And, er - this is sort of my first time contributing on github, so I offer apologies for any mistakes I'm making in the process...