Drm.EventParsing events from a device.
module Vblank : sig ... endmodule Crtc_sequence : sig ... endtype t = | Vblank of Vblank.t| Flip_complete of Vblank.t| Crtc_sequence of Crtc_sequence.t| Unknown of Unsigned.UInt32.t * char Ctypes.CArray.tval pp : t Fmt.tval create_buffer : unit -> buffercreate_buffer () creates a buffer of a suitable size.
parse buffer len parses the events in the first len bytes of buffer.
Hint: you can use let len = Unix.read_bigarray dev buffer 0 (Bigarray.Array1.dim buffer) to read events into the buffer. The buffer must contain only complete events, but the kernel only returns complete events when you read, so this shouldn't be a problem.