forked from acco/chti23
34 lines
835 B
C
34 lines
835 B
C
|
|
|
|
#include "DriverJeuLaser.h"
|
|
void CallbackSon(void);
|
|
|
|
|
|
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();
|
|
// configuration du Timer 4 en débordement 100ms
|
|
u32 duree = 6552; //655200; //91*7200
|
|
Timer_1234_Init_ff(TIM4, duree);
|
|
PWM_Init_ff(TIM3, 3, 720);
|
|
GPIO_Configure(GPIOB, 0, OUTPUT, ALT_PPULL);
|
|
//** Placez votre code là ** //
|
|
Active_IT_Debordement_Timer(TIM4, 2, CallbackSon);
|
|
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
|
|
while (1)
|
|
{
|
|
}
|
|
}
|
|
|