Update AMSerialPort Code

Update AMSerialPort Code from https://amserial.svn.sourceforge.net/svnroot/amserial.