
Example project
Dependencies: PM2_Libary Eigen
EncoderCounterROME2.h
- Committer:
- pmic
- Date:
- 2022-05-10
- Revision:
- 39:f336caef17d9
- Parent:
- 37:698d6b73b50c
File content as of revision 39:f336caef17d9:
/* * EncoderCounterROME2.h * Copyright (c) 2022, ZHAW * All rights reserved. */ #ifndef ENCODER_COUNTER_ROME2_H_ #define ENCODER_COUNTER_ROME2_H_ #include <cstdlib> #include <mbed.h> /** * This class implements a driver to read the quadrature * encoder counter of the STM32 microcontroller. */ class EncoderCounterROME2 { public: EncoderCounterROME2(PinName a, PinName b); virtual ~EncoderCounterROME2(); void reset(); void reset(short offset); short read(); operator short(); private: TIM_TypeDef* TIM; }; #endif /* ENCODER_COUNTER_ROME2_H_ */