Voilier/Drivers/Voilier_fonction/telecommande.c
2023-04-11 14:53:48 +02:00

32 lines
483 B
C

#include "telecommande.h"
#include "Driver_GPIO.h"
#include "Plateau.h"
MyUART_Struct_Typedef UART_plateau = {USART1,9600};
void init_telecommande(void)
{
UART_InitGPIO(&UART_plateau);
UART_init(&UART_plateau);
}
void telecommande_plateau (int data)
{
int datar;
UART_send(data);
datar = data;
if(datar >= 0)
Plateau_direction(DROITE);
else
Plateau_direction(GAUCHE);
}
void testRemote(void)
{
UART_send('t');
UART_send('e');
UART_send('s');
UART_send('t');
}