Algorithmus

Dependencies:   mbed

Committer:
luethale
Date:
Sat Jun 30 14:13:27 2018 +0000
Revision:
36:99f60052c746
Parent:
1:2b5f79285a3e
Nacht_der_Technik; Angepasste Werte:; Move & HalfeMove; Ev. Bechleunigung verbessern (aprupte Stops); Ev. Move & HalfeMove weiter anpassen

Who changed what in which revision?

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