Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of Chemical_Sensor_DMA by
Diff: AngleEncoder.h
- Revision:
- 6:63de50ac29be
- Parent:
- 5:1b2dc43e8947
- Child:
- 7:af255a90505e
--- a/AngleEncoder.h Fri Nov 06 19:28:49 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -#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