]> Pileus Git - ~andy/csm213a-hw/blobdiff - hw2/main_emit.h
Refactor main into separate files
[~andy/csm213a-hw] / hw2 / main_emit.h
diff --git a/hw2/main_emit.h b/hw2/main_emit.h
new file mode 100644 (file)
index 0000000..577174a
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef MAIN_EMIT_H
+#define MAIN_EMIT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Signal generation init */
+void emit_init(int alt, PinName pin, PinMode mode);
+
+/* Configure GPIO output */
+void emit_enable(uint64_t start, uint64_t period);
+
+/* Queue GPIO signal if due */
+void emit_transmit(uint64_t local, uint64_t world);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif