Enable Tx and Rx (dig pin 1 and pin 0)

I want to do some uart communication establishment between r307 finger print scanner and hifive1.I just wrote some code ,correct me if am wrong

//clock config
PRCI_REG(PRCI_HFROSCCFG) |= ROSC_EN(1);

PRCI_REG(PRCI_PLLCFG) = (PLL_REFSEL(1) | PLL_BYPASS(1));
PRCI_REG(PRCI_PLLCFG) |= (PLL_SEL(1));

PRCI_REG(PRCI_HFROSCCFG) &= ~(ROSC_EN(1));

GPIO_REG(GPIO_IOF_SEL) &= ~IOF_UART0_TX;
GPIO_REG(GPIO_IOF_EN) |= IOF_UART0_TX

GPIO_REG(GPIO_IOF_SEL) &= ~IOF_UART0_RX;
GPIO_REG(GPIO_IOF_EN) |= IOF_UART0_RX;

//set 115200 Baud Rate
UART0_REG(UART_REG_DIV) = 138;
UART0_REG(UART_REG_TXCTRL) = UART_TXEN;
UART0_REG(UART_REG_RXCTRL) = UART_RXEN;



I want to see the o/p in hyper terminal like gtk term .As i read the document ,it tells like the following


When a pin is set to perform an IOF, it is possible that the software registers port, output en,
pullup, ds, input en may not be used to control the pin directly. Rather, the pins may be con-
trolled by hardware driving the IOF. Which functionalities are controlled by the IOF and which are controlled by the software registers are fixed in the hardware on a per-IOF basis. Those that are
not controlled by the hardware continue to be controlled by the software registers.


so my question is what should i do to see the o/p that i am getting it from Rx pin in the terminal ??

is doing this correct?
// GPIO_REG(GPIO_OUTPUT_VAL) |= IOF_UART0_RX;
// GPIO_REG(GPIO_OUTPUT_EN) |= IOF_UART0_RX;

And can i send commands to tx and receive ack data from rx through write and read function which is given in the freedom e sdk/bsp/libwrap/sys?