From 16eca7f7b87fe46a0696761214410b06988a9c2e Mon Sep 17 00:00:00 2001 From: Sanim Gharbi Date: Tue, 18 Apr 2023 17:07:11 +0200 Subject: [PATCH] gestion du son fini --- soft/PjtKEIL_StepSon/Src/GestionSon.h | 2 ++ soft/PjtKEIL_StepSon/Src/GestionSon.s | 11 ++++++++++- soft/PjtKEIL_StepSon/Src/principal.c | 7 +++++++ soft/PjtKEIL_StepSon/StepSon.uvoptx | 12 ++++++++++++ soft/PjtKEIL_StepSon/StepSon.uvprojx | 17 ++++++++++++++++- 5 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 soft/PjtKEIL_StepSon/Src/GestionSon.h diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.h b/soft/PjtKEIL_StepSon/Src/GestionSon.h new file mode 100644 index 0000000..f3f0065 --- /dev/null +++ b/soft/PjtKEIL_StepSon/Src/GestionSon.h @@ -0,0 +1,2 @@ +extern short SortieSon; +extern void StartSon(); \ No newline at end of file diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s index 012fa80..8b200c3 100644 --- a/soft/PjtKEIL_StepSon/Src/GestionSon.s +++ b/soft/PjtKEIL_StepSon/Src/GestionSon.s @@ -17,6 +17,7 @@ indexTab dcd 0 ; =============================================================================================== EXPORT CallbackSon; + EXPORT StartSon; EXPORT SortieSon; EXTERN LongueurSon; EXTERN Son; @@ -29,6 +30,14 @@ indexTab dcd 0 area moncode,code,readonly ; écrire le code ici +StartSon proc + + LDR r0,=indexTab + MOV r1,#0 + STR r1,[r0] + BX LR + endp + CallbackSon proc LDR r0,=SortieSon LDR r1,=Son @@ -71,7 +80,7 @@ CallbackSon proc BX lr Fin - MOV r2,#0 + MOV r2,#-1 STR r2,[r0] pop {r8} diff --git a/soft/PjtKEIL_StepSon/Src/principal.c b/soft/PjtKEIL_StepSon/Src/principal.c index e86dc30..f22d0f8 100644 --- a/soft/PjtKEIL_StepSon/Src/principal.c +++ b/soft/PjtKEIL_StepSon/Src/principal.c @@ -1,6 +1,9 @@ #include "DriverJeuLaser.h" +#include "GestionSon.h" + + void CallbackSon(void); @@ -22,6 +25,10 @@ GPIO_Configure(GPIOB, 0, OUTPUT, ALT_PPULL); while (1) { + if(SortieSon==-1) + { + StartSon(); + } } } diff --git a/soft/PjtKEIL_StepSon/StepSon.uvoptx b/soft/PjtKEIL_StepSon/StepSon.uvoptx index fb2a3ed..59b47cf 100644 --- a/soft/PjtKEIL_StepSon/StepSon.uvoptx +++ b/soft/PjtKEIL_StepSon/StepSon.uvoptx @@ -753,6 +753,18 @@ 0 0 + + 4 + 6 + 5 + 0 + 0 + 0 + .\Src\GestionSon.h + GestionSon.h + 0 + 0 + diff --git a/soft/PjtKEIL_StepSon/StepSon.uvprojx b/soft/PjtKEIL_StepSon/StepSon.uvprojx index 2849fe6..33e8a1e 100644 --- a/soft/PjtKEIL_StepSon/StepSon.uvprojx +++ b/soft/PjtKEIL_StepSon/StepSon.uvprojx @@ -423,6 +423,11 @@ 2 .\Src\GestionSon.s + + GestionSon.h + 5 + .\Src\GestionSon.h + @@ -434,7 +439,7 @@ CibleSondeKEIL 0x4 ARM-ADS - 5060750::V5.06 update 6 (build 750)::.\ARMCC + 5060960::V5.06 update 7 (build 960)::.\ARMCC 0 @@ -847,6 +852,11 @@ 2 .\Src\GestionSon.s + + GestionSon.h + 5 + .\Src\GestionSon.h + @@ -1340,6 +1350,11 @@ 2 .\Src\GestionSon.s + + GestionSon.h + 5 + .\Src\GestionSon.h +