forked from acco/chti23
76 lines
No EOL
1 KiB
ArmAsm
76 lines
No EOL
1 KiB
ArmAsm
PRESERVE8
|
|
THUMB
|
|
|
|
include ../Driver/DriverJeuLaser.inc
|
|
export timer_callback
|
|
; ====================== zone de réservation de données, ======================================
|
|
;Section RAM (read only) :
|
|
area mesdata,data,readonly
|
|
|
|
|
|
;Section RAM (read write):
|
|
area maram,data,readwrite
|
|
|
|
FlagCligno dcd 0
|
|
|
|
|
|
; ===============================================================================================
|
|
|
|
|
|
|
|
|
|
;Section ROM code (read only) :
|
|
area moncode,code,readonly
|
|
; écrire le code ici
|
|
EXPORT FlagCligno
|
|
;void timer_callback(void)
|
|
;{
|
|
; if (FlagCligno==1)
|
|
; {
|
|
; FlagCligno=0;
|
|
; GPIOB_Set(1);
|
|
; }
|
|
; else
|
|
; {
|
|
; FlagCligno=1;
|
|
; GPIOB_Clear(1);
|
|
; }
|
|
;}
|
|
|
|
|
|
;void timer_callback(void)
|
|
timer_callback proc
|
|
;{
|
|
push {lr}
|
|
ldr r1,=FlagCligno
|
|
ldr r0, [r1]
|
|
cmp r0, #0
|
|
beq flag_nul
|
|
; if (FlagCligno==1)
|
|
|
|
; {
|
|
mov r0, #0
|
|
str r0, [r1]
|
|
mov r0, #1
|
|
bl GPIOB_Set
|
|
pop {pc}
|
|
|
|
; FlagCligno=0;
|
|
; GPIOB_Set(1);
|
|
; }
|
|
; else
|
|
flag_nul
|
|
; {
|
|
mov r0, #1
|
|
str r0, [r1]
|
|
|
|
bl GPIOB_Clear
|
|
; FlagCligno=1;
|
|
; GPIOB_Clear(1);
|
|
; }
|
|
;}
|
|
pop {pc}
|
|
|
|
endp
|
|
|
|
END
|