#include "GestionSon.h" int main(void) { // =========================================================================== // ============= INIT PERIPH (faites qu'une seule fois) ===================== // =========================================================================== // Après exécution : le coeur CPU est clocké à 72MHz ainsi que tous les timers /* CLOCK_Configure(); Timer_1234_Init_ff( TIM4, 6552 ); Active_IT_Debordement_Timer( TIM4, 2, CallbackSon ); GPIO_Configure(GPIOB, 1, OUTPUT, OUTPUT_PPULL); */ //----------------------------------------------------------------- CLOCK_Configure(); PWM_Init_ff( TIM3, 3, 720 ); Timer_1234_Init_ff( TIM4, 6552 ); Active_IT_Debordement_Timer( TIM4, 2, CallbackSon ); GPIO_Configure(GPIOB, 0, OUTPUT, ALT_PPULL); GPIO_Configure(GPIOB, 1, OUTPUT, OUTPUT_PPULL); //Appel Startson tout les secondes. Enlevez le commentaire pour tester StartSon en simulation /* Timer_1234_Init_ff( TIM2, 72000000 ); Active_IT_Debordement_Timer( TIM2, 2, StartSon ); */ //============================================================================ while (1) { } }