switching a port direction

I configured a Pin port as output in FSP interface, but I need to change to input in run time I used the following statements

option 1

R_IOPORT_PortDirectionSet(&g_ioport_ctrl, BSP_IO_PORT_01, 0x08, 0xFFFF); //pin103 as input

option 2

R_IOPORT_PortDirectionSet(&g_ioport_ctrl, BSP_IO_PORT_01, 0x01, 0x08);//pin103 as input

my question is, what is the correct way to change a configuration port?, I tested both option and both are working

my other question is if I require to change for example 4 pins of the port1 only i need to change 0x08?