code: public function deviceClose()
      {
          if ($this->_dState !== SERIAL_DEVICE_OPENED) {
              return true;
          }
  
          if (fclose($this->_dHandle)) {
              $this->_dHandle = null;
              $this->_dState = SERIAL_DEVICE_SET;
  
              return true;
          }
  
          trigger_error("Unable to close the device", E_USER_ERROR);
  
          return false;
      }
docs: Closes the device
  
  @return bool