#include "MyTimer.h" #include "stm32f10x.h" #include "Driver_GPIO.h" #include "Plateau.h" /* Permet de diriger le plateau du voilier */ void Set_Moteur_Plateau(char sens, char vitesse){ // -1 gauche et 1 droite /* Declarations */ MyTimer_Struct_TypeDef TIM; MyGPIO_Struct_TypeDef GPI0A5; // pin direction MyGPIO_Struct_TypeDef GPIOA6; // pin moteur /* Configuration du Timer */ MyTimer_Struct_TypeDef * Data = &TIM; Data->Timer = TIM3; Data->ARR = 65535; Data->PSC = 548; Set_Duty_Cycle(Data->Timer, 1, Get_Max_Duty(Data->Timer)*vitesse); MyTimer_Base_Init(Data); }