   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	"adc0.c"
  16              		.text
  17              	.Ltext0:
  18              		.cfi_sections	.debug_frame
  19              		.section	.text.adc0_Init,"ax",%progbits
  20              		.align	1
  21              		.global	adc0_Init
  22              		.thumb
  23              		.thumb_func
  25              	adc0_Init:
  26              	.LFB0:
  27              		.file 1 "uc_libc_dev/_arch/arm_lpc/analogic/adc0.c"
   1:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** /*
   2:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	Esta biblioteca trabalha não no modo BURTS, ou seja, 
   3:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	é feito manualmente a conversão de cada canal desejada.
   4:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	No BUSRT, a CPU converte todos os canais automaticamente
   5:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	
   6:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	Também não foi usado a interrupção para as conversões
   7:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	
   8:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	Atualizado em 05/04/2012
   9:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** */
  10:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
  11:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** #include "adc0.h"
  12:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** #if (ADC0_USE_DEBUG == pdON)
  13:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** #include "stdio_uc.h"
  14:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** #endif
  15:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
  16:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // ------------------------------------------------------------------------------------------------
  17:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Descrição: 	Incialize ADC0. Somente os 4 canais para o LPC22xx e LPC24xx
  18:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Parametros:	frequencia de clock para conversão: 
  19:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					Máxima 13Mhz para o cortexm3 e 4500000 para os demais
  20:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					Deve ser multiplo inteiro de PCLK, ou seja, PCLK/adc_clk = valor inteiro
  21:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //				bit de resolução:
  22:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					AD0_CLKS_[10, 9, 8, 7, 6, 5, 4, 3]BIT (para cortexm3 é sempre 0)
  23:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Retorna:		nada
  24:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // ------------------------------------------------------------------------------------------------
  25:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** void adc0_Init(u32 adc_clk, u32 bit) {
  28              		.loc 1 25 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              	.LVL0:
  26:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c ****     PCONP |= PCAD;										// Liga o ADC no controle de potencia. Tem que ser antes da configuraçã
  34              		.loc 1 26 0
  35 0000 0D4A     		ldr	r2, .L2
  36 0002 1368     		ldr	r3, [r2]
  37 0004 43F48053 		orr	r3, r3, #4096
  38 0008 1360     		str	r3, [r2]
  27:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c ****     
  28:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c ****     #if defined (cortexm3)
  29:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 		ADC0_ConfigPort();
  39              		.loc 1 29 0
  40 000a A2F55022 		sub	r2, r2, #851968
  41 000e C03A     		subs	r2, r2, #192
  42 0010 1368     		ldr	r3, [r2]
  43 0012 43F4A013 		orr	r3, r3, #1310720
  44 0016 1360     		str	r3, [r2]
  30:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 		ADC0_DisablePulls();
  45              		.loc 1 30 0
  46 0018 136C     		ldr	r3, [r2, #64]
  47 001a 43F42013 		orr	r3, r3, #2621440
  48 001e 1364     		str	r3, [r2, #64]
  49              	.LVL1:
  31:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 		bit = 0;
  32:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c ****     #else
  33:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c ****     	// AD0.0 a AD0.4
  34:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c ****     	AD0_PINSEL = (AD0_PINSEL & ~AD0_PINMASK) | AD0_PINS; // Seleciona o pino externo para a função
  35:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c ****     #endif
  36:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
  37:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c ****     AD0CR = ( 0x01 << 0 ) 	|	// Canal 0 do ADC0
  38:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 			( ( (int)(PCLK / adc_clk) - 1 ) << 8 ) |  			// CLKDIV = 0 divide por 1, CLKDIV = 1 divide por 2
  39:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 			( 0 << 16 ) 	| 	// BURST = 0, no BURST, software controlled
  40:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 			( bit ) 		|	// Resolução (000 11 clocks/10 bits ...  111 4 clocks/3 bits)
  41:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 			( 1 << 21 ) 	| 	// PDN = 1, normal operation
  42:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 			( 0 << 22 ) 	|  	// RESERVADO
  43:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 			( 0 << 24 ) 	| 	// START = 0 A/D conversion stops
  50              		.loc 1 43 0
  51 0020 064B     		ldr	r3, .L2+4
  52 0022 B3FBF0F0 		udiv	r0, r3, r0
  53              	.LVL2:
  54 0026 0138     		subs	r0, r0, #1
  55 0028 0002     		lsls	r0, r0, #8
  56 002a 40F40010 		orr	r0, r0, #2097152
  37:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 			( ( (int)(PCLK / adc_clk) - 1 ) << 8 ) |  			// CLKDIV = 0 divide por 1, CLKDIV = 1 divide por 2
  57              		.loc 1 37 0
  58 002e 044B     		ldr	r3, .L2+8
  59              		.loc 1 43 0
  60 0030 40F00100 		orr	r0, r0, #1
  37:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 			( ( (int)(PCLK / adc_clk) - 1 ) << 8 ) |  			// CLKDIV = 0 divide por 1, CLKDIV = 1 divide por 2
  61              		.loc 1 37 0
  62 0034 1860     		str	r0, [r3]
  63 0036 7047     		bx	lr
  64              	.L3:
  65              		.align	2
  66              	.L2:
  67 0038 C4C00F40 		.word	1074774212
  68 003c 40787D01 		.word	25000000
  69 0040 00400340 		.word	1073954816
  70              		.cfi_endproc
  71              	.LFE0:
  73              		.section	.text.adc0_Start,"ax",%progbits
  74              		.align	1
  75              		.global	adc0_Start
  76              		.thumb
  77              		.thumb_func
  79              	adc0_Start:
  80              	.LFB1:
  44:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 			( 0 << 27 );		// EDGE = 0 (CAP/MAT singal falling, trigger A/D conversion)
  45:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
  46:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
  47:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#if (ADC0_USE_DEBUG == pdON)
  48:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	plog("AD: Init AD0CR[0x%x]=0x%x"CMD_TERMINATOR, &AD0CR, AD0CR);
  49:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#endif
  50:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
  51:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //	#ifdef ADC_INT_MODE
  52:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	//	if (!irq_Install(VIC_ADC, adc_ISR, priority))
  53:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 		//	 return pdFALSE;
  54:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	   	//else return pdPASS;
  55:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	//#endif
  56:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** }
  57:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
  58:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
  59:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // ------------------------------------------------------------------------------------------------
  60:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Descrição: 	Incialize conversão do ADC no modo não BURST
  61:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Parametros:	Canal a ser convertido
  62:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					AD0_CHANNEL[0..7]
  63:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //				Gatilho para iniciar a conversão
  64:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					AD0_START_NO 		 Somente no modo não BUSRT. Conversor parado
  65:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					AD0_START_NOW	 Somente no modo não BUSRT. Incializa conversão agora
  66:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					AD0_START_MAT0_0 	 Somente no modo não BUSRT. Incializa conversão pela mudança da borda do p
  67:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					AD0_START_MAT0_1 	 Somente no modo não BUSRT. Incializa conversão pela mudança da borda do p
  68:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					AD0_START_MAT0_2 	 Somente no modo não BUSRT. Incializa conversão pela mudança da borda do p
  69:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					AD0_START_MAT0_3 	 Somente no modo não BUSRT. Incializa conversão pela mudança da borda do p
  70:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					AD0_START_MAT1_0 	 Somente no modo não BUSRT. Incializa conversão pela mudança da borda do p
  71:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					AD0_START_MAT1_1 	 Somente no modo não BUSRT. Incializa conversão pela mudança da borda do p
  72:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //				Borda do gatilho (somente se usar gatinho MAT), se não usar coloca valor 0
  73:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					AD0_EDGE_FALLING 	 Começa a captura na borda de descrida do gatilho
  74:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					AD0_EDGE_RISING		 Começa a captura na borda de subida do gatilho
  75:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
  76:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
  77:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Retorna:		Nada
  78:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // ------------------------------------------------------------------------------------------------
  79:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** void adc0_Start(u8 channel, u32 start, u32 edge) {
  81              		.loc 1 79 0
  82              		.cfi_startproc
  83              		@ args = 0, pretend = 0, frame = 0
  84              		@ frame_needed = 0, uses_anonymous_args = 0
  85              	.LVL3:
  86 0000 10B5     		push	{r4, lr}
  87              	.LCFI0:
  88              		.cfi_def_cfa_offset 8
  89              		.cfi_offset 4, -8
  90              		.cfi_offset 14, -4
  80:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c ****     AD0CR &= ~(AD0_CHANNEL_MASK | AD0_START_MASK | AD0_EDGE_MASK);	// Limpa os bits de confiduraçõe
  91              		.loc 1 80 0
  92 0002 084C     		ldr	r4, .L5
  93 0004 2368     		ldr	r3, [r4]
  94 0006 23F07063 		bic	r3, r3, #251658240
  95 000a 23F0FF03 		bic	r3, r3, #255
  96 000e 2360     		str	r3, [r4]
  81:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c ****     AD0CR |= (edge | start | (1<<channel));							// Muda o canal ADC, configura a borda para incio
  97              		.loc 1 81 0
  98 0010 2368     		ldr	r3, [r4]
  99 0012 1943     		orrs	r1, r1, r3
 100              	.LVL4:
 101 0014 0123     		movs	r3, #1
 102 0016 0A43     		orrs	r2, r2, r1
 103              	.LVL5:
 104 0018 03FA00F0 		lsl	r0, r3, r0
 105              	.LVL6:
 106 001c 1043     		orrs	r0, r0, r2
 107 001e 2060     		str	r0, [r4]
 108 0020 10BD     		pop	{r4, pc}
 109              	.L6:
 110 0022 00BF     		.align	2
 111              	.L5:
 112 0024 00400340 		.word	1073954816
 113              		.cfi_endproc
 114              	.LFE1:
 116              		.section	.text.adc0_Stop,"ax",%progbits
 117              		.align	1
 118              		.global	adc0_Stop
 119              		.thumb
 120              		.thumb_func
 122              	adc0_Stop:
 123              	.LFB2:
  82:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	
  83:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#if (ADC0_USE_DEBUG == pdON)
  84:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	plog("AD: Start ADC channel[%d] AD0CR[0x%x] = 0x%x"CMD_TERMINATOR, channel, &AD0CR, AD0CR);
  85:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#endif
  86:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** }
  87:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
  88:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // ------------------------------------------------------------------------------------------------
  89:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Descrição: 	Para a conversão do ADC
  90:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Parametros:	Nenhum
  91:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Retorna:		Nada
  92:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // ------------------------------------------------------------------------------------------------
  93:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** void adc0_Stop(void) {
 124              		.loc 1 93 0
 125              		.cfi_startproc
 126              		@ args = 0, pretend = 0, frame = 0
 127              		@ frame_needed = 0, uses_anonymous_args = 0
 128              		@ link register save eliminated.
  94:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	AD0CR &= ~AD0_START_MASK;										// Para a conversão ADC
 129              		.loc 1 94 0
 130 0000 024A     		ldr	r2, .L8
 131 0002 1368     		ldr	r3, [r2]
 132 0004 23F0E063 		bic	r3, r3, #117440512
 133 0008 1360     		str	r3, [r2]
 134 000a 7047     		bx	lr
 135              	.L9:
 136              		.align	2
 137              	.L8:
 138 000c 00400340 		.word	1073954816
 139              		.cfi_endproc
 140              	.LFE2:
 142              		.section	.text.adc0_Read,"ax",%progbits
 143              		.align	1
 144              		.global	adc0_Read
 145              		.thumb
 146              		.thumb_func
 148              	adc0_Read:
 149              	.LFB3:
  95:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
  96:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#if (ADC0_USE_DEBUG == pdON)
  97:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	plog("AD: Stop. AD0CR = 0x%x"CMD_TERMINATOR, AD0CR);
  98:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#endif
  99:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** }
 100:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
 101:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** #if defined(LPC2468) || defined (cortexm3)
 102:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // ------------------------------------------------------------------------------------------------
 103:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Descrição: 	Espera e lê a conversão no canal ADC desejado
 104:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Parametros:	channel: Canal a ser convertido
 105:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					ADC_CHANNEL[0..7]
 106:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //				value: Ponteiro da variável para retorno do valor adc convertido
 107:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Retorna:		Sempre pdTRUE
 108:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // ------------------------------------------------------------------------------------------------
 109:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** int adc0_Read(u8 channel, u16 *value) {
 150              		.loc 1 109 0
 151              		.cfi_startproc
 152              		@ args = 0, pretend = 0, frame = 0
 153              		@ frame_needed = 0, uses_anonymous_args = 0
 154              	.LVL7:
 110:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	reg32 *addr_ch = (reg32 *)(AD0_BASE_ADDR + 0x10 + 4*channel);		// Capturo o endereço do registrado
 155              		.loc 1 110 0
 156 0000 084B     		ldr	r3, .L15
 109:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	reg32 *addr_ch = (reg32 *)(AD0_BASE_ADDR + 0x10 + 4*channel);		// Capturo o endereço do registrado
 157              		.loc 1 109 0
 158 0002 10B5     		push	{r4, lr}
 159              	.LCFI1:
 160              		.cfi_def_cfa_offset 8
 161              		.cfi_offset 4, -8
 162              		.cfi_offset 14, -4
 163              		.loc 1 110 0
 164 0004 0344     		add	r3, r3, r0
 111:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
 112:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#if (ADC0_USE_DEBUG == pdON)
 113:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	plog("AD: Read channel[%d] reg[0x%x]"CMD_TERMINATOR, channel, addr_ch); // NÃO LEIA O REGISTRADOR 
 114:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#endif
 115:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
 116:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	while(!(AD0STAT & (1<<channel)));							// Espero até que a conversão esteja completa 
 165              		.loc 1 116 0
 166 0006 0122     		movs	r2, #1
 167 0008 074C     		ldr	r4, .L15+4
 110:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
 168              		.loc 1 110 0
 169 000a 9B00     		lsls	r3, r3, #2
 170              	.LVL8:
 171              		.loc 1 116 0
 172 000c 02FA00F0 		lsl	r0, r2, r0
 173              	.LVL9:
 174              	.L11:
 175              		.loc 1 116 0 is_stmt 0 discriminator 1
 176 0010 2268     		ldr	r2, [r4]
 177 0012 0242     		tst	r2, r0
 178 0014 FCD0     		beq	.L11
 117:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#if defined(cortexm3)
 118:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	*value =  (*addr_ch>>4) & 0xFFF;
 179              		.loc 1 118 0 is_stmt 1
 180 0016 1B68     		ldr	r3, [r3]
 181              	.LVL10:
 119:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#else
 120:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	*value =  (*addr_ch>>6) & 0x3FF;
 121:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#endif
 122:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	
 123:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	return pdPASS;	
 124:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** }
 182              		.loc 1 124 0
 183 0018 0120     		movs	r0, #1
 118:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#else
 184              		.loc 1 118 0
 185 001a C3F30B13 		ubfx	r3, r3, #4, #12
 186 001e 0B80     		strh	r3, [r1]	@ movhi
 187              		.loc 1 124 0
 188 0020 10BD     		pop	{r4, pc}
 189              	.L16:
 190 0022 00BF     		.align	2
 191              	.L15:
 192 0024 04D00010 		.word	268488708
 193 0028 30400340 		.word	1073954864
 194              		.cfi_endproc
 195              	.LFE3:
 197              		.section	.text.adc0_ReadNoWait,"ax",%progbits
 198              		.align	1
 199              		.global	adc0_ReadNoWait
 200              		.thumb
 201              		.thumb_func
 203              	adc0_ReadNoWait:
 204              	.LFB4:
 125:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
 126:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // ------------------------------------------------------------------------------------------------
 127:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Descrição: 	Checa se a conversão do canal ADC desejado já foi feita. Retorna TRUE se foi feita
 128:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Parametros:	channel: Canal a ser convertido
 129:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //					ADC_CHANNEL[0..7]
 130:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** //				value: Ponteiro da variável para retorno do valor adc convertido
 131:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // Retorna:		Retorna pdPASS se o canal desejado já foi convertido, senão roda pdFAIL
 132:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** // ------------------------------------------------------------------------------------------------
 133:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** int adc0_ReadNoWait(u8 channel, u16 *value) {
 205              		.loc 1 133 0
 206              		.cfi_startproc
 207              		@ args = 0, pretend = 0, frame = 0
 208              		@ frame_needed = 0, uses_anonymous_args = 0
 209              		@ link register save eliminated.
 210              	.LVL11:
 134:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	reg32 *addr_ch = (reg32 *)(AD0_BASE_ADDR + 0x10 + 4*channel);		// Capturo o endereço do registrado
 211              		.loc 1 134 0
 212 0000 084B     		ldr	r3, .L21
 213 0002 0344     		add	r3, r3, r0
 214 0004 9B00     		lsls	r3, r3, #2
 215              	.LVL12:
 135:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
 136:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#if (ADC0_USE_DEBUG == pdON)
 137:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	plog("AD: Read channel[%d] reg[0x%x] AD0STAT = 0x%x"CMD_TERMINATOR, channel, addr_ch, AD0STAT); //
 138:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#endif
 139:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
 140:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	//if (! (AD0STAT & (1<<channel) )) return pdFAIL; // retorna falso caso ainda conversão não esteja
 141:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	if (! (*addr_ch & (0x80000000) )) return pdFAIL; // retorna falso caso ainda conversão não esteja 
 216              		.loc 1 141 0
 217 0006 1A68     		ldr	r2, [r3]
 218 0008 002A     		cmp	r2, #0
 219 000a 08DA     		bge	.L20
 142:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	if ((*addr_ch & (0x40000000) )) return pdFAIL; // retorna falso caso
 220              		.loc 1 142 0
 221 000c 1A68     		ldr	r2, [r3]
 222 000e 5200     		lsls	r2, r2, #1
 223 0010 05D4     		bmi	.L20
 143:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
 144:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#if defined(cortexm3)
 145:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	*value =  (*addr_ch>>4) & 0xFFF;
 224              		.loc 1 145 0
 225 0012 1B68     		ldr	r3, [r3]
 226              	.LVL13:
 146:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#else
 147:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	*value =  (*addr_ch>>6) & 0x3FF;
 148:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#endif
 149:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 
 150:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	return pdPASS;
 227              		.loc 1 150 0
 228 0014 0120     		movs	r0, #1
 229              	.LVL14:
 145:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	#else
 230              		.loc 1 145 0
 231 0016 C3F30B13 		ubfx	r3, r3, #4, #12
 232 001a 0B80     		strh	r3, [r1]	@ movhi
 233              		.loc 1 150 0
 234 001c 7047     		bx	lr
 235              	.LVL15:
 236              	.L20:
 141:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** 	if ((*addr_ch & (0x40000000) )) return pdFAIL; // retorna falso caso
 237              		.loc 1 141 0
 238 001e 0020     		movs	r0, #0
 239              	.LVL16:
 151:uc_libc_dev/_arch/arm_lpc/analogic/adc0.c **** }
 240              		.loc 1 151 0
 241 0020 7047     		bx	lr
 242              	.L22:
 243 0022 00BF     		.align	2
 244              	.L21:
 245 0024 04D00010 		.word	268488708
 246              		.cfi_endproc
 247              	.LFE4:
 249              		.text
 250              	.Letext0:
 251              		.file 2 "uc_libc_dev/_libdef/uc_libdefs.h"
DEFINED SYMBOLS
                            *ABS*:00000000 adc0.c
D:\_temp\_windows\ccTFLOWf.s:20     .text.adc0_Init:00000000 $t
D:\_temp\_windows\ccTFLOWf.s:25     .text.adc0_Init:00000000 adc0_Init
D:\_temp\_windows\ccTFLOWf.s:67     .text.adc0_Init:00000038 $d
D:\_temp\_windows\ccTFLOWf.s:74     .text.adc0_Start:00000000 $t
D:\_temp\_windows\ccTFLOWf.s:79     .text.adc0_Start:00000000 adc0_Start
D:\_temp\_windows\ccTFLOWf.s:112    .text.adc0_Start:00000024 $d
D:\_temp\_windows\ccTFLOWf.s:117    .text.adc0_Stop:00000000 $t
D:\_temp\_windows\ccTFLOWf.s:122    .text.adc0_Stop:00000000 adc0_Stop
D:\_temp\_windows\ccTFLOWf.s:138    .text.adc0_Stop:0000000c $d
D:\_temp\_windows\ccTFLOWf.s:143    .text.adc0_Read:00000000 $t
D:\_temp\_windows\ccTFLOWf.s:148    .text.adc0_Read:00000000 adc0_Read
D:\_temp\_windows\ccTFLOWf.s:192    .text.adc0_Read:00000024 $d
D:\_temp\_windows\ccTFLOWf.s:198    .text.adc0_ReadNoWait:00000000 $t
D:\_temp\_windows\ccTFLOWf.s:203    .text.adc0_ReadNoWait:00000000 adc0_ReadNoWait
D:\_temp\_windows\ccTFLOWf.s:245    .text.adc0_ReadNoWait:00000024 $d
                     .debug_frame:00000010 $d

NO UNDEFINED SYMBOLS
