forked from acco/chti23
43 lines
852 B
C
43 lines
852 B
C
|
|
|
|
#include "DriverJeuLaser.h"
|
|
#include "GestionSon.h"
|
|
|
|
//void ItSystick(void) {
|
|
//StartSon();
|
|
//}
|
|
|
|
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();
|
|
|
|
unsigned int tick=91*72;
|
|
|
|
|
|
Timer_1234_Init_ff(TIM4,tick);
|
|
|
|
Active_IT_Debordement_Timer( TIM4, 2, CallbackSon );
|
|
|
|
PWM_Init_ff( TIM3, 3, 720);
|
|
GPIO_Configure(GPIOB, 0, OUTPUT, ALT_PPULL);
|
|
|
|
Systick_Period_ff( 1000000*72 );
|
|
//Systick_Prio_IT( 1, ItSystick );
|
|
SysTick_On;
|
|
SysTick_Enable_IT;
|
|
|
|
//============================================================================
|
|
|
|
while (1)
|
|
{
|
|
|
|
|
|
}
|
|
}
|
|
|