forked from acco/chti23
Step_Jeu_Son Fini
This commit is contained in:
parent
448bfc9316
commit
3e88b87649
4 changed files with 33 additions and 20 deletions
14
soft/PjtKEIL_StepSon/Src/GestionSon.h
Normal file
14
soft/PjtKEIL_StepSon/Src/GestionSon.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Bibliothèque comprenant les fonctions de gestion du son bruitverre.asm à travers GestionSon.s
|
||||
* Les fonctions présentes sont CallbackSon et StartSon
|
||||
*/
|
||||
#include "DriverJeuLaser.h"
|
||||
|
||||
|
||||
//**********************************************************************************************************
|
||||
//--------------------- FONCTIONS DE GESTION DU SON --------------------------------------
|
||||
//**********************************************************************************************************
|
||||
|
||||
void CallbackSon(void);
|
||||
|
||||
void StartSon(void);
|
|
@ -17,7 +17,7 @@ Index dcw 0
|
|||
; ===============================================================================================
|
||||
EXPORT SortieSon
|
||||
EXPORT CallbackSon
|
||||
;EXPORT StartSon
|
||||
EXPORT StartSon
|
||||
IMPORT Son
|
||||
IMPORT LongueurSon
|
||||
IMPORT PWM_Set_Value_TIM3_Ch3
|
||||
|
@ -67,12 +67,13 @@ Fin
|
|||
endp
|
||||
|
||||
|
||||
;StartSon proc
|
||||
; push {lr}
|
||||
; ldr r3,=Index
|
||||
; mov r1, #0
|
||||
; strh r1,[r3]
|
||||
; pop {pc}
|
||||
StartSon proc
|
||||
push {lr}
|
||||
ldr r3,=Index
|
||||
mov r1, #0
|
||||
strh r1,[r3]
|
||||
pop {pc}
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
|
||||
#include "DriverJeuLaser.h"
|
||||
|
||||
void CallbackSon(void);
|
||||
|
||||
//void StartSon(void);
|
||||
#include "GestionSon.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
@ -35,17 +31,19 @@ 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)
|
||||
{
|
||||
/*
|
||||
for(int i = 0; i<99999; i++)
|
||||
{
|
||||
StartSon();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
<Mm>
|
||||
<WinNumber>1</WinNumber>
|
||||
<SubType>10</SubType>
|
||||
<ItemText>R2</ItemText>
|
||||
<ItemText>R3</ItemText>
|
||||
<AccSizeX>0</AccSizeX>
|
||||
</Mm>
|
||||
</MemoryWindow1>
|
||||
|
@ -230,12 +230,12 @@
|
|||
<Wi>
|
||||
<IntNumber>0</IntNumber>
|
||||
<FirstString>(PORTB & 0x00000001)</FirstString>
|
||||
<SecondString>008000000000000000000000000000000000F03F0000000000000000000000000000000028504F52544220262030783030303030303031290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000E03F0E00000000000000000000000000000000000000F20A0008</SecondString>
|
||||
<SecondString>008000000000000000000000000000000000F03F0000000000000000000000000000000028504F52544220262030783030303030303031290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000E03F1900000000000000000000000000000000000000F20A0008</SecondString>
|
||||
</Wi>
|
||||
<Wi>
|
||||
<IntNumber>1</IntNumber>
|
||||
<FirstString>(SortieSon & 0xFFFF) >> 0</FirstString>
|
||||
<SecondString>000080000000000000000000000000000000884000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000003000000FFFFFFFFFFFFDF3F0E00000000000000000000000000000000000000CC090008</SecondString>
|
||||
<SecondString>000080000000000000000000000000000000884000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000002000000FFFFFFFFFFFFDF3F1900000000000000000000000000000000000000CC090008</SecondString>
|
||||
</Wi>
|
||||
</LogicAnalyzers>
|
||||
<DebugDescription>
|
||||
|
|
Loading…
Reference in a new issue