Update setup_uart.cpp

Change structure to use global fd
Add setup and close functionality