#include #include #include int main ( void ) { RCC->APB2ENR |= (0x01 << 2) | (0x01 << 3) | (0x01 << 4) ; Timer_Init(TIM2, ARR_VAL, PSC_VAL); /* //DEL INTERNE #if INTERNE initGPIO_Interne(); MyTimer_ActiveIT(TIM2, 2, commuterDEL_Interne); #else //DEL EXTERNE BRANCHE SUR PB8 et GND (D14 & D8 AVEC LA TEXTE BLEUE SUR LA CARTE) initGPIO_Externe(); MyTimer_ActiveIT(TIM2, 2, commuterDEL_Externe); #endif */ //Test du PWM MyTimer_PWM(TIM2, 1); Set_DutyCycle_PWM(TIM2, 1, 30); while (1); }