Added rinbuffer code
Corrected uart and semaphore code, compiles!