driver for incremental encoder
decoder.h
- Committer:
- ianaherne
- Date:
- 2019-01-08
- Revision:
- 0:c3a05fe15b84
- Child:
- 1:017efde7ab29
File content as of revision 0:c3a05fe15b84:
#ifndef DECODER_H #define DECODER_H #include "mbed.h" class decoder{ public: decoder(PinName channelA,PinName channelB); void isr(); int8_t getDirection(); int16_t getCount(); private: InterruptIn _channelA; InterruptIn _channelB; int8_t _direction; int16_t _count; int16_t _oldCount; }; #endif