Modified type & return values of openPort function.
Addded new callback function as argument to serialRead & serialReader functions.
Reconstructed control of openPort in flushBuffer function.
Reconstructed control of openPort in doflash function before Leonardo reset.
Reconstructed control of openPort in serialReader.