Raphael_lacroix-Aurelia_lej.../Partie son/PjtKEIL_StepSon/PjtKEIL_StepSon/Src/principal.c
2022-03-30 18:19:36 +02:00

35 lines
829 B
C

#include "DriverJeuLaser.h"
extern int PeriodeSonMicroSec;
/* Test StartSon : int var = 0; */
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);
PWM_Init_ff(TIM3, 3, 720); // definit implicitement un timer 3
GPIO_Configure(GPIOB, 0, OUTPUT, ALT_PPULL);
Active_IT_Debordement_Timer(TIM4, 2,CallbackSon);
//============================================================================
StartSon();
while (1)
{
/* Test StartSon
if (var == 1){
StartSon();
var = 0;
} */
}
}