#include "Sail.h"
#include "ServoMotor.h"
#include "IncrementalEncoder.h"

TIM_TypeDef * MOTOR_TIMER = TIM4;
const int MOTOR_CHANNEL = LL_TIM_CHANNEL_CH3;
GPIO_TypeDef * MOTOR_GPIO = GPIOB;
const int MOTOR_PIN = LL_GPIO_PIN_8;

TIM_TypeDef * ENCODER_TIMER = TIM3;
GPIO_TypeDef * ENCODER_GPIO = GPIOA;
const int ENCODER_PIN = LL_GPIO_PIN_5;

void Sail_conf()
{
	ServoMotor_conf(MOTOR_TIMER, MOTOR_CHANNEL, MOTOR_GPIO, MOTOR_PIN);
	IncrementalEncoder_conf(ENCODER_TIMER, ENCODER_GPIO, ENCODER_PIN);
}

void Sail_background()
{
	
}

void Sail_reset()
{
	
}


void Sail_start()
{
	Timer_start(MOTOR_TIMER);
	Timer_start(ENCODER_TIMER);
}
