#include "Driver_Timer.h" #include "Driver_UART.h" #include "Plateau.h" #include "Driver_GPIO.h" void Plateau_init(void) { MyTimer_Struct_TypeDef Timer; MyGPIO_Struct_TypeDef Pin_Sens; Pin_Sens.GPIO=GPIOB; Pin_Sens.GPIO_Pin=1; Pin_Sens.GPIO_Conf = Out_PullUp; //Fréquence Timer.Timer = TIM3; Timer.ARR=3599; Timer.PSC=0; MyTimer_Base_Init(&Timer); MyGPIO_Init(&Pin_Sens); MyTimer_PWM(&Timer, 50); MyTimer_Base_Start(TIM3); Plateau_direction(DROITE); } void Plateau_direction(uint8_t Sens) { if(Sens == DROITE) MyGPIO_Set(GPIOB,1); if (Sens == GAUCHE) MyGPIO_Reset(GPIOB,1); }