Added support for serial 0 and serial 1 auto-switch