#include "stm32f10x.h" #include #include #include "GPIO.h" #include "UART.h" #include "TIMER.h" #include "Girouette.h" #include "Pwm_voile.h" #include "MyI2C.h" #include "MySPI.h" #include "CAP_voilier.h" char MyChar; char X0,X1,Y0,Y1,Z0,Z1; char read_DATA,read_BWR,read_PWRC; int16_t gX,gY,gZ; int test =0; //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 GPIOA5; GPIOA5.GPIO = GPIOA; GPIOA5.GPIO_Conf = Out_Ppull; GPIOA5.GPIO_Pin = 5; MyGPIO_Init (&GPIOA5); init_girouette(); init_pwm_voile(); MySPI_Init(SPI1); rouli_InitAccel(); My_cap_init(); MySPI_Send(READ|DATA_FORMAT); read_DATA = MySPI_Read(); MySPI_Send(READ|BW_RATE); read_BWR = MySPI_Read(); MySPI_Send(READ|POWER_CTL); read_PWRC = MySPI_Read(); // MyUART_init(); // MyUART_ActiveIT(1, &UART_RX_IT); //mode permet d'activer soit l'interruption sur TX while(1) { Test_tour_girouette(); } }