General steps of using devices are as follows:
pid_open function is for opening devices. This function returns pid (Peripheral ID), which is an integer value, and this value is used for accessing to devices as a unique number.
After opening successfully, device, which returned pid indicates, is ready to use. You can use it with functions such as pid_ioctl, pid_read and etc.
When device is not used anymore, it is needed to be closed by using pid_close function.
※ Caution: It is not possible to use a physical port by new device if the port has just been used, it is not possible to be used by new device until rebooted although the device was closed. In other words, a physical port cannot be used by more than two devices before it is initialized.