Framework for serial driver.