From: Jérémie D. <Ba...@us...> - 2010-03-06 23:24:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 53198a8d5d1d8f51dc3d817a03443aebc4987cce (commit) from 9958104ae2f54521a51358de5ed2ceda0b9b9ba4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 53198a8d5d1d8f51dc3d817a03443aebc4987cce Author: Jérémie Dimino <je...@di...> Date: Sun Mar 7 00:23:55 2010 +0100 Add module for the LCD device ----------------------------------------------------------------------- Changes: diff --git a/PC_Mainboard/driver/driver.ml b/PC_Mainboard/driver/driver.ml index cfe4f0d..9fb42d4 100644 --- a/PC_Mainboard/driver/driver.ml +++ b/PC_Mainboard/driver/driver.ml @@ -62,6 +62,32 @@ struct end (* +-----------------------------------------------------------------+ + | LCD | + +-----------------------------------------------------------------+ *) + +module LCD = +struct + type t = { + obus : OBus_object.t; + card : Krobot_card.t; + } + + module OBus = OBus_object.Make(struct + type obj = t + let cast obj = obj.obus + end) + + module Unsafe = DBus_exports.LCD(OBus)(struct let get dev = dev.card end) + + let make card path = + let dev = { + obus = OBus.make ~interfaces:[Unsafe.interface] path; + card = card; + } in + return dev +end + +(* +-----------------------------------------------------------------+ | AX12 | +-----------------------------------------------------------------+ *) @@ -754,7 +780,8 @@ lwt () = (fun card -> lwt () = USB_commands.Servo.enable card `Both in lwt () = Compass.OBus.export bus =|< Compass.make card ["fr"; "krobot"; "Devices"; "Compass"] - and () = AX12.OBus.export bus =|< AX12.make card ["fr"; "krobot"; "Devices"; "AX12"] in + and () = AX12.OBus.export bus =|< AX12.make card ["fr"; "krobot"; "Devices"; "AX12"] + and () = LCD.OBus.export bus =|< LCD.make card ["fr"; "krobot"; "Devices"; "LCD"] in return ()) (fun () -> OBus_object.remove_by_path bus ["fr"; "krobot"; "Devices"; "Compass"]; hooks/post-receive -- krobot |