user_rfid.txt 6.71 KB
; generated by Component: ARM Compiler 5.06 update 6 (build 750) Tool: ArmCC [4d3637]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o.\flash\obj\user_rfid.o --asm_dir=.\Flash\List\ --list_dir=.\Flash\List\ --depend=.\flash\obj\user_rfid.d --cpu=Cortex-M4.fp --apcs=interwork -O1 --diag_suppress=9931,870 -I..\..\Libraries\CMSIS\Include -I..\..\Libraries\CMSIS\Device\ST\STM32F4xx\Include -I..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc -I..\..\uCOS-III\uC-CPU -I..\..\uCOS-III\uC-LIB -I..\..\uCOS-III\uCOS-III\Ports -I..\..\uCOS-III\uCOS-III\Source -I..\..\uCOS-III\uC-CPU\ARM-Cortex-M4\RealView -I..\..\uCOS-III\uC-LIB\Ports\ARM-Cortex-M4\RealView -I..\..\uCOS-III\uCOS-III\Ports\ARM-Cortex-M4\Generic\RealView -I..\..\User -I..\..\User\bsp -I..\..\User\bsp\inc -I..\..\User\libapp -I..\..\RL-ARM\Config -I..\..\RL-ARM\Driver -I..\..\RL-ARM\RL-RTX\inc -I..\..\User\bsp\BSP -I..\..\RL-ARM\RL-CAN -I..\..\Libraries\DSP_LIB\Include -I..\..\MODBUS\modbus\rtu -I..\..\MODBUS\BARE\port -I..\..\MODBUS\modbus\include -I..\..\User\bsp\BSP -I..\..\PLC -I..\..\Avoid -I..\..\User\parameter -I..\..\User\LaserMotionCtr -I..\..\User\W5100S -I..\..\User\bsp -I..\..\User\CHASSIS -I..\..\User\CONTROLFUNCTION -I..\..\User\DATAUPDATE -I..\..\User\HARAWARE -I..\..\User\MOTORDRIVER -I..\..\User\NAVAGATION -I..\..\User\PLATFORM -I..\..\User\SENSOR -I.\RTE\_Flash -IC:\Users\YDJ\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Users\YDJ\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\2.13.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include -D__UVISION_VERSION=527 -D_RTE_ -DSTM32F407xx -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -D__RTX -D__FPU_USED=1 --omf_browse=.\flash\obj\user_rfid.crf ..\..\User\bsp\user_RFID.c]
                          THUMB

                          AREA ||i.GetBitFromByte||, CODE, READONLY, ALIGN=1

                  GetBitFromByte PROC
