Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
EncoderCounter.h
00001 /* 00002 * EncoderCounter.h 00003 * Copyright (c) 2019, ZHAW 00004 * All rights reserved. 00005 * 00006 * modiefied version to use with Nucleo F767ZI 00007 */ 00008 00009 #ifndef ENCODER_COUNTER_H_ 00010 #define ENCODER_COUNTER_H_ 00011 00012 #include <cstdlib> 00013 #include <mbed.h> 00014 00015 /** 00016 * This class implements a driver to read the quadrature 00017 * encoder counter of the STM32 microcontroller. 00018 */ 00019 class EncoderCounter { 00020 00021 public: 00022 00023 EncoderCounter(PinName a, PinName b); 00024 virtual ~EncoderCounter(); 00025 void reset(); 00026 void reset(short offset); 00027 short read(); 00028 operator short(); 00029 00030 private: 00031 00032 TIM_TypeDef* TIM; 00033 }; 00034 00035 #endif /* ENCODER_COUNTER_H_ */ 00036 00037 00038
Generated on Tue Jul 26 2022 07:27:33 by
