DCS_TEAM / Mbed 2 deprecated Chemical_Sensor_DMA

Dependencies:   mbed

Dependents:   DCS_FINAL_CODE

Fork of Chemical_Sensor_DMA by Jared Baxter

Revision:
2:3771b3195c7b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AngleEncoder.h	Thu Oct 29 17:15:20 2015 +0000
@@ -0,0 +1,21 @@
+#ifndef ANGLE_ENCODER_H
+#define ANGLE_ENCODER_H
+ 
+#include "mbed.h"
+ 
+#define SPI_DELAY 4 // must be 4 or greater, otherwise the angle encoder can't keep up with the communication
+ 
+class AngleEncoder {
+public:
+    AngleEncoder(PinName mosi, PinName miso, PinName sclk, PinName cs, int bits, int mode, int hz);
+    int nop();
+    int absolute_angle();
+    bool set_zero();
+    bool set_zero(int*);
+    
+private:  
+    SPI _spi;
+    DigitalOut _cs;
+};
+ 
+#endif
\ No newline at end of file