; generated by ARM C/C++ Compiler, 4.1 [Build 713]
; commandline ArmCC [--list --split_sections --debug -c --asm --interleave -o.\Obj\usb_istr.o --asm_dir=.\List\ --list_dir=.\List\ --depend=.\Obj\usb_istr.d --cpu=Cortex-M3 --apcs=interwork -O3 -I.\usb_library\inc -IC:\Keil\ARM\CMSIS\Include -IC:\Keil\ARM\INC\ST\STM32F10x -D__MICROLIB -DVECT_TAB_FLASH --omf_browse=.\Obj\usb_istr.crf usb_istr.c]
                          THUMB

                          AREA ||i.USB_Istr||, CODE, READONLY, ALIGN=2

                  USB_Istr PROC
;;;62     *******************************************************************************/
;;;63     void USB_Istr(void)
000000  b570              PUSH     {r4-r6,lr}
;;;64     {
;;;65     
;;;66       wIstr = _GetISTR();
000002  4e29              LDR      r6,|L1.168|
000004  6830              LDR      r0,[r6,#0]
000006  4c29              LDR      r4,|L1.172|
000008  8060              STRH     r0,[r4,#2]
;;;67     
;;;68     #if (IMR_MSK & ISTR_RESET)
;;;69       if (wIstr & ISTR_RESET & wInterrupt_Mask)
00000a  8860              LDRH     r0,[r4,#2]  ; wIstr
00000c  4d28              LDR      r5,|L1.176|
00000e  8829              LDRH     r1,[r5,#0]  ; wInterrupt_Mask
000010  4008              ANDS     r0,r0,r1
000012  0540              LSLS     r0,r0,#21
000014  d505              BPL      |L1.34|
;;;70       {
;;;71         _SetISTR((u16)CLR_RESET);
000016  f64f30ff          MOV      r0,#0xfbff
00001a  6030              STR      r0,[r6,#0]
;;;72         Device_Property.Reset();
00001c  4825              LDR      r0,|L1.180|
00001e  6840              LDR      r0,[r0,#4]  ; Device_Property
000020  4780              BLX      r0
                  |L1.34|
;;;73     #ifdef RESET_CALLBACK
;;;74         RESET_Callback();
;;;75     #endif
;;;76       }
;;;77     #endif
;;;78       /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
;;;79     #if (IMR_MSK & ISTR_DOVR)
;;;80       if (wIstr & ISTR_DOVR & wInterrupt_Mask)
;;;81       {
;;;82         _SetISTR((u16)CLR_DOVR);
;;;83     #ifdef DOVR_CALLBACK
;;;84         DOVR_Callback();
;;;85     #endif
;;;86       }
;;;87     #endif
;;;88       /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
;;;89     #if (IMR_MSK & ISTR_ERR)
;;;90       if (wIstr & ISTR_ERR & wInterrupt_Mask)
000022  8861              LDRH     r1,[r4,#2]  ; wIstr
000024  8828              LDRH     r0,[r5,#0]  ; wInterrupt_Mask
000026  4001              ANDS     r1,r1,r0
000028  0489              LSLS     r1,r1,#18
00002a  d502              BPL      |L1.50|
;;;91       {
;;;92         _SetISTR((u16)CLR_ERR);
00002c  f64d71ff          MOV      r1,#0xdfff
000030  6031              STR      r1,[r6,#0]
                  |L1.50|
;;;93     #ifdef ERR_CALLBACK
;;;94         ERR_Callback();
;;;95     #endif
;;;96       }
;;;97     #endif
;;;98       /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
;;;99     #if (IMR_MSK & ISTR_WKUP)
;;;100      if (wIstr & ISTR_WKUP & wInterrupt_Mask)
000032  8861              LDRH     r1,[r4,#2]  ; wIstr
000034  4001              ANDS     r1,r1,r0
000036  04c8              LSLS     r0,r1,#19
000038  d505              BPL      |L1.70|
;;;101      {
;;;102        _SetISTR((u16)CLR_WKUP);
00003a  f64e70ff          MOV      r0,#0xefff
00003e  6030              STR      r0,[r6,#0]
;;;103        Resume(RESUME_EXTERNAL);
000040  2000              MOVS     r0,#0
000042  f7fffffe          BL       Resume
                  |L1.70|
;;;104    #ifdef WKUP_CALLBACK
;;;105        WKUP_Callback();
;;;106    #endif
;;;107      }
;;;108    #endif
;;;109      /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
;;;110    #if (IMR_MSK & ISTR_SUSP)
;;;111      if (wIstr & ISTR_SUSP & wInterrupt_Mask)
000046  8860              LDRH     r0,[r4,#2]  ; wIstr
000048  8829              LDRH     r1,[r5,#0]  ; wInterrupt_Mask
00004a  4008              ANDS     r0,r0,r1
00004c  0500              LSLS     r0,r0,#20
00004e  d50b              BPL      |L1.104|
;;;112      {
;;;113    
;;;114        /* check if SUSPEND is possible */
;;;115        if (fSuspendEnabled)
000050  4819              LDR      r0,|L1.184|
000052  7800              LDRB     r0,[r0,#0]  ; fSuspendEnabled
000054  b110              CBZ      r0,|L1.92|
;;;116        {
;;;117          Suspend();
000056  f7fffffe          BL       Suspend
00005a  e002              B        |L1.98|
                  |L1.92|
;;;118        }
;;;119        else
;;;120        {
;;;121          /* if not possible then resume after xx ms */
;;;122          Resume(RESUME_LATER);
00005c  2002              MOVS     r0,#2
00005e  f7fffffe          BL       Resume
                  |L1.98|
;;;123        }
;;;124        /* clear of the ISTR bit must be done after setting of CNTR_FSUSP */
;;;125        _SetISTR((u16)CLR_SUSP);
000062  f24f70ff          MOV      r0,#0xf7ff
000066  6030              STR      r0,[r6,#0]
                  |L1.104|
;;;126    #ifdef SUSP_CALLBACK
;;;127        SUSP_Callback();
;;;128    #endif
;;;129      }
;;;130    #endif
;;;131      /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
;;;132    #if (IMR_MSK & ISTR_SOF)
;;;133      if (wIstr & ISTR_SOF & wInterrupt_Mask)
000068  8861              LDRH     r1,[r4,#2]  ; wIstr
00006a  8828              LDRH     r0,[r5,#0]  ; wInterrupt_Mask
00006c  4001              ANDS     r1,r1,r0
00006e  0589              LSLS     r1,r1,#22
000070  d506              BPL      |L1.128|
;;;134      {
;;;135        _SetISTR((u16)CLR_SOF);
000072  f64f51ff          MOV      r1,#0xfdff
000076  6031              STR      r1,[r6,#0]
;;;136        bIntPackSOF++;
000078  7821              LDRB     r1,[r4,#0]  ; bIntPackSOF
00007a  f1010101          ADD      r1,r1,#1
00007e  7021              STRB     r1,[r4,#0]
                  |L1.128|
;;;137    
;;;138    #ifdef SOF_CALLBACK
;;;139        SOF_Callback();
;;;140    #endif
;;;141      }
;;;142    #endif
;;;143      /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
;;;144    #if (IMR_MSK & ISTR_ESOF)
;;;145      if (wIstr & ISTR_ESOF & wInterrupt_Mask)
000080  8861              LDRH     r1,[r4,#2]  ; wIstr
000082  4001              ANDS     r1,r1,r0
000084  05c8              LSLS     r0,r1,#23
000086  d505              BPL      |L1.148|
;;;146      {
;;;147        _SetISTR((u16)CLR_ESOF);
000088  f64f60ff          MOV      r0,#0xfeff
00008c  6030              STR      r0,[r6,#0]
;;;148        /* resume handling timing is made with ESOFs */
;;;149        Resume(RESUME_ESOF); /* request without change of the machine state */
00008e  2007              MOVS     r0,#7
000090  f7fffffe          BL       Resume
                  |L1.148|
;;;150    
;;;151    #ifdef ESOF_CALLBACK
;;;152        ESOF_Callback();
;;;153    #endif
;;;154      }
;;;155    #endif
;;;156      /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
;;;157    #if (IMR_MSK & ISTR_CTR)
;;;158      if (wIstr & ISTR_CTR & wInterrupt_Mask)
000094  8860              LDRH     r0,[r4,#2]  ; wIstr
000096  8829              LDRH     r1,[r5,#0]  ; wInterrupt_Mask
000098  4008              ANDS     r0,r0,r1
00009a  0400              LSLS     r0,r0,#16
00009c  d503              BPL      |L1.166|
;;;159      {
;;;160        /* servicing of the endpoint correct transfer interrupt */
;;;161        /* clear of the CTR flag into the sub */
;;;162        CTR_LP();
00009e  e8bd4070          POP      {r4-r6,lr}
0000a2  f7ffbffe          B.W      CTR_LP
                  |L1.166|
;;;163    #ifdef CTR_CALLBACK
;;;164        CTR_Callback();
;;;165    #endif
;;;166      }
;;;167    #endif
;;;168    } /* USB_Istr */
0000a6  bd70              POP      {r4-r6,pc}
;;;169    
                          ENDP

                  |L1.168|
                          DCD      0x40005c44
                  |L1.172|
                          DCD      ||.data||
                  |L1.176|
                          DCD      wInterrupt_Mask
                  |L1.180|
                          DCD      Device_Property
                  |L1.184|
                          DCD      fSuspendEnabled

                          AREA ||.data||, DATA, ALIGN=1

                  bIntPackSOF
000000  0000              DCB      0x00,0x00
                  wIstr
000002  0000              DCB      0x00,0x00

                          AREA ||area_number.5||, DATA, ALIGN=2

                          EXPORTAS ||area_number.5||, ||.data||
                  pEpInt_IN
                          DCD      NOP_Process
                          DCD      NOP_Process
                          DCD      NOP_Process
                          DCD      NOP_Process
                          DCD      NOP_Process
                          DCD      NOP_Process
                          DCD      NOP_Process

                          AREA ||area_number.6||, DATA, ALIGN=2

                          EXPORTAS ||area_number.6||, ||.data||
                  pEpInt_OUT
                          DCD      NOP_Process
                          DCD      NOP_Process
                          DCD      NOP_Process
                          DCD      NOP_Process
                          DCD      NOP_Process
                          DCD      NOP_Process
                          DCD      NOP_Process
