common: Move serial functions out of common.h