Documentations

This commit is contained in:
Matthieu Dubuget
2018-06-24 12:14:05 +02:00
parent a5ce4ae99c
commit 3e672915f3
3 changed files with 93 additions and 14 deletions

View File

@ -1,5 +1,7 @@
open Ctypes
(** {1 Types} *)
type error =
| Number of int (** A positive number *)
| Success (** Success (no error) *)
@ -26,6 +28,7 @@ type version = {
describe: string; (** For ABI compatibility only *)
}
(** Contains only the fields I needed so far *)
type device_descriptor = {
id_vendor: int; (** Vendor ID. *)
id_product: int; (** Product ID.*)
@ -34,6 +37,8 @@ type device_descriptor = {
num_configurations: int;
}
(** {1 C types} *)
module Types(T:Cstubs.Types.TYPE) = struct
let success = T.constant "LIBUSB_SUCCESS" T.int64_t
let error_io = T.constant "LIBUSB_ERROR_IO" T.int64_t