forked from acco/chti23
31 lines
671 B
C
31 lines
671 B
C
|
|
|
|
#include "DriverJeuLaser.h"
|
|
extern void CallbackSon(void);
|
|
extern int PeriodeSonMicroSec;
|
|
|
|
|
|
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, (1/PeriodeSonMicroSec*0.000001) );
|
|
Active_IT_Debordement_Timer( TIM4, 2, CallbackSon );
|
|
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
|
|
while (1)
|
|
{
|
|
}
|
|
}
|
|
|