enhanced functionality in V01 vs. V00, V02 finished, conversion to double precsision in V03

Dependencies:   mbed

Committer:
pmic
Date:
Mon Apr 09 17:50:45 2018 +0000
Revision:
22:c895fa4d7319
Parent:
0:15be70d21d7c
all in float!

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rtlabor 0:15be70d21d7c 1 /*
rtlabor 0:15be70d21d7c 2 * EncoderCounter.h
rtlabor 0:15be70d21d7c 3 * Copyright (c) 2017, ZHAW
rtlabor 0:15be70d21d7c 4 * All rights reserved.
rtlabor 0:15be70d21d7c 5 */
rtlabor 0:15be70d21d7c 6
rtlabor 0:15be70d21d7c 7 #ifndef ENCODER_COUNTER_H_
rtlabor 0:15be70d21d7c 8 #define ENCODER_COUNTER_H_
rtlabor 0:15be70d21d7c 9
rtlabor 0:15be70d21d7c 10 #include <cstdlib>
rtlabor 0:15be70d21d7c 11 #include <mbed.h>
rtlabor 0:15be70d21d7c 12
rtlabor 0:15be70d21d7c 13 /**
rtlabor 0:15be70d21d7c 14 * This class implements a driver to read the quadrature
rtlabor 0:15be70d21d7c 15 * encoder counter of the STM32 microcontroller.
rtlabor 0:15be70d21d7c 16 */
rtlabor 0:15be70d21d7c 17 class EncoderCounter {
rtlabor 0:15be70d21d7c 18
rtlabor 0:15be70d21d7c 19 public:
rtlabor 0:15be70d21d7c 20
rtlabor 0:15be70d21d7c 21 EncoderCounter(PinName a, PinName b);
rtlabor 0:15be70d21d7c 22 virtual ~EncoderCounter();
rtlabor 0:15be70d21d7c 23 void reset();
rtlabor 0:15be70d21d7c 24 void reset(short offset);
rtlabor 0:15be70d21d7c 25 short read();
rtlabor 0:15be70d21d7c 26 operator short();
rtlabor 0:15be70d21d7c 27
rtlabor 0:15be70d21d7c 28 private:
rtlabor 0:15be70d21d7c 29
rtlabor 0:15be70d21d7c 30 TIM_TypeDef* TIM;
rtlabor 0:15be70d21d7c 31 };
rtlabor 0:15be70d21d7c 32
rtlabor 0:15be70d21d7c 33 #endif /* ENCODER_COUNTER_H_ */