module Usb_fun: sig end
Type Definitions
|
typewrite_endpoint =int
typeread_endpoint =int
type endpoint =
| |
ReadEp of |
| |
WriteEp of |
type device = {
|
filename : |
|
bus : |
|
descriptor : |
|
ep : |
|
usb_device : |
Usb.usb_device:filename: as returned by Usb.usb_device_filenamebus: a function that returns a record of type Usb_fun.bus, corresponding to the opaque Usb.usb_bus,
as returned by Usb.usb_device_busdescriptor: as returned by Usb.usb_device_descriptorep: array of the endpoints of the deviceusb_device: the opaque Usb.usb_device which the record corresponds totype bus = {
|
dirname : |
|
devices : |
Usb.usb_bus:dirname: as returned by Usb.usb_bus_dirnamedevices: list of values of type Usb_fun.device corresponding to the Usb.usb_device list (a C-style list implemented by a record with "prev" and "next" fields) as returned by Usb.usb_bus_devices
Utility functions
|
val is_readable_ep : endpoint -> booltrue if the endpoint is of type Usb_fun.read_endpoint, false if it is of type Usb_fun.write_endpointval bus_of_usb_bus : Usb.usb_bus Com.opaque -> bus
val get_busses_list : unit -> bus listUsb_fun.bus values corresponding to the C-style list returned by Usb.usb_get_bussesval open_dev : device -> Usb.usb_dev_handle Com.opaque optionopen_dev devUsb.usb_dev_handle) returned by Usb.usb_open dev if it is not NULL, or else it returns None