#pragma once
#include "stm32f4xx_rcc.h"
#include "stm32f4xx_gpio.h"
#include "stm32f4xx_exti.h"
#include "stm32f4xx_syscfg.h"
#include "misc.h"

#define CNT_TO_DEG 9.93333 //number of tics in degree

namespace enc1
{
    extern int32_t pos;
    
    void Init(); //initialisation
    
    float deg(); //read position
}

namespace enc2
{
    extern int32_t pos;
    
    void Init(); //initialisation
    
    float deg(); //read position
}

namespace enc3
{
    extern int32_t pos;
    
    void Init(); //initialisation
    
    float deg(); //read position
}

namespace enc4
{
    extern int32_t pos;
    
    void Init(); //initialisation
    
    float deg(); //read position
}
