--- a
+++ b/PC_Mainboard/Apps/cards/usb/RW.ml
@@ -0,0 +1,37 @@
+(*
+ * RW.ml
+ * -----
+ * Copyright : (c) 2009, Jeremie Dimino <jeremie@dimino.org>
+ * Licence   : BSD3
+ *
+ * This file is a part of [kro]bot.
+ *)
+
+let get_uint8 data ofs = Char.code data.[ofs]
+let set_uint8 data ofs v = data.[ofs] <- Char.unsafe_chr v
+let get_int8 = get_uint8
+let set_int8 = set_uint8
+
+let get_int16 data ofs =
+  (get_uint8 data ofs lsl 8)
+  lor (get_uint8 data (ofs + 1))
+let get_uint16 = get_int16
+
+let set_int16 data ofs v =
+  set_uint8 data ofs ((v lsr 8) land 0xff);
+  set_uint8 data (ofs + 1) (v land 0xff)
+let set_uint16 = set_int16
+
+let get_int32 data ofs =
+  (get_uint8 data ofs lsl 24)
+  lor (get_uint8 data (ofs + 1) lsl 16)
+  lor (get_uint8 data (ofs + 2) lsl 8)
+  lor (get_uint8 data (ofs + 3))
+let get_uint32 = get_int32
+
+let set_int32 data ofs v =
+  set_uint8 data ofs ((v lsr 24) land 0xff);
+  set_uint8 data (ofs + 1) ((v lsr 16) land 0xff);
+  set_uint8 data (ofs + 2) ((v lsr 8) land 0xff);
+  set_uint8 data (ofs + 3) (v land 0xff)
+let set_uint32 = set_int32