DCS_TEAM / Mbed 2 deprecated Chemical_Sensor_DMA

Dependencies:   mbed

Dependents:   DCS_FINAL_CODE

Fork of Chemical_Sensor_DMA by Jared Baxter

Committer:
baxterja
Date:
Thu Oct 29 17:15:20 2015 +0000
Revision:
2:3771b3195c7b
Accessible Sample folder

Who changed what in which revision?

UserRevisionLine numberNew contents of line
baxterja 2:3771b3195c7b 1 #ifndef ANGLE_ENCODER_H
baxterja 2:3771b3195c7b 2 #define ANGLE_ENCODER_H
baxterja 2:3771b3195c7b 3
baxterja 2:3771b3195c7b 4 #include "mbed.h"
baxterja 2:3771b3195c7b 5
baxterja 2:3771b3195c7b 6 #define SPI_DELAY 4 // must be 4 or greater, otherwise the angle encoder can't keep up with the communication
baxterja 2:3771b3195c7b 7
baxterja 2:3771b3195c7b 8 class AngleEncoder {
baxterja 2:3771b3195c7b 9 public:
baxterja 2:3771b3195c7b 10 AngleEncoder(PinName mosi, PinName miso, PinName sclk, PinName cs, int bits, int mode, int hz);
baxterja 2:3771b3195c7b 11 int nop();
baxterja 2:3771b3195c7b 12 int absolute_angle();
baxterja 2:3771b3195c7b 13 bool set_zero();
baxterja 2:3771b3195c7b 14 bool set_zero(int*);
baxterja 2:3771b3195c7b 15
baxterja 2:3771b3195c7b 16 private:
baxterja 2:3771b3195c7b 17 SPI _spi;
baxterja 2:3771b3195c7b 18 DigitalOut _cs;
baxterja 2:3771b3195c7b 19 };
baxterja 2:3771b3195c7b 20
baxterja 2:3771b3195c7b 21 #endif