Modification du la bibliothèque de base

Dependents:   TestPID TestMot test PID ... more

Fork of Encoder_Nucleo_16_bits by IUT DE CACHAN GE1

Nucleo_Encoder_16_bits.h

Committer:
haarkon
Date:
2018-05-21
Branch:
Haarkon_Way
Revision:
3:6eeee6a11f47
Parent:
1:e82009479b5c

File content as of revision 3:6eeee6a11f47:

#ifndef ENCODER_H
#define ENCODER_H
#include "mbed.h"

void EncoderInit(TIM_Encoder_InitTypeDef * encoder, TIM_HandleTypeDef * timer, TIM_TypeDef * TIMx, uint32_t maxcount, uint32_t encmode);


    class Nucleo_Encoder_16_bits {
        
        public :
            Nucleo_Encoder_16_bits(TIM_TypeDef * _TIM);
            Nucleo_Encoder_16_bits(TIM_TypeDef * _TIM, uint32_t _maxcount, uint32_t _encmode);
            Nucleo_Encoder_16_bits(TIM_Encoder_InitTypeDef * _encoder, TIM_HandleTypeDef * _timer, TIM_TypeDef * _TIM, uint32_t _maxcount, uint32_t _encmode);
            int32_t GetCounter();
            TIM_HandleTypeDef* GetTimer();
        
        private :
        
        
        protected :
            TIM_Encoder_InitTypeDef encoder;
            TIM_HandleTypeDef timer;
            TIM_TypeDef * TIM;
        
    };


#endif