36 lines
624 B
C
Executable file
36 lines
624 B
C
Executable file
#include "stm32f10x.h"
|
|
#include "MyTimer.h"
|
|
#include "Nucleo.h"
|
|
#include "Girouette.h"
|
|
#include "DriverGPIO.h"
|
|
|
|
volatile int Angle;
|
|
|
|
int main ( void ){
|
|
// ---- Setup ------
|
|
//Nucleo.c
|
|
//ConfigHorloge();
|
|
ConfigBroche();
|
|
//MyTimer.c
|
|
ConfigureTimers();
|
|
ConfigureIT();
|
|
//PWM.
|
|
ConfigurePWM();
|
|
// Giroutte.c
|
|
configEncoder(TIM2);
|
|
configChannel();
|
|
|
|
//MyTimer_Base_Start (TIM2);
|
|
//MyTimer_Base_Start (TIM1);
|
|
//MyTimer_Base_Start (TIM3);
|
|
|
|
// ----- Opérations -----
|
|
while (1){
|
|
//Angle = returnAngle(TIM2);
|
|
MyGPIO_Toggle(GPIOA, 0);
|
|
MyGPIO_Toggle(GPIOA, 1);
|
|
|
|
|
|
|
|
}
|
|
};
|