+/* Copyright (c) 2006-2010 by Sporian Microsystems, Inc.
+ * All Rights Reserved.
+ *
+ * This document is the proprietary and confidential property of Sporian
+ * Microsystems, Inc. All use, distribution, reproduction or re-distribution
+ * is disallowed without the prior express written consent of Sporian
+ * Microsystems, Inc.
+ */
+
+/**
+ * The Write interface is intended for split-phase low-rate or
+ * high-latency writing of small values. The type of the value is
+ * given as a template argument. Because this interface is
+ * split-phase, these values may be backed by hardware, or a
+ * long-running computation. This interface is the output analog
+ * of the standard Read interface.
+ *
+ * This interface is equivalent to the Write interface, except that its
+ * operations are defined async.
+ *
+ * @param val_t the type of the object that will be written
+ *
+ * @author R. Steve McKown <rsmckown@gmail.com>
+ */
+
+
+interface WriteNow<val_t> {
+ /**
+ * Initiate a write of the provided value.
+ *
+ * @param val The value to write.
+ * @return SUCCESS if <code>writeDone()</code> will later be signalled,
+ * EBUSY if a write is already in progress, or FAIL for other errors.
+ */
+ async command error_t write(val_t val);
+
+ /**
+ * Signalled upon completion of the write operation initiated by the previous
+ * <code>write()</code> command.
+ */
+ async event void writeDone(error_t error);
+}