Name: SqueakNOS-gera.47 Author: gera Time: 14 September 2008, 3:30 pm UUID: 37560d3f-2be9-447d-aa75-2fb7ba966a1c Ancestors: SqueakNOS-gera.46
Commented out mouse scrolling, because although it works very nicely in VMWare, it hung the keyboard when booted for real on my Laptop.
USB is kind of working, sort of, maybe :)
The scheduling for talking to USB devices is somehow complex, right now what we have is more than very basic, and the only thing that works is USBUHCIController >> #testGetDeviceDescriptor
In a VMWare, I booted, connected a USB device (only one, from the VMWare menu), and did:
Computer current usbUHCIController testGetDeviceDescriptor
Inspecting this brings back a 2 elements array, the second is the buffer, if in the inspector you do:
(self second stringAt: 1 size: 1000) asByteArray
That's going to be the answer from the device. you can compare the bytes from the device, 4 of the first few are the device ID. You can compare that to what lsusb returns (in linux), or something similar on windows (don't really remember right now how to get the USB device IDs on windows).
When booting for real, this works much better than previous versions, but I had not finished testing it, as my laptop has 4 UHCI controllers, and I've always been testing in the first (and apparently, that's not where I'm plugging my devices).
Good luck! I'll keep working a little bit more :)
Gerardo Richarte wrote:
When booting for real, this works much better than previous versions, but I had not finished testing it, as my laptop has 4 UHCI controllers, and I've always been testing in the first (and apparently, that's not where I'm plugging my devices).
I just spent some time testing it on the real thing, and it just worked :) Of the four USB UHCI ports in my Dell M1210, the two sockets on the left are port1 and 2 of the fourth, i.e.:
usb3 := USBUHCIController onPCIEntry: (PCIBusEntry bus: 0 device: 16r1D function: 3) computer: Computer current
The upper connector is port1, if you connect something there and then do:
usb3 testGetDeviceDescriptor second stringAt: 1 size: 1000
you'll get the device descriptor for whatever you plugged :)
uhm... change #testGetDeviceDescriptor so it doesn't turn on interrupts on any descriptor, otherwise your Transcript won't let you do anything :)
richie
squeaknos@lists.squeakfoundation.org