got talking to the ADC working (theoretically)
diff --git a/bbb_cape/src/cape/analog.h b/bbb_cape/src/cape/analog.h
new file mode 100644
index 0000000..50038d5
--- /dev/null
+++ b/bbb_cape/src/cape/analog.h
@@ -0,0 +1,17 @@
+#ifndef CAPE_ANALOG_H_
+#define CAPE_ANALOG_H_
+
+#include <stdint.h>
+
+// Starts up constantly reading analog values and storing them in an array to
+// be retrieved by analog_get.
+void analog_init(void);
+
+static inline uint16_t analog_get(int num) {
+ if (num < 0 || num > 7) return 0xFFFF;
+
+ extern uint16_t analog_readings[8] __attribute__((aligned(8)));
+ return analog_readings[num];
+}
+
+#endif // CAPE_ANALOG_H_