hallo

Dependencies:   Servo mbed pixy

Fork of PES1 by Gruppe 3

Committer:
itslinear
Date:
Tue May 16 16:09:08 2017 +0000
Revision:
21:69ee872b8ee9
Parent:
18:3ee1b02ed3aa
sieg

Who changed what in which revision?

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