Steps of Using Devices


General steps of using devices are as follows:

steps of using device

Opening Device

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.

Using Device

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.

Closing Device

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.