diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s index f8b2761..f5caf61 100644 --- a/soft/PjtKEIL_StepSon/Src/GestionSon.s +++ b/soft/PjtKEIL_StepSon/Src/GestionSon.s @@ -30,23 +30,24 @@ CallbackSon ldr r1, =index ldr r2, [r1] ldr r3, =Son - push {r6} - ldr r6, LongueurSon + ldr r0, LongueurSon - cmp r2, r6 + cmp r2, r0 ble notEqual - pop {r6} + + bx lr notEqual - mov r6, #2 - mul r6, r2 - LDRSH r0, [r3, r6] + mov r0, #2 + mul r0, r2 + ldrsh r0, [r3, r0] add r0, #32768 push {r4} mov r4, #719 mul r0, r4 mov r4, #65535 udiv r0, r4 + pop {r4} push {r7} ldr r7, =SortieSon str r0, [r7] @@ -58,6 +59,7 @@ notEqual str r2, [r5] pop {r5} - pop {r4} - - END \ No newline at end of file + + bx lr + +END \ No newline at end of file diff --git a/soft/PjtKEIL_StepSon/StepSon.uvoptx b/soft/PjtKEIL_StepSon/StepSon.uvoptx index 80a86dc..9edab1c 100644 --- a/soft/PjtKEIL_StepSon/StepSon.uvoptx +++ b/soft/PjtKEIL_StepSon/StepSon.uvoptx @@ -170,6 +170,22 @@ \\StepSon\Src/GestionSon.s\30 + + 1 + 0 + 64 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\Src\GestionSon.s + + +
@@ -185,7 +201,7 @@ 2 1 - r3,0x0A + r3,0x10 3