	PRESERVE8
	THUMB   
		

; ====================== 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
		
	export timer_callback
	extern GPIOB_Set
	extern GPIOB_Clear
	
; ===============================================================================================
	


		
;Section ROM code (read only) :		
	area    moncode,code,readonly
; écrire le code ici		

timer_callback
	push {lr}
	ldr r2,=FlagCligno
	ldr r1, [r2]
	
	cmp r1, #1
	beq active_gpio
	
	; ELSE
	mov r0, #1
	bl GPIOB_Clear
	mov r1, #1
	str r1, [r2]
	pop {pc}

active_gpio
	; IF = 1
	mov r0, #1
	bl GPIOB_Set
	mov r1, #0
	str r1, [r2]
	pop {pc}
	

		
		
	END	