;;;17     
;;;18     unsigned long GetBitFromByte(unsigned char bit_len,unsigned char byte_buf[],unsigned short *byte_offset,unsigned short *bit_offset)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;19     {
;;;20         unsigned short byteOffset,bitOffset;
;;;21         unsigned long  data,tempdata;
;;;22     
;;;23         byteOffset = *byte_offset;
000004  8815              LDRH     r5,[r2,#0]
;;;24         bitOffset  = *bit_offset;
000006  881c              LDRH     r4,[r3,#0]
;;;25         
;;;26         data = 0;
000008  2600              MOVS     r6,#0
;;;27     
;;;28         if((bit_len > 32) || (bitOffset == 0) || (bitOffset > 8))
00000a  2820              CMP      r0,#0x20
00000c  d802              BHI      |L1.20|
00000e  b10c              CBZ      r4,|L1.20|
000010  2c08              CMP      r4,#8
000012  d902              BLS      |L1.26|
                  |L1.20|
;;;29             return 0;
000014  2000              MOVS     r0,#0
                  |L1.22|
;;;30         
;;;31         while(bit_len > 0)
;;;32         {
;;;33             if(bit_len <= bitOffset)
;;;34             {
;;;35                 tempdata  = (byte_buf[byteOffset] >> (bitOffset - bit_len));
;;;36                 tempdata &= ((0x01 << bit_len) - 1);
;;;37                 bitOffset -= bit_len;
;;;38                 data += tempdata;
;;;39                 bit_len = 0;
;;;40             }
;;;41             else
;;;42             {
;;;43                 tempdata = byte_buf[byteOffset] & ((0x01 << bitOffset) - 1);
;;;44                 tempdata <<= (bit_len - bitOffset);
;;;45                 bit_len -= bitOffset;
;;;46                 byteOffset++;
;;;47                 bitOffset = 8;
;;;48                 data += tempdata;
;;;49             }
;;;50         }
;;;51     
;;;52         if(bitOffset == 0)
;;;53         {
;;;54             byteOffset++;
;;;55             bitOffset = 8;
;;;56         }
;;;57         *byte_offset = byteOffset;
;;;58         *bit_offset  = bitOffset;
;;;59         return data;
;;;60     }
000016  e8bd81f0          POP      {r4-r8,pc}
                  |L1.26|
00001a  f04f0801          MOV      r8,#1                 ;36
00001e  e01c              B        |L1.90|
                  |L1.32|
000020  42a0              CMP      r0,r4                 ;33
000022  d80c              BHI      |L1.62|
000024  5d4f              LDRB     r7,[r1,r5]            ;35
000026  1a24              SUBS     r4,r4,r0              ;35
000028  40e7              LSRS     r7,r7,r4              ;35
00002a  fa08fc00          LSL      r12,r8,r0             ;36
00002e  f1ac0c01          SUB      r12,r12,#1            ;36
000032  ea0c0c07          AND      r12,r12,r7            ;36
000036  b2a4              UXTH     r4,r4                 ;37
000038  4466              ADD      r6,r6,r12             ;38
00003a  2000              MOVS     r0,#0                 ;39
00003c  e00d              B        |L1.90|
                  |L1.62|
00003e  5d4f              LDRB     r7,[r1,r5]            ;43
000040  fa08fc04          LSL      r12,r8,r4             ;43
000044  f1ac0c01          SUB      r12,r12,#1            ;43
000048  ea07070c          AND      r7,r7,r12             ;43
00004c  1b00              SUBS     r0,r0,r4              ;44
00004e  4087              LSLS     r7,r7,r0              ;44
000050  b2c0              UXTB     r0,r0                 ;45
000052  1c6d              ADDS     r5,r5,#1              ;46
000054  b2ad              UXTH     r5,r5                 ;46
000056  2408              MOVS     r4,#8                 ;47
000058  443e              ADD      r6,r6,r7              ;48
                  |L1.90|
00005a  2800              CMP      r0,#0                 ;31
00005c  d1e0              BNE      |L1.32|
00005e  b914              CBNZ     r4,|L1.102|
000060  1c6d              ADDS     r5,r5,#1              ;54
000062  b2ad              UXTH     r5,r5                 ;54
000064  2408              MOVS     r4,#8                 ;55
                  |L1.102|
000066  8015              STRH     r5,[r2,#0]            ;57
000068  801c              STRH     r4,[r3,#0]            ;58
00006a  4630              MOV      r0,r6                 ;59
00006c  e7d3              B        |L1.22|
                          ENDP


;*** Start embedded assembler ***

#line 1 "..\\..\\User\\bsp\\user_RFID.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___11_user_RFID_c_df75042a____REV16|
#line 129 "..\\..\\Libraries\\CMSIS\\Include\\core_cmInstr.h"
|__asm___11_user_RFID_c_df75042a____REV16| PROC
#line 130

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___11_user_RFID_c_df75042a____REVSH|
#line 144
|__asm___11_user_RFID_c_df75042a____REVSH| PROC
#line 145

 revsh r0, r0
 bx lr
	ENDP
	AREA ||.rrx_text||, CODE
	THUMB
	EXPORT |__asm___11_user_RFID_c_df75042a____RRX|
#line 300
|__asm___11_user_RFID_c_df75042a____RRX| PROC
#line 301

 rrx r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***