added readonly/writeonly flags for serial ports; got rid of unused flags