Migrated serial interface to C