Projet_voilier2/Projet_voile/Sources/Girouette.c
2023-04-11 15:32:11 +02:00

26 lines
382 B
C

#include "Girouette.h"
MyGPIO_Struct_TypeDef GPIOC3;
void Test_Encoder (void)
{
Reset_degree();
}
void init_girouette (void)
{
GPIOC3.GPIO = GPIOC;
GPIOC3.GPIO_Conf = In_Floating;
GPIOC3.GPIO_Pin = 3;
MyGPIO_Init (&GPIOC3);
init_encoder_timer(&Test_Encoder);
}
void Test_tour_girouette(void){
if(MyGPIO_Read(GPIOC3.GPIO, GPIOC3.GPIO_Pin))
{
Reset_degree();
}
}