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.
Dependencies: mbed encoderKRAI Motor_new
encoderHAL.h
00001 #ifndef ENCODER_H 00002 #define ENCODER_H 00003 #include "mbed.h" 00004 00005 void EncoderInit(TIM_Encoder_InitTypeDef * encoder, TIM_HandleTypeDef * timer, TIM_TypeDef * TIMx, uint32_t maxcount, uint32_t encmode); 00006 00007 namespace mbed{ 00008 00009 class encoderHAL { 00010 00011 public : 00012 encoderHAL(TIM_TypeDef * _TIM); 00013 encoderHAL(TIM_TypeDef * _TIM, uint32_t _maxcount, uint32_t _encmode); 00014 encoderHAL(TIM_Encoder_InitTypeDef * _encoder, TIM_HandleTypeDef * _timer, TIM_TypeDef * _TIM, uint32_t _maxcount, uint32_t _encmode); 00015 int32_t getPulses(bool reset); 00016 TIM_HandleTypeDef* GetTimer(); 00017 00018 private : 00019 00020 00021 protected : 00022 TIM_Encoder_InitTypeDef encoder; 00023 TIM_HandleTypeDef timer; 00024 TIM_TypeDef * TIM; 00025 00026 }; 00027 00028 }// namespace mbed 00029 00030 #endif
Generated on Sat Jul 16 2022 17:05:35 by
1.7.2