Projet_voilier2/Projet_voile/Sources/Principal.c

35 lines
529 B
C

#include "stm32f10x.h"
#include <stdio.h>
#include <string.h>
#include "GPIO.h"
#include "UART.h"
char MyChar;
//MyGPIO_Struct_TypeDef PA5; //PA5 LED
//MyGPIO_Struct_TypeDef PC13; //PC13 Bouton
void UART_RX_IT (void)
{
MyChar=UART_receive();
}
int main ( void )
{
MyGPIO_Struct_TypeDef myGPIO;
myGPIO.GPIO = GPIOA;
myGPIO.GPIO_Conf = Out_Ppull;
myGPIO.GPIO_Pin = 5;
MyGPIO_Init (&myGPIO);
MyUART_init();
MyUART_ActiveIT(1, &UART_RX_IT); //mode permet d'activer soit l'interruption sur TX
while(1)
{
}
}