diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s index d71ead0..0fe9b72 100644 --- a/soft/PjtKEIL_StepSon/Src/GestionSon.s +++ b/soft/PjtKEIL_StepSon/Src/GestionSon.s @@ -71,4 +71,19 @@ fin bx lr endp - END \ No newline at end of file + export start_son + +start_son proc + + ldr r0, =Index + + mov r1, #0 + str r1, [r0] + bx lr + + endp + + + END + + \ No newline at end of file diff --git a/soft/PjtKEIL_StepSon/Src/principal.c b/soft/PjtKEIL_StepSon/Src/principal.c index b817344..248f4ff 100644 --- a/soft/PjtKEIL_StepSon/Src/principal.c +++ b/soft/PjtKEIL_StepSon/Src/principal.c @@ -2,6 +2,9 @@ extern void timer_callback_son(void); +extern void start_son(void); +int bouton = 0 ; + int main(void) { @@ -39,6 +42,10 @@ CLOCK_Configure(); while (1) { + if (bouton == 1) { + start_son(); + bouton = 0; + } } } diff --git a/soft/PjtKEIL_StepSon/StepSon.uvoptx b/soft/PjtKEIL_StepSon/StepSon.uvoptx index 53cdb08..e66ed7a 100644 --- a/soft/PjtKEIL_StepSon/StepSon.uvoptx +++ b/soft/PjtKEIL_StepSon/StepSon.uvoptx @@ -75,7 +75,7 @@ 1 0 - 1 + 0 18 @@ -215,12 +215,12 @@ 0 (SortieSon & 0xFFFF) >> 0 - 008000000000000000000000000000000000894000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000001000000000000000000E03F1500000000000000000000000000000000000000AE080008 + 008000000000000000000000000000000078864000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000001000000000000000000E03F1500000000000000000000000000000000000000AE080008 1 - (PORTB & 0x00000001) - 00800000000000000000000000000000E0FFEF400000000000000000000000000000000028504F52544220262030783030303030303031290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000002000000000000000000E03F1500000000000000000000000000000000000000540A0008 + ((PORTB & 0x00000001) & 0xFFFF) >> 0 + 008000000000000000000000000000000000F03F0000000000000000000000000000000028504F52544220262030783030303030303031290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000002000000000000000000E03F1500000000000000000000000000000000000000540A0008 @@ -287,7 +287,7 @@ 1 0 - 0 + 1 18 @@ -366,6 +366,13 @@ + + + 0 + 1 + bouton + + 1