forked from acco/chti23
gestion du son fini
This commit is contained in:
parent
b27f34eada
commit
16eca7f7b8
5 changed files with 47 additions and 2 deletions
2
soft/PjtKEIL_StepSon/Src/GestionSon.h
Normal file
2
soft/PjtKEIL_StepSon/Src/GestionSon.h
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
extern short SortieSon;
|
||||||
|
extern void StartSon();
|
|
@ -17,6 +17,7 @@ indexTab dcd 0
|
||||||
|
|
||||||
; ===============================================================================================
|
; ===============================================================================================
|
||||||
EXPORT CallbackSon;
|
EXPORT CallbackSon;
|
||||||
|
EXPORT StartSon;
|
||||||
EXPORT SortieSon;
|
EXPORT SortieSon;
|
||||||
EXTERN LongueurSon;
|
EXTERN LongueurSon;
|
||||||
EXTERN Son;
|
EXTERN Son;
|
||||||
|
@ -29,6 +30,14 @@ indexTab dcd 0
|
||||||
area moncode,code,readonly
|
area moncode,code,readonly
|
||||||
; écrire le code ici
|
; écrire le code ici
|
||||||
|
|
||||||
|
StartSon proc
|
||||||
|
|
||||||
|
LDR r0,=indexTab
|
||||||
|
MOV r1,#0
|
||||||
|
STR r1,[r0]
|
||||||
|
BX LR
|
||||||
|
endp
|
||||||
|
|
||||||
CallbackSon proc
|
CallbackSon proc
|
||||||
LDR r0,=SortieSon
|
LDR r0,=SortieSon
|
||||||
LDR r1,=Son
|
LDR r1,=Son
|
||||||
|
@ -71,7 +80,7 @@ CallbackSon proc
|
||||||
BX lr
|
BX lr
|
||||||
|
|
||||||
Fin
|
Fin
|
||||||
MOV r2,#0
|
MOV r2,#-1
|
||||||
STR r2,[r0]
|
STR r2,[r0]
|
||||||
|
|
||||||
pop {r8}
|
pop {r8}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
|
|
||||||
|
|
||||||
#include "DriverJeuLaser.h"
|
#include "DriverJeuLaser.h"
|
||||||
|
#include "GestionSon.h"
|
||||||
|
|
||||||
|
|
||||||
void CallbackSon(void);
|
void CallbackSon(void);
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,6 +25,10 @@ GPIO_Configure(GPIOB, 0, OUTPUT, ALT_PPULL);
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
if(SortieSon==-1)
|
||||||
|
{
|
||||||
|
StartSon();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -753,6 +753,18 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<bShared>0</bShared>
|
<bShared>0</bShared>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>4</GroupNumber>
|
||||||
|
<FileNumber>6</FileNumber>
|
||||||
|
<FileType>5</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>.\Src\GestionSon.h</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>GestionSon.h</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
|
|
|
@ -423,6 +423,11 @@
|
||||||
<FileType>2</FileType>
|
<FileType>2</FileType>
|
||||||
<FilePath>.\Src\GestionSon.s</FilePath>
|
<FilePath>.\Src\GestionSon.s</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>GestionSon.h</FileName>
|
||||||
|
<FileType>5</FileType>
|
||||||
|
<FilePath>.\Src\GestionSon.h</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
@ -434,7 +439,7 @@
|
||||||
<TargetName>CibleSondeKEIL</TargetName>
|
<TargetName>CibleSondeKEIL</TargetName>
|
||||||
<ToolsetNumber>0x4</ToolsetNumber>
|
<ToolsetNumber>0x4</ToolsetNumber>
|
||||||
<ToolsetName>ARM-ADS</ToolsetName>
|
<ToolsetName>ARM-ADS</ToolsetName>
|
||||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||||
<uAC6>0</uAC6>
|
<uAC6>0</uAC6>
|
||||||
<TargetOption>
|
<TargetOption>
|
||||||
<TargetCommonOption>
|
<TargetCommonOption>
|
||||||
|
@ -847,6 +852,11 @@
|
||||||
<FileType>2</FileType>
|
<FileType>2</FileType>
|
||||||
<FilePath>.\Src\GestionSon.s</FilePath>
|
<FilePath>.\Src\GestionSon.s</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>GestionSon.h</FileName>
|
||||||
|
<FileType>5</FileType>
|
||||||
|
<FilePath>.\Src\GestionSon.h</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
@ -1340,6 +1350,11 @@
|
||||||
<FileType>2</FileType>
|
<FileType>2</FileType>
|
||||||
<FilePath>.\Src\GestionSon.s</FilePath>
|
<FilePath>.\Src\GestionSon.s</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>GestionSon.h</FileName>
|
||||||
|
<FileType>5</FileType>
|
||||||
|
<FilePath>.\Src\GestionSon.h</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
|
Loading…
Reference in a new issue