Lines Matching refs:device

29 SerialDevice::SerialDevice(usb_device device, uint16 vendorID,
31 : fDevice(device),
174 // only apply the relevant parts to the device side
181 // update the termios of the device side
321 TRACE_ALWAYS("open: failed to init device tty cookie\n");
400 // Write to the device as long as there's anything in the tty buffer
409 TRACE_ALWAYS("failed to write to device: %s\n",
502 // notifies us that the device was removed
505 // we need to ensure that we do not use the device anymore
578 SerialDevice *device = (SerialDevice *)data;
580 while (!device->fStopThreads) {
581 status_t status = gUSBModule->queue_bulk(device->fReadPipe,
582 device->fReadBuffer, device->fReadBufferSize,
583 device->_ReadCallbackFunction, data);
590 status = acquire_sem_etc(device->fDoneRead, 1, B_CAN_INTERRUPT, 0);
597 if (device->fStatusRead != B_OK) {
598 TRACE("input thread: device status error 0x%08x\n",
599 device->fStatusRead);
600 if (device->fStatusRead == B_DEV_STALLED
601 && gUSBModule->clear_feature(device->fReadPipe,
610 char *buffer = device->fReadBuffer;
611 size_t readLength = device->fActualLengthRead;
612 device->OnRead(&buffer, &readLength);
616 while (device->fInputStopped)
619 status = gTTYModule->tty_write(device->fDeviceTTYCookie, buffer,
639 TRACE_ALWAYS("write to device: failed to read from TTY: %s\n",
652 TRACE_ALWAYS("write to device: queueing failed with status "
659 TRACE_ALWAYS("write to device: failed to get write done sem "
665 TRACE("write to device: device status error 0x%08x\n",
671 TRACE_ALWAYS("write to device: failed to clear device "
695 SerialDevice *device = (SerialDevice *)cookie;
696 device->fActualLengthRead = actualLength;
697 device->fStatusRead = status;
698 release_sem_etc(device->fDoneRead, 1, B_DO_NOT_RESCHEDULE);
709 SerialDevice *device = (SerialDevice *)cookie;
710 device->fActualLengthWrite = actualLength;
711 device->fStatusWrite = status;
712 release_sem_etc(device->fDoneWrite, 1, B_DO_NOT_RESCHEDULE);
723 SerialDevice *device = (SerialDevice *)cookie;
724 device->fActualLengthInterrupt = actualLength;
725 device->fStatusInterrupt = status;
729 if (status == B_OK && !device->fDeviceRemoved) {
730 status = gUSBModule->queue_interrupt(device->fControlPipe,
731 device->fInterruptBuffer, device->fInterruptBufferSize,
732 device->_InterruptCallbackFunction, device);
738 SerialDevice::MakeDevice(usb_device device, uint16 vendorID,
746 return new(std::nothrow) FTDIDevice(device, vendorID, productID,
756 return new(std::nothrow) KLSIDevice(device, vendorID, productID,
766 return new(std::nothrow) ProlificDevice(device, vendorID, productID,
776 return new(std::nothrow) SiliconDevice(device, vendorID, productID,
786 return new(std::nothrow) WCHDevice(device, vendorID, productID,
796 return new(std::nothrow) OptionDevice(device, vendorID, productID,
801 // Otherwise, return standard ACM device
802 return new(std::nothrow) ACMDevice(device, vendorID, productID,
803 "CDC ACM compatible device");