]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/m16c62p/dac/HplM16c62pDac.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / chips / m16c62p / dac / HplM16c62pDac.nc
diff --git a/tos/chips/m16c62p/dac/HplM16c62pDac.nc b/tos/chips/m16c62p/dac/HplM16c62pDac.nc
new file mode 100755 (executable)
index 0000000..02a9e0a
--- /dev/null
@@ -0,0 +1,35 @@
+/**
+ * HPL interface to the M16c62p D/A converers. 
+ *
+ * @author Henrik Makitaavola <henrik.makitaavola@gmail.com>
+ */
+
+interface HplM16c62pDac {
+  /**
+   * Sets the D/A value.
+   * @param value The new D/A value
+   */
+  async command void setValue(uint8_t value);
+  
+  /**
+   * Reads the current D/A value.
+   * @return D/A value
+   */
+  async command uint8_t getValue();
+
+  /**
+   * Enables the D/A converter.
+   */
+  async command void enable();
+
+  /**
+   * Disables the D/A converter.
+   */
+  async command void disable();
+
+  /**
+   * Checks the state of the D/A converter.
+   * @return TRUE if the D/A converter is enabled.
+   */
+  async command bool isEnabled();
+}