rome2_p6 imported

Dependencies:   mbed

Committer:
Appalco
Date:
Fri May 18 12:05:32 2018 +0000
Revision:
0:351a2fb21235
p6 imported;

Who changed what in which revision?

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