2023-03-22 15:28:54 +01:00
|
|
|
|
#include "stm32f10x.h"
|
|
|
|
|
#include "../../driver/MyI2C.h"
|
|
|
|
|
#include "../../driver/MySPI.h"
|
2023-03-31 12:18:42 +02:00
|
|
|
|
#include "../../implementation/remote.h"
|
2023-04-02 22:53:49 +02:00
|
|
|
|
#include "../../driver/gpio.h"
|
2023-03-22 15:28:54 +01:00
|
|
|
|
|
|
|
|
|
int main (void)
|
|
|
|
|
{
|
2023-04-04 13:14:09 +02:00
|
|
|
|
//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
|
2023-04-02 22:53:49 +02:00
|
|
|
|
|
2023-04-04 13:14:09 +02:00
|
|
|
|
MyUART_Struct_Typedef uartCool = {USART2,9600,lengthBit8,parityNone,stopBit1};
|
|
|
|
|
|
|
|
|
|
MyUART_InitGPIO(&uartCool);
|
2023-04-02 22:53:49 +02:00
|
|
|
|
MyUART_Init(&uartCool);
|
|
|
|
|
|
|
|
|
|
while(1){
|
|
|
|
|
if(MyUART_Read(&uartCool) == 0x61)
|
|
|
|
|
{
|
|
|
|
|
MyGPIO_Set(GPIOA,5);
|
|
|
|
|
MyUART_Send(&uartCool,'o');
|
2023-04-04 13:14:09 +02:00
|
|
|
|
MyUART_Send(&uartCool,'k');
|
2023-04-02 22:53:49 +02:00
|
|
|
|
}
|
|
|
|
|
};
|
2023-03-22 15:28:54 +01:00
|
|
|
|
}
|