diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s
index a2c81c0..d786326 100644
--- a/soft/PjtKEIL_StepSon/Src/GestionSon.s
+++ b/soft/PjtKEIL_StepSon/Src/GestionSon.s
@@ -1,18 +1,20 @@
PRESERVE8
THUMB
include Driver/DriverJeuLaser.inc
+
; ====================== zone de réservation de données, ======================================
;Section RAM (read only) :
area mesdata,data,readonly
-
+ extern Son
+ extern LongueurSon
;Section RAM (read write):
area maram,data,readwrite
SortieSon dcw 0
Index dcw 0
-
+
; ===============================================================================================
@@ -23,15 +25,43 @@ Index dcw 0
; écrire le code ici
EXPORT CallbackSon
-
+ EXPORT SortieSon
+ EXPORT Index
CallbackSon proc
push {lr}
+ ldr r0,=Son
+ ldr r1,=LongueurSon
+ ldr r1,[r1]
+
+
+ ldr r3,=Index ;on met l'adr d'Index dans r3
+ ldrh r2,[r3]
+
+ cmp r1,r2
+ ble Fin
+ push{r4,r5}
+
+ ldrsh r0,[r0,r2, LSL #1]; en C Son[Index]
+ add r2, r2, #1
+ strh r2,[r3] ; maj Index
+ mov r1, #32768
+ add r0, r0, r1
+ mov r4, #719
+ mul r0, r0, r4
+ asr r0, r0, #16
+
+ ldr r5,=SortieSon
+ strh r0,[r5]
+
+ pop{r4,r5}
+
+ pop{pc}
+
+Fin
pop {pc}
-
-
endp
END
\ No newline at end of file
diff --git a/soft/PjtKEIL_StepSon/StepSon.uvoptx b/soft/PjtKEIL_StepSon/StepSon.uvoptx
index 0ca8b9b..aa872e3 100644
--- a/soft/PjtKEIL_StepSon/StepSon.uvoptx
+++ b/soft/PjtKEIL_StepSon/StepSon.uvoptx
@@ -153,14 +153,115 @@
-U066CFF574857847167074929 -O2254 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM)
-
+
+
+ 0
+ 0
+ 32
+ 1
+ 134220068
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\GestionSon.s
+
+ \\StepSon\Src/GestionSon.s\32
+
+
+ 1
+ 0
+ 52
+ 1
+ 134220110
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\GestionSon.s
+
+ \\StepSon\Src/GestionSon.s\52
+
+
+ 2
+ 0
+ 54
+ 1
+ 134220114
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\GestionSon.s
+
+ \\StepSon\Src/GestionSon.s\54
+
+
+ 3
+ 0
+ 57
+ 1
+ 134220118
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\GestionSon.s
+
+ \\StepSon\Src/GestionSon.s\57
+
+
+ 4
+ 0
+ 55
+ 1
+ 134220116
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\GestionSon.s
+
+ \\StepSon\Src/GestionSon.s\55
+
+
+
+
+ 0
+ 1
+ SortieSon
+
+
+ 1
+ 1
+ Index
+
+
+
+
+ 1
+ 256
+ 0x200000a0
+ 0
+
+
0
0
1
- 0
+ 1
0
0
0
@@ -174,7 +275,7 @@
0
0
0
- 0
+ 1
0
0
0
@@ -200,7 +301,12 @@
0
((portb & 0x00000002) >> 1 & 0x2) >> 1
- FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F160000000000000000000000000000000000000096020008
+ FF000000000000000000000000000000E0FFEF400000000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000922449922449E23F030000000000000000000000000000000000000096020008
+
+
+ 1
+ `SortieSon
+ 0080000000000000000000000000001D0488B54100000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000002000000DBB66DDBB66DDB3F030000000000000000000000000000000000000000090008