Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how can I get an interrupt event source



Hello everyone,

I got a USB DSL modem, here is the output of USB Prober for the device:

.............................................   Communication device  
from unknown vendor
     Device Descriptor
         Descriptor Version Number:   0x0110
         Device Class:   2   (Communication)
         Device Subclass:   0
         Device Protocol:   0
         Device MaxPacketSize:   8
         Device VendorID/ProductID:   0x12A7/0x3160   (unknown vendor)
         Device Version Number:   0x0001
         Number of Configurations:   1
         Manufacturer String:   0 (none)
         Product String:   0 (none)
         Serial Number String:   0 (none)
     Configuration Descriptor
         Total Length of Descriptor:   67
         Number of Interfaces:   2
         Configuration Value:   1
         Attributes:   0x80 (bus-powered)
         MaxPower:   200 ma
         Interface #0 - Communications-Control
             Alternate Setting   0
             Number of Endpoints   1
             Interface Class:   2   (Communications-Control)
             Interface Subclass;   2
             Interface Protocol   255
             Comm Class Header Functional Descriptor
                 Raw Descriptor (hex)   0000: 05 24 00 10 01
             Comm Class Call Management Functional Descriptor
                 Raw Descriptor (hex)   0000: 05 24 01 00 00
             Comm Class Abstract Control Management Functional Descriptor
                 Raw Descriptor (hex)   0000: 04 24 02 00
             Comm Class Union Functional Descriptor
                 Raw Descriptor (hex)   0000: 05 24 06 00 01
             Endpoint 0x83 - Interrupt Input
                 Attributes:   0x83  (IN)
                 Attributes:   0x03  (Interrupt)
                 Max Packet Size:   8
                 Polling Interval:   1 ms
         Interface #1 - Communications-Data/Unknown Comm Class Model
             Alternate Setting   0
             Number of Endpoints   2
             Interface Class:   10   (Communications-Data)
             Interface Subclass;   0   (Unknown Comm Class Model)
             Interface Protocol   0
             Endpoint 0x81 - Bulk Input
                 Attributes:   0x81  (IN)
                 Attributes:   0x02  (Bulk)
                 Max Packet Size:   64
                 Polling Interval:   0 ms
             Endpoint 0x02 - Bulk Output
                 Attributes:   0x02  (OUT)
                 Attributes:   0x02  (Bulk)
                 Max Packet Size:   64
                 Polling Interval:   0 ms

I want to create an interruptEventSource to add it the workloop but  
when I try to create it I can't find the source of the interrupt:

I do the following code:

	interruptSource = IOInterruptEventSource::interruptEventSource(this,
																    
(IOInterruptEventAction)&com_trendchip_driver_TC3160:: 
interruptOccurred,
																   provider,
																   0);
//	
	
	
	if (!interruptSource) {
		USBLog(3, "startInterrupt : Failed to create interrupt event  
source!\n");
				// Handle error (typically by returning a failure result).
	}
	
	if (fWorkLoop->addEventSource(interruptSource) != kIOReturnSuccess) {
		USBLog(3, "startInterrupt : Failed to add interrupt event source to  
work loop!\n");
		// Handle error (typically by returning a failure result).
	}

The device got an interrupt pipe so I should be able to create  
interruptSource.
If that's not the right way to do that how should I handle the  
interrupt send by the device ?

thanks for your time

best regards

Mathieu

adnXgroup
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.