have reorganised old code and add uart lib to main c project