   1              		.syntax unified
   2              		.cpu cortex-m3
   3              		.fpu softvfp
   4              		.eabi_attribute 20, 1
   5              		.eabi_attribute 21, 1
   6              		.eabi_attribute 23, 3
   7              		.eabi_attribute 24, 1
   8              		.eabi_attribute 25, 1
   9              		.eabi_attribute 26, 1
  10              		.eabi_attribute 30, 4
  11              		.eabi_attribute 34, 1
  12              		.eabi_attribute 18, 4
  13              		.thumb
  14              		.syntax unified
  15              		.file	"systick.c"
  16              		.text
  17              	.Ltext0:
  18              		.cfi_sections	.debug_frame
  19              		.section	.text.systime_Init,"ax",%progbits
  20              		.align	1
  21              		.global	systime_Init
  22              		.thumb
  23              		.thumb_func
  25              	systime_Init:
  26              	.LFB0:
  27              		.file 1 "uc_libc_dev/_arch/arm_lpc/timer/systick.c"
   1:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Timer de sistema com base de tempo de 1ms, ou 0.5ms, ou 0.25ms de acordo com SYSTIME_BASE_TICK
   2:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
   3:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** #include "systick.h"
   4:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** #include "vic.h"
   5:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
   6:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** void sysTick_ISR(void);
   7:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
   8:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** typedef void (*systick_pFunc_t)(void);
   9:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** static volatile systick_pFunc_t systime_IntFunctions;
  10:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** static volatile uint callfuncTime = 0;
  11:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  12:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** static volatile u32 timerout;
  13:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** static volatile u32 timerout_startTime;
  14:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** static volatile u32 countTicks_ms;						// Contador de ticks de sistema
  15:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  16:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  17:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** #if (SYSTIME_USE_LED == pdON)
  18:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // countTicksLed 	0 -- SYSTIME_LED_OFF_MS ----- SYSTIME_LED_OFF_MS + SYSTIME_LED_ON_MS  0
  19:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // LED 			 	_____#####################################################################_____________
  20:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** static volatile u32 countTicksLed;
  21:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** #endif
  22:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  23:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** /* Interrupt priorities used by the kernel port layer itself.  These are generic
  24:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** to all Cortex-M ports, and do not rely on any particular library functions. */
  25:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** #define configINTERRUPT_PRIORITY 		( SYSTIME_PRIO_LEVEL << (3) )
  26:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  27:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
  28:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Descrição: 	Incializa o Timer para uso do tick de sistema
  29:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Parametros:	Nenhum
  30:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Retorna:		Nada
  31:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
  32:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** int systime_Init(void) {
  28              		.loc 1 32 0
  29              		.cfi_startproc
  30              		@ args = 0, pretend = 0, frame = 0
  31              		@ frame_needed = 0, uses_anonymous_args = 0
  32              		@ link register save eliminated.
  33:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	#if (SYSTIME_USE_LED == pdON)
  34:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	ledSYSTIME_DIR |= ledSYSTIME; 					// Colocar o pino do led para saida
  33              		.loc 1 34 0
  34 0000 104A     		ldr	r2, .L2
  35:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	countTicksLed = 0;
  36:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	#endif
  37:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  38:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	// Make PendSV and SysTick the lowest priority interrupts
  39:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	NVIC_SYSPRI2_REG |= ( ( ( u32 ) configINTERRUPT_PRIORITY ) << 16UL );
  40:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	NVIC_SYSPRI2_REG |= ( ( ( u32 ) configINTERRUPT_PRIORITY ) << 24UL );
  41:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  42:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	// Configure SysTick to interrupt at the requested rate.
  43:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	STRELOAD = ( CCLK / 1000 / SYSTIME_BASE_TICK ) - 1UL;
  44:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	STCTRL = ( STCTRL_CLKSOURCE | STCTRL_TICKINT | STCTRL_ENABLE );
  45:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  46:uc_libc_dev/_arch/arm_lpc/timer/systick.c ****   	systime_ClearIntHandler(); // retira qualquer função anexada para interrupção do systime
  47:uc_libc_dev/_arch/arm_lpc/timer/systick.c ****   	countTicks_ms = 0; // Limpa o contador de ticks do sistema
  48:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  49:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	return pdPASS;
  50:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
  35              		.loc 1 50 0
  36 0002 0120     		movs	r0, #1
  34:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	countTicksLed = 0;
  37              		.loc 1 34 0
  38 0004 1368     		ldr	r3, [r2]
  39 0006 43F08053 		orr	r3, r3, #268435456
  40 000a 1360     		str	r3, [r2]
  35:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	countTicksLed = 0;
  41              		.loc 1 35 0
  42 000c 0E4B     		ldr	r3, .L2+4
  43 000e 0022     		movs	r2, #0
  44 0010 1A60     		str	r2, [r3]
  39:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	NVIC_SYSPRI2_REG |= ( ( ( u32 ) configINTERRUPT_PRIORITY ) << 24UL );
  45              		.loc 1 39 0
  46 0012 0E4B     		ldr	r3, .L2+8
  47 0014 1968     		ldr	r1, [r3]
  43:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	STCTRL = ( STCTRL_CLKSOURCE | STCTRL_TICKINT | STCTRL_ENABLE );
  48              		.loc 1 43 0
  49 0016 A3F60C53 		subw	r3, r3, #3340
  39:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	NVIC_SYSPRI2_REG |= ( ( ( u32 ) configINTERRUPT_PRIORITY ) << 24UL );
  50              		.loc 1 39 0
  51 001a 41F47801 		orr	r1, r1, #16252928
  52 001e C3F80C1D 		str	r1, [r3, #3340]
  40:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  53              		.loc 1 40 0
  54 0022 D3F80C1D 		ldr	r1, [r3, #3340]
  55 0026 41F07841 		orr	r1, r1, #-134217728
  56 002a C3F80C1D 		str	r1, [r3, #3340]
  43:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	STCTRL = ( STCTRL_CLKSOURCE | STCTRL_TICKINT | STCTRL_ENABLE );
  57              		.loc 1 43 0
  58 002e 0849     		ldr	r1, .L2+12
  59 0030 1960     		str	r1, [r3]
  44:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  60              		.loc 1 44 0
  61 0032 0721     		movs	r1, #7
  62 0034 43F8041C 		str	r1, [r3, #-4]
  63              	.LBB18:
  64              	.LBB19:
  51:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  52:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // -----------------------------------------------------------------------
  53:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Descrição: 	Anexa uma routina ao vetor de interrupções a ser chamada a cada xticks
  54:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Parametro: 	int_func
  55:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** //					Ponteiro da rotina que tratará a interrupção do timer.
  56:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** //					Ex:	systime_SetIntHandler(myOverflowFunction, xticks);
  57:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** //				xticks: Quantidade de ticks que a função deve ser chamada. Consultar SYSTIME_BASE_TICK
  58:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Retorna:		Nada
  59:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
  60:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** void systime_SetIntHandler(void (*int_func)(void), uint xticks ) {
  61:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	if (xticks == 0) { systime_IntFunctions = 0; return;}
  62:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	systime_IntFunctions = int_func;
  63:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	callfuncTime = xticks;
  64:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
  65:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  66:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
  67:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Descrição: 	Retira a routina da inetrrupçao desejada do vetor de interrupções
  68:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Parametros:	Nenhum
  69:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Retorna:		Nada
  70:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
  71:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** void systime_ClearIntHandler(void) {
  72:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	systime_IntFunctions = 0;
  65              		.loc 1 72 0
  66 0038 064B     		ldr	r3, .L2+16
  67 003a 1A60     		str	r2, [r3]
  68              	.LBE19:
  69              	.LBE18:
  47:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  70              		.loc 1 47 0
  71 003c 064B     		ldr	r3, .L2+20
  72 003e 1A60     		str	r2, [r3]
  50:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  73              		.loc 1 50 0
  74 0040 7047     		bx	lr
  75              	.L3:
  76 0042 00BF     		.align	2
  77              	.L2:
  78 0044 80C00920 		.word	537510016
  79 0048 00000000 		.word	.LANCHOR0
  80 004c 20ED00E0 		.word	-536810208
  81 0050 9F860100 		.word	99999
  82 0054 00000000 		.word	.LANCHOR1
  83 0058 00000000 		.word	.LANCHOR2
  84              		.cfi_endproc
  85              	.LFE0:
  87              		.section	.text.systime_SetIntHandler,"ax",%progbits
  88              		.align	1
  89              		.global	systime_SetIntHandler
  90              		.thumb
  91              		.thumb_func
  93              	systime_SetIntHandler:
  94              	.LFB1:
  60:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	if (xticks == 0) { systime_IntFunctions = 0; return;}
  95              		.loc 1 60 0
  96              		.cfi_startproc
  97              		@ args = 0, pretend = 0, frame = 0
  98              		@ frame_needed = 0, uses_anonymous_args = 0
  99              		@ link register save eliminated.
 100              	.LVL0:
 101 0000 024B     		ldr	r3, .L9
  61:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	systime_IntFunctions = int_func;
 102              		.loc 1 61 0
 103 0002 09B1     		cbz	r1, .L7
  62:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	callfuncTime = xticks;
 104              		.loc 1 62 0
 105 0004 1860     		str	r0, [r3]
  63:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
 106              		.loc 1 63 0
 107 0006 024B     		ldr	r3, .L9+4
 108              	.L7:
 109 0008 1960     		str	r1, [r3]
 110 000a 7047     		bx	lr
 111              	.L10:
 112              		.align	2
 113              	.L9:
 114 000c 00000000 		.word	.LANCHOR1
 115 0010 00000000 		.word	.LANCHOR3
 116              		.cfi_endproc
 117              	.LFE1:
 119              		.section	.text.systime_ClearIntHandler,"ax",%progbits
 120              		.align	1
 121              		.global	systime_ClearIntHandler
 122              		.thumb
 123              		.thumb_func
 125              	systime_ClearIntHandler:
 126              	.LFB2:
  71:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	systime_IntFunctions = 0;
 127              		.loc 1 71 0
 128              		.cfi_startproc
 129              		@ args = 0, pretend = 0, frame = 0
 130              		@ frame_needed = 0, uses_anonymous_args = 0
 131              		@ link register save eliminated.
 132              		.loc 1 72 0
 133 0000 014B     		ldr	r3, .L12
 134 0002 0022     		movs	r2, #0
 135 0004 1A60     		str	r2, [r3]
 136 0006 7047     		bx	lr
 137              	.L13:
 138              		.align	2
 139              	.L12:
 140 0008 00000000 		.word	.LANCHOR1
 141              		.cfi_endproc
 142              	.LFE2:
 144              		.section	.text.systime_GetTick,"ax",%progbits
 145              		.align	1
 146              		.global	systime_GetTick
 147              		.thumb
 148              		.thumb_func
 150              	systime_GetTick:
 151              	.LFB3:
  73:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
  74:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  75:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
  76:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Descrição: 	Retorna a quantidade de ticks de sistema
  77:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Parametros:	Nenhum
  78:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Retorna:		O tempo em ticks de sistema
  79:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
  80:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** u32 systime_GetTick(void) {
 152              		.loc 1 80 0
 153              		.cfi_startproc
 154              		@ args = 0, pretend = 0, frame = 0
 155              		@ frame_needed = 0, uses_anonymous_args = 0
 156              		@ link register save eliminated.
  81:uc_libc_dev/_arch/arm_lpc/timer/systick.c ****   	return countTicks_ms;
 157              		.loc 1 81 0
 158 0000 014B     		ldr	r3, .L15
 159 0002 1868     		ldr	r0, [r3]
  82:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
 160              		.loc 1 82 0
 161 0004 7047     		bx	lr
 162              	.L16:
 163 0006 00BF     		.align	2
 164              	.L15:
 165 0008 00000000 		.word	.LANCHOR2
 166              		.cfi_endproc
 167              	.LFE3:
 169              		.section	.text.systime_GetElapsedTick,"ax",%progbits
 170              		.align	1
 171              		.global	systime_GetElapsedTick
 172              		.thumb
 173              		.thumb_func
 175              	systime_GetElapsedTick:
 176              	.LFB4:
  83:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  84:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
  85:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Descrição: 	Retorna a diferença entre o tempo atual com o tempo passado por parametro
  86:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Parametros:	Tempo que deseja diminuir do tempo de sistema
  87:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Retorna:		A diferença de tempos
  88:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
  89:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** u32 systime_GetElapsedTick(u32 start_time) {
 177              		.loc 1 89 0
 178              		.cfi_startproc
 179              		@ args = 0, pretend = 0, frame = 0
 180              		@ frame_needed = 0, uses_anonymous_args = 0
 181              		@ link register save eliminated.
 182              	.LVL1:
 183              	.LBB20:
 184              	.LBB21:
  81:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
 185              		.loc 1 81 0
 186 0000 014B     		ldr	r3, .L18
 187 0002 1B68     		ldr	r3, [r3]
 188              	.LBE21:
 189              	.LBE20:
  90:uc_libc_dev/_arch/arm_lpc/timer/systick.c ****   	return systime_GetTick() - start_time;
  91:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
 190              		.loc 1 91 0
 191 0004 181A     		subs	r0, r3, r0
 192              	.LVL2:
 193 0006 7047     		bx	lr
 194              	.L19:
 195              		.align	2
 196              	.L18:
 197 0008 00000000 		.word	.LANCHOR2
 198              		.cfi_endproc
 199              	.LFE4:
 201              		.section	.text.systime_Pause,"ax",%progbits
 202              		.align	1
 203              		.global	systime_Pause
 204              		.thumb
 205              		.thumb_func
 207              	systime_Pause:
 208              	.LFB5:
  92:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
  93:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
  94:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Descrição: 	Fornece uma pausa no sistema. Fica no loop até o tempo desejado
  95:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Parametros:	Tempo para pausa em ms. Qualquer valor ou usar as macros abaixo
  96:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** //					SYSTIME_xMS onde x = 2, 5, 10, 20, 30, 50, 100, 150, 250, 500
  97:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** //					SYSTIME_xSEC onde x = 1, 2, 5, 10
  98:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Retorna:		Nada
  99:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
 100:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** void systime_Pause(u32 duration) {
 209              		.loc 1 100 0
 210              		.cfi_startproc
 211              		@ args = 0, pretend = 0, frame = 0
 212              		@ frame_needed = 0, uses_anonymous_args = 0
 213              		@ link register save eliminated.
 214              	.LVL3:
 215              	.LBB22:
 216              	.LBB23:
  81:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
 217              		.loc 1 81 0
 218 0000 034B     		ldr	r3, .L23
 219 0002 1968     		ldr	r1, [r3]
 220              	.L21:
 221              	.LVL4:
 222              	.LBE23:
 223              	.LBE22:
 224              	.LBB24:
 225              	.LBB25:
 226              	.LBB26:
 227              	.LBB27:
  81:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
 228              		.loc 1 81 0 is_stmt 0 discriminator 1
 229 0004 1A68     		ldr	r2, [r3]
 230              	.LVL5:
 231              	.LBE27:
 232              	.LBE26:
 233              	.LBE25:
 234              	.LBE24:
 101:uc_libc_dev/_arch/arm_lpc/timer/systick.c ****   	u32 start_time = systime_GetTick();
 102:uc_libc_dev/_arch/arm_lpc/timer/systick.c ****  	while (systime_GetElapsedTick(start_time) < duration) CRITICAL_WAIT;
 235              		.loc 1 102 0 is_stmt 1 discriminator 1
 236 0006 521A     		subs	r2, r2, r1
 237 0008 9042     		cmp	r0, r2
 238 000a FBD8     		bhi	.L21
 103:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
 239              		.loc 1 103 0
 240 000c 7047     		bx	lr
 241              	.L24:
 242 000e 00BF     		.align	2
 243              	.L23:
 244 0010 00000000 		.word	.LANCHOR2
 245              		.cfi_endproc
 246              	.LFE5:
 248              		.section	.text.timeout_Init,"ax",%progbits
 249              		.align	1
 250              		.global	timeout_Init
 251              		.thumb
 252              		.thumb_func
 254              	timeout_Init:
 255              	.LFB6:
 104:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
 105:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
 106:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Descrição: 	Inicializa o timeout para usar o timeout_Check
 107:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Parametro:	timeout: tempo em ms para espera. Podemos usar macros abaixo
 108:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** //					SYSTIME_xMS onde x = 2, 5, 10, 20, 30, 50, 100, 150, 250, 500
 109:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** //					SYSTIME_xSEC onde x = 1, 2, 5, 10
 110:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
 111:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** void timeout_Init(u32 timeout) {
 256              		.loc 1 111 0
 257              		.cfi_startproc
 258              		@ args = 0, pretend = 0, frame = 0
 259              		@ frame_needed = 0, uses_anonymous_args = 0
 260              		@ link register save eliminated.
 261              	.LVL6:
 112:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	timerout = timeout;
 262              		.loc 1 112 0
 263 0000 034B     		ldr	r3, .L26
 264 0002 1860     		str	r0, [r3]
 265              	.LBB28:
 266              	.LBB29:
  81:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
 267              		.loc 1 81 0
 268 0004 034B     		ldr	r3, .L26+4
 269 0006 1A68     		ldr	r2, [r3]
 270              	.LBE29:
 271              	.LBE28:
 113:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	timerout_startTime = systime_GetTick();
 272              		.loc 1 113 0
 273 0008 034B     		ldr	r3, .L26+8
 274 000a 1A60     		str	r2, [r3]
 275 000c 7047     		bx	lr
 276              	.L27:
 277 000e 00BF     		.align	2
 278              	.L26:
 279 0010 00000000 		.word	.LANCHOR4
 280 0014 00000000 		.word	.LANCHOR2
 281 0018 00000000 		.word	.LANCHOR5
 282              		.cfi_endproc
 283              	.LFE6:
 285              		.section	.text.timeout_Check,"ax",%progbits
 286              		.align	1
 287              		.global	timeout_Check
 288              		.thumb
 289              		.thumb_func
 291              	timeout_Check:
 292              	.LFB7:
 114:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
 115:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
 116:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
 117:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Descrição: 	Checa se o tempo de timeout desejado já estourou
 118:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // Retorna: 	pdTRUE se o tempo de timeou já foi alcançado, senão retorna pdFALSE
 119:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ------------------------------------------------------------------------------------------------
 120:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** int timeout_Check(void) {
 293              		.loc 1 120 0
 294              		.cfi_startproc
 295              		@ args = 0, pretend = 0, frame = 0
 296              		@ frame_needed = 0, uses_anonymous_args = 0
 297              		@ link register save eliminated.
 121:uc_libc_dev/_arch/arm_lpc/timer/systick.c ****   	if (systime_GetElapsedTick(timerout_startTime) < timerout)
 298              		.loc 1 121 0
 299 0000 054B     		ldr	r3, .L29
 300 0002 0649     		ldr	r1, .L29+4
 301 0004 1A68     		ldr	r2, [r3]
 302              	.LVL7:
 303              	.LBB30:
 304              	.LBB31:
 305              	.LBB32:
 306              	.LBB33:
  81:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
 307              		.loc 1 81 0
 308 0006 064B     		ldr	r3, .L29+8
 309 0008 1B68     		ldr	r3, [r3]
 310              	.LVL8:
 311              	.LBE33:
 312              	.LBE32:
 313              	.LBE31:
 314              	.LBE30:
 315              		.loc 1 121 0
 316 000a 0868     		ldr	r0, [r1]
 317 000c 9B1A     		subs	r3, r3, r2
 122:uc_libc_dev/_arch/arm_lpc/timer/systick.c ****     		return pdFAIL;
 123:uc_libc_dev/_arch/arm_lpc/timer/systick.c ****   	else	return pdPASS;
 124:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** }
 318              		.loc 1 124 0
 319 000e 9842     		cmp	r0, r3
 320 0010 8CBF     		ite	hi
 321 0012 0020     		movhi	r0, #0
 322 0014 0120     		movls	r0, #1
 323 0016 7047     		bx	lr
 324              	.L30:
 325              		.align	2
 326              	.L29:
 327 0018 00000000 		.word	.LANCHOR5
 328 001c 00000000 		.word	.LANCHOR4
 329 0020 00000000 		.word	.LANCHOR2
 330              		.cfi_endproc
 331              	.LFE7:
 333              		.section	.text.sysTick_ISR,"ax",%progbits
 334              		.align	1
 335              		.global	sysTick_ISR
 336              		.thumb
 337              		.thumb_func
 339              	sysTick_ISR:
 340              	.LFB8:
 125:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
 126:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ################################################################################################
 127:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // SYSTEM TIMER INTERRUPÇÃO
 128:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ################################################################################################
 129:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** // ################################################################################################
 130:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** void sysTick_ISR (void) {
 341              		.loc 1 130 0
 342              		.cfi_startproc
 343              		@ args = 0, pretend = 0, frame = 0
 344              		@ frame_needed = 0, uses_anonymous_args = 0
 345 0000 08B5     		push	{r3, lr}
 346              	.LCFI0:
 347              		.cfi_def_cfa_offset 8
 348              		.cfi_offset 3, -8
 349              		.cfi_offset 14, -4
 131:uc_libc_dev/_arch/arm_lpc/timer/systick.c ****     ISR_ENTRY;	// Procedimento para entrada da interrupção
 132:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
 133:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	countTicks_ms++;
 350              		.loc 1 133 0
 351 0002 124B     		ldr	r3, .L40
 134:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
 135:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	// Checa se existe uma função anexada a interrupção e é tempo de chamar a função
 136:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	if ( (systime_IntFunctions) && (countTicks_ms % callfuncTime == 0))
 352              		.loc 1 136 0
 353 0004 1249     		ldr	r1, .L40+4
 133:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
 354              		.loc 1 133 0
 355 0006 1A68     		ldr	r2, [r3]
 356 0008 0132     		adds	r2, r2, #1
 357 000a 1A60     		str	r2, [r3]
 358              		.loc 1 136 0
 359 000c 0A68     		ldr	r2, [r1]
 360 000e 4AB1     		cbz	r2, .L32
 361              		.loc 1 136 0 is_stmt 0 discriminator 1
 362 0010 1868     		ldr	r0, [r3]
 363 0012 104B     		ldr	r3, .L40+8
 364 0014 1B68     		ldr	r3, [r3]
 365 0016 B0FBF3F2 		udiv	r2, r0, r3
 366 001a 03FB1203 		mls	r3, r3, r2, r0
 367 001e 0BB9     		cbnz	r3, .L32
 137:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 		systime_IntFunctions();					// Execute a função anexada
 368              		.loc 1 137 0 is_stmt 1
 369 0020 0B68     		ldr	r3, [r1]
 370 0022 9847     		blx	r3
 371              	.LVL9:
 372              	.L32:
 138:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 
 139:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	#if (SYSTIME_USE_LED == pdON)
 140:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 	if (countTicksLed >= SYSTIME_LED_OFF_MS*SYSTIME_BASE_TICK + SYSTIME_LED_ON_MS*SYSTIME_BASE_TICK)
 373              		.loc 1 140 0
 374 0024 0C4B     		ldr	r3, .L40+12
 375 0026 1A68     		ldr	r2, [r3]
 376 0028 B2F57A7F 		cmp	r2, #1000
 141:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 		countTicksLed = 0;
 377              		.loc 1 141 0
 378 002c 24BF     		itt	cs
 379 002e 0022     		movcs	r2, #0
 380 0030 1A60     		strcs	r2, [r3]
 142:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 		countTicksLed++;
 381              		.loc 1 142 0
 382 0032 1A68     		ldr	r2, [r3]
 383 0034 0132     		adds	r2, r2, #1
 384 0036 1A60     		str	r2, [r3]
 143:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 		if (countTicksLed > SYSTIME_LED_OFF_MS*SYSTIME_BASE_TICK) {
 385              		.loc 1 143 0
 386 0038 1B68     		ldr	r3, [r3]
 387 003a B3F5617F 		cmp	r3, #900
 144:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 			ledSYSTIME_ON = ledSYSTIME;
 388              		.loc 1 144 0
 389 003e 8CBF     		ite	hi
 390 0040 064A     		ldrhi	r2, .L40+16
 145:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 		} else {
 146:uc_libc_dev/_arch/arm_lpc/timer/systick.c **** 			ledSYSTIME_OFF = ledSYSTIME;
 391              		.loc 1 146 0
 392 0042 074A     		ldrls	r2, .L40+20
 393 0044 4FF08053 		mov	r3, #268435456
 394 0048 1360     		str	r3, [r2]
 395 004a 08BD     		pop	{r3, pc}
 396              	.L41:
 397              		.align	2
 398              	.L40:
 399 004c 00000000 		.word	.LANCHOR2
 400 0050 00000000 		.word	.LANCHOR1
 401 0054 00000000 		.word	.LANCHOR3
 402 0058 00000000 		.word	.LANCHOR0
 403 005c 98C00920 		.word	537510040
 404 0060 9CC00920 		.word	537510044
 405              		.cfi_endproc
 406              	.LFE8:
 408              		.section	.bss.countTicksLed,"aw",%nobits
 409              		.align	2
 410              		.set	.LANCHOR0,. + 0
 413              	countTicksLed:
 414 0000 00000000 		.space	4
 415              		.section	.bss.countTicks_ms,"aw",%nobits
 416              		.align	2
 417              		.set	.LANCHOR2,. + 0
 420              	countTicks_ms:
 421 0000 00000000 		.space	4
 422              		.section	.bss.timerout,"aw",%nobits
 423              		.align	2
 424              		.set	.LANCHOR4,. + 0
 427              	timerout:
 428 0000 00000000 		.space	4
 429              		.section	.bss.callfuncTime,"aw",%nobits
 430              		.align	2
 431              		.set	.LANCHOR3,. + 0
 434              	callfuncTime:
 435 0000 00000000 		.space	4
 436              		.section	.bss.systime_IntFunctions,"aw",%nobits
 437              		.align	2
 438              		.set	.LANCHOR1,. + 0
 441              	systime_IntFunctions:
 442 0000 00000000 		.space	4
 443              		.section	.bss.timerout_startTime,"aw",%nobits
 444              		.align	2
 445              		.set	.LANCHOR5,. + 0
 448              	timerout_startTime:
 449 0000 00000000 		.space	4
 450              		.text
 451              	.Letext0:
 452              		.file 2 "uc_libc_dev/_libdef/uc_libdefs.h"
DEFINED SYMBOLS
                            *ABS*:00000000 systick.c
D:\_temp\_windows\cc66I342.s:20     .text.systime_Init:00000000 $t
D:\_temp\_windows\cc66I342.s:25     .text.systime_Init:00000000 systime_Init
D:\_temp\_windows\cc66I342.s:78     .text.systime_Init:00000044 $d
D:\_temp\_windows\cc66I342.s:88     .text.systime_SetIntHandler:00000000 $t
D:\_temp\_windows\cc66I342.s:93     .text.systime_SetIntHandler:00000000 systime_SetIntHandler
D:\_temp\_windows\cc66I342.s:114    .text.systime_SetIntHandler:0000000c $d
D:\_temp\_windows\cc66I342.s:120    .text.systime_ClearIntHandler:00000000 $t
D:\_temp\_windows\cc66I342.s:125    .text.systime_ClearIntHandler:00000000 systime_ClearIntHandler
D:\_temp\_windows\cc66I342.s:140    .text.systime_ClearIntHandler:00000008 $d
D:\_temp\_windows\cc66I342.s:145    .text.systime_GetTick:00000000 $t
D:\_temp\_windows\cc66I342.s:150    .text.systime_GetTick:00000000 systime_GetTick
D:\_temp\_windows\cc66I342.s:165    .text.systime_GetTick:00000008 $d
D:\_temp\_windows\cc66I342.s:170    .text.systime_GetElapsedTick:00000000 $t
D:\_temp\_windows\cc66I342.s:175    .text.systime_GetElapsedTick:00000000 systime_GetElapsedTick
D:\_temp\_windows\cc66I342.s:197    .text.systime_GetElapsedTick:00000008 $d
D:\_temp\_windows\cc66I342.s:202    .text.systime_Pause:00000000 $t
D:\_temp\_windows\cc66I342.s:207    .text.systime_Pause:00000000 systime_Pause
D:\_temp\_windows\cc66I342.s:244    .text.systime_Pause:00000010 $d
D:\_temp\_windows\cc66I342.s:249    .text.timeout_Init:00000000 $t
D:\_temp\_windows\cc66I342.s:254    .text.timeout_Init:00000000 timeout_Init
D:\_temp\_windows\cc66I342.s:279    .text.timeout_Init:00000010 $d
D:\_temp\_windows\cc66I342.s:286    .text.timeout_Check:00000000 $t
D:\_temp\_windows\cc66I342.s:291    .text.timeout_Check:00000000 timeout_Check
D:\_temp\_windows\cc66I342.s:327    .text.timeout_Check:00000018 $d
D:\_temp\_windows\cc66I342.s:334    .text.sysTick_ISR:00000000 $t
D:\_temp\_windows\cc66I342.s:339    .text.sysTick_ISR:00000000 sysTick_ISR
D:\_temp\_windows\cc66I342.s:399    .text.sysTick_ISR:0000004c $d
D:\_temp\_windows\cc66I342.s:409    .bss.countTicksLed:00000000 $d
D:\_temp\_windows\cc66I342.s:413    .bss.countTicksLed:00000000 countTicksLed
D:\_temp\_windows\cc66I342.s:416    .bss.countTicks_ms:00000000 $d
D:\_temp\_windows\cc66I342.s:420    .bss.countTicks_ms:00000000 countTicks_ms
D:\_temp\_windows\cc66I342.s:423    .bss.timerout:00000000 $d
D:\_temp\_windows\cc66I342.s:427    .bss.timerout:00000000 timerout
D:\_temp\_windows\cc66I342.s:430    .bss.callfuncTime:00000000 $d
D:\_temp\_windows\cc66I342.s:434    .bss.callfuncTime:00000000 callfuncTime
D:\_temp\_windows\cc66I342.s:437    .bss.systime_IntFunctions:00000000 $d
D:\_temp\_windows\cc66I342.s:441    .bss.systime_IntFunctions:00000000 systime_IntFunctions
D:\_temp\_windows\cc66I342.s:444    .bss.timerout_startTime:00000000 $d
D:\_temp\_windows\cc66I342.s:448    .bss.timerout_startTime:00000000 timerout_startTime
                     .debug_frame:00000010 $d

NO UNDEFINED SYMBOLS
