Complete implementation and test suite of section 5.2 of the Serial API.