voilier-team-1/keilproject/Source/Principale.c

26 lines
636 B
C
Raw Normal View History

2023-03-22 15:28:54 +01:00
#include "stm32f10x.h"
#include "../../driver/MyI2C.h"
#include "../../driver/MySPI.h"
#include "../../implementation/remote.h"
#include "../../driver/gpio.h"
2023-03-22 15:28:54 +01:00
int main (void)
{
//MyGPIO_Struct_TypeDef led = {GPIOA,5,Out_PullUp}; //led
//MyGPIO_Init(&led); //test des leds pour ignorer les contraintes li<6C>es aux diff<66>rents ports
MyUART_Struct_Typedef uartCool = {USART2,9600,lengthBit8,parityNone,stopBit1};
MyUART_InitGPIO(&uartCool);
MyUART_Init(&uartCool);
while(1){
if(MyUART_Read(&uartCool) == 0x61)
{
MyGPIO_Set(GPIOA,5);
MyUART_Send(&uartCool,'o');
MyUART_Send(&uartCool,'k');
}
};
2023-03-22 15:28:54 +01:00
}