; generated by ARM C/C++ Compiler, 5.03 [Build 76]
; commandline ArmCC [--list --debug -c --asm --interleave -o.\obj\stm32f10x_gpio.o --asm_dir=.\ --list_dir=.\ --depend=.\obj\stm32f10x_gpio.d --cpu=Cortex-M3 --apcs=interwork -O0 -I.\FWlib\inc -I.\user -ID:\Circuits\Keil\ARM\RV31\INC -ID:\Circuits\Keil\ARM\PACK\ARM\CMSIS\3.20.3\CMSIS\Include -ID:\Circuits\Keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.2\Device\Include -ID:\Circuits\Keil\ARM\Inc\?ST\STM32F10x -D__MICROLIB -DSTM32F10X_HD -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD --omf_browse=.\obj\stm32f10x_gpio.crf FWlib\SRC\stm32f10x_gpio.c]
                          THUMB

                          AREA ||.text||, CODE, READONLY, ALIGN=2

                  GPIO_DeInit PROC
;;;99       */
;;;100    void GPIO_DeInit(GPIO_TypeDef* GPIOx)
000000  b510              PUSH     {r4,lr}
;;;101    {
000002  4604              MOV      r4,r0
;;;102      /* Check the parameters */
;;;103      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;104      
;;;105      switch (*(uint32_t*)&GPIOx)
000004  49c5              LDR      r1,|L1.796|
000006  1a60              SUBS     r0,r4,r1
000008  428c              CMP      r4,r1
00000a  d02f              BEQ      |L1.108|
00000c  dc09              BGT      |L1.34|
00000e  48c4              LDR      r0,|L1.800|
000010  1820              ADDS     r0,r4,r0
000012  d010              BEQ      |L1.54|
000014  f5b06f80          CMP      r0,#0x400
000018  d016              BEQ      |L1.72|
00001a  f5b06f00          CMP      r0,#0x800
00001e  d14a              BNE      |L1.182|
000020  e01b              B        |L1.90|
                  |L1.34|
000022  f5b06f80          CMP      r0,#0x400
000026  d02a              BEQ      |L1.126|
000028  f5b06f00          CMP      r0,#0x800
00002c  d030              BEQ      |L1.144|
00002e  f5b06f40          CMP      r0,#0xc00
000032  d140              BNE      |L1.182|
000034  e035              B        |L1.162|
                  |L1.54|
;;;106      {
;;;107        case GPIOA_BASE:
;;;108          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOA, ENABLE);
000036  2101              MOVS     r1,#1
000038  2004              MOVS     r0,#4
00003a  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;109          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOA, DISABLE);
00003e  2100              MOVS     r1,#0
000040  2004              MOVS     r0,#4
000042  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;110          break;
000046  e037              B        |L1.184|
                  |L1.72|
;;;111        case GPIOB_BASE:
;;;112          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOB, ENABLE);
000048  2101              MOVS     r1,#1
00004a  2008              MOVS     r0,#8
00004c  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;113          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOB, DISABLE);
000050  2100              MOVS     r1,#0
000052  2008              MOVS     r0,#8
000054  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;114          break;
000058  e02e              B        |L1.184|
                  |L1.90|
;;;115        case GPIOC_BASE:
;;;116          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOC, ENABLE);
00005a  2101              MOVS     r1,#1
00005c  2010              MOVS     r0,#0x10
00005e  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;117          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOC, DISABLE);
000062  2100              MOVS     r1,#0
000064  2010              MOVS     r0,#0x10
000066  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;118          break;
00006a  e025              B        |L1.184|
                  |L1.108|
;;;119        case GPIOD_BASE:
;;;120          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOD, ENABLE);
00006c  2101              MOVS     r1,#1
00006e  2020              MOVS     r0,#0x20
000070  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;121          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOD, DISABLE);
000074  2100              MOVS     r1,#0
000076  2020              MOVS     r0,#0x20
000078  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;122          break;
00007c  e01c              B        |L1.184|
                  |L1.126|
;;;123          
;;;124        case GPIOE_BASE:
;;;125          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOE, ENABLE);
00007e  2101              MOVS     r1,#1
000080  2040              MOVS     r0,#0x40
000082  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;126          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOE, DISABLE);
000086  2100              MOVS     r1,#0
000088  2040              MOVS     r0,#0x40
00008a  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;127          break; 
00008e  e013              B        |L1.184|
                  |L1.144|
;;;128        case GPIOF_BASE:
;;;129          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOF, ENABLE);
000090  2101              MOVS     r1,#1
000092  2080              MOVS     r0,#0x80
000094  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;130          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOF, DISABLE);
000098  2100              MOVS     r1,#0
00009a  2080              MOVS     r0,#0x80
00009c  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;131          break;
0000a0  e00a              B        |L1.184|
                  |L1.162|
;;;132        case GPIOG_BASE:
;;;133          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOG, ENABLE);
0000a2  2101              MOVS     r1,#1
0000a4  0208              LSLS     r0,r1,#8
0000a6  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;134          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOG, DISABLE);
0000aa  2100              MOVS     r1,#0
0000ac  f44f7080          MOV      r0,#0x100
0000b0  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;135          break;
0000b4  e000              B        |L1.184|
                  |L1.182|
;;;136        default:
;;;137          break;
0000b6  bf00              NOP      
                  |L1.184|
0000b8  bf00              NOP                            ;110
;;;138      }
;;;139    }
0000ba  bd10              POP      {r4,pc}
;;;140    
                          ENDP

                  GPIO_AFIODeInit PROC
;;;147      */
;;;148    void GPIO_AFIODeInit(void)
0000bc  b510              PUSH     {r4,lr}
;;;149    {
;;;150      RCC_APB2PeriphResetCmd(RCC_APB2Periph_AFIO, ENABLE);
0000be  2101              MOVS     r1,#1
0000c0  4608              MOV      r0,r1
0000c2  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;151      RCC_APB2PeriphResetCmd(RCC_APB2Periph_AFIO, DISABLE);
0000c6  2100              MOVS     r1,#0
0000c8  2001              MOVS     r0,#1
0000ca  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;152    }
0000ce  bd10              POP      {r4,pc}
;;;153    
                          ENDP

                  GPIO_Init PROC
;;;162      */
;;;163    void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct)
0000d0  e92d41f0          PUSH     {r4-r8,lr}
;;;164    {
0000d4  4602              MOV      r2,r0
;;;165      uint32_t currentmode = 0x00, currentpin = 0x00, pinpos = 0x00, pos = 0x00;
0000d6  2500              MOVS     r5,#0
0000d8  2600              MOVS     r6,#0
0000da  2000              MOVS     r0,#0
0000dc  2300              MOVS     r3,#0
;;;166      uint32_t tmpreg = 0x00, pinmask = 0x00;
0000de  2400              MOVS     r4,#0
0000e0  2700              MOVS     r7,#0
;;;167      /* Check the parameters */
;;;168      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;169      assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode));
;;;170      assert_param(IS_GPIO_PIN(GPIO_InitStruct->GPIO_Pin));  
;;;171      
;;;172    /*---------------------------- GPIO Mode Configuration -----------------------*/
;;;173      currentmode = ((uint32_t)GPIO_InitStruct->GPIO_Mode) & ((uint32_t)0x0F);
0000e2  f891c003          LDRB     r12,[r1,#3]
0000e6  f00c050f          AND      r5,r12,#0xf
;;;174      if ((((uint32_t)GPIO_InitStruct->GPIO_Mode) & ((uint32_t)0x10)) != 0x00) //ģʽ
0000ea  f891c003          LDRB     r12,[r1,#3]
0000ee  f01c0f10          TST      r12,#0x10
0000f2  d003              BEQ      |L1.252|
;;;175      { 
;;;176        /* Check the parameters */
;;;177        assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed));
;;;178        /* Output mode */
;;;179        currentmode |= (uint32_t)GPIO_InitStruct->GPIO_Speed;
0000f4  f891c002          LDRB     r12,[r1,#2]
0000f8  ea4c0505          ORR      r5,r12,r5
                  |L1.252|
;;;180      }
;;;181    /*---------------------------- GPIO CRL Configuration ------------------------*/  //8λ
;;;182      /* Configure the eight low port pins */
;;;183      if (((uint32_t)GPIO_InitStruct->GPIO_Pin & ((uint32_t)0x00FF)) != 0x00) //ж
0000fc  f891c000          LDRB     r12,[r1,#0]
000100  f1bc0f00          CMP      r12,#0
000104  d031              BEQ      |L1.362|
;;;184      {
;;;185        tmpreg = GPIOx->CRL;
000106  6814              LDR      r4,[r2,#0]
;;;186        for (pinpos = 0x00; pinpos < 0x08; pinpos++)
000108  2000              MOVS     r0,#0
00010a  e02b              B        |L1.356|
                  |L1.268|
;;;187        {
;;;188          pos = ((uint32_t)0x01) << pinpos;
00010c  f04f0c01          MOV      r12,#1
000110  fa0cf300          LSL      r3,r12,r0
;;;189          /* Get the port pins position */
;;;190          currentpin = (GPIO_InitStruct->GPIO_Pin) & pos;
000114  f8b1c000          LDRH     r12,[r1,#0]
000118  ea0c0603          AND      r6,r12,r3
;;;191          if (currentpin == pos)	 //жÿһ
00011c  429e              CMP      r6,r3
00011e  d120              BNE      |L1.354|
;;;192          {
;;;193            pos = pinpos << 2;
000120  0083              LSLS     r3,r0,#2
;;;194            /* Clear the corresponding low control register bits */
;;;195            pinmask = ((uint32_t)0x0F) << pos;
000122  f04f0c0f          MOV      r12,#0xf
000126  fa0cf703          LSL      r7,r12,r3
;;;196            tmpreg &= ~pinmask;
00012a  43bc              BICS     r4,r4,r7
;;;197            /* Write the mode configuration in the corresponding bits */
;;;198            tmpreg |= (currentmode << pos);
00012c  fa05fc03          LSL      r12,r5,r3
000130  ea4c0404          ORR      r4,r12,r4
;;;199            /* Reset the corresponding ODR bit */
;;;200            if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPD)   // ˿Ϊߵƽ
000134  f891c003          LDRB     r12,[r1,#3]
000138  f1bc0f28          CMP      r12,#0x28
00013c  d106              BNE      |L1.332|
;;;201            {
;;;202              GPIOx->BRR = (((uint32_t)0x01) << pinpos);
00013e  f04f0c01          MOV      r12,#1
000142  fa0cfc00          LSL      r12,r12,r0
000146  f8c2c014          STR      r12,[r2,#0x14]
00014a  e00a              B        |L1.354|
                  |L1.332|
;;;203            }
;;;204            else
;;;205            {
;;;206              /* Set the corresponding ODR bit */
;;;207              if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPU)	// ˿0
00014c  f891c003          LDRB     r12,[r1,#3]
000150  f1bc0f48          CMP      r12,#0x48
000154  d105              BNE      |L1.354|
;;;208              {
;;;209                GPIOx->BSRR = (((uint32_t)0x01) << pinpos);
000156  f04f0c01          MOV      r12,#1
00015a  fa0cfc00          LSL      r12,r12,r0
00015e  f8c2c010          STR      r12,[r2,#0x10]
                  |L1.354|
000162  1c40              ADDS     r0,r0,#1              ;186
                  |L1.356|
000164  2808              CMP      r0,#8                 ;186
000166  d3d1              BCC      |L1.268|
;;;210              }
;;;211            }
;;;212          }
;;;213        }
;;;214        GPIOx->CRL = tmpreg;
000168  6014              STR      r4,[r2,#0]
                  |L1.362|
;;;215      }
;;;216    /*---------------------------- GPIO CRH Configuration ------------------------*/
;;;217      /* Configure the eight high port pins */
;;;218      if (GPIO_InitStruct->GPIO_Pin > 0x00FF)
00016a  f8b1c000          LDRH     r12,[r1,#0]
00016e  f1bc0fff          CMP      r12,#0xff
000172  dd34              BLE      |L1.478|
;;;219      {
;;;220        tmpreg = GPIOx->CRH;
000174  6854              LDR      r4,[r2,#4]
;;;221        for (pinpos = 0x00; pinpos < 0x08; pinpos++)
000176  2000              MOVS     r0,#0
000178  e02e              B        |L1.472|
                  |L1.378|
;;;222        {
;;;223          pos = (((uint32_t)0x01) << (pinpos + 0x08));
00017a  f1000c08          ADD      r12,r0,#8
00017e  f04f0801          MOV      r8,#1
000182  fa08f30c          LSL      r3,r8,r12
;;;224          /* Get the port pins position */
;;;225          currentpin = ((GPIO_InitStruct->GPIO_Pin) & pos);
000186  f8b1c000          LDRH     r12,[r1,#0]
00018a  ea0c0603          AND      r6,r12,r3
;;;226          if (currentpin == pos)
00018e  429e              CMP      r6,r3
000190  d121              BNE      |L1.470|
;;;227          {
;;;228            pos = pinpos << 2;
000192  0083              LSLS     r3,r0,#2
;;;229            /* Clear the corresponding high control register bits */
;;;230            pinmask = ((uint32_t)0x0F) << pos;
000194  f04f0c0f          MOV      r12,#0xf
000198  fa0cf703          LSL      r7,r12,r3
;;;231            tmpreg &= ~pinmask;
00019c  43bc              BICS     r4,r4,r7
;;;232            /* Write the mode configuration in the corresponding bits */
;;;233            tmpreg |= (currentmode << pos);
00019e  fa05fc03          LSL      r12,r5,r3
0001a2  ea4c0404          ORR      r4,r12,r4
;;;234            /* Reset the corresponding ODR bit */
;;;235            if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPD)
0001a6  f891c003          LDRB     r12,[r1,#3]
0001aa  f1bc0f28          CMP      r12,#0x28
0001ae  d105              BNE      |L1.444|
;;;236            {
;;;237              GPIOx->BRR = (((uint32_t)0x01) << (pinpos + 0x08));
0001b0  f1000c08          ADD      r12,r0,#8
0001b4  fa08f80c          LSL      r8,r8,r12
0001b8  f8c28014          STR      r8,[r2,#0x14]
                  |L1.444|
;;;238            }
;;;239            /* Set the corresponding ODR bit */
;;;240            if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPU)
0001bc  f891c003          LDRB     r12,[r1,#3]
0001c0  f1bc0f48          CMP      r12,#0x48
0001c4  d107              BNE      |L1.470|
;;;241            {
;;;242              GPIOx->BSRR = (((uint32_t)0x01) << (pinpos + 0x08));
0001c6  f1000c08          ADD      r12,r0,#8
0001ca  f04f0801          MOV      r8,#1
0001ce  fa08f80c          LSL      r8,r8,r12
0001d2  f8c28010          STR      r8,[r2,#0x10]
                  |L1.470|
0001d6  1c40              ADDS     r0,r0,#1              ;221
                  |L1.472|
0001d8  2808              CMP      r0,#8                 ;221
0001da  d3ce              BCC      |L1.378|
;;;243            }
;;;244          }
;;;245        }
;;;246        GPIOx->CRH = tmpreg;
0001dc  6054              STR      r4,[r2,#4]
                  |L1.478|
;;;247      }
;;;248    }
0001de  e8bd81f0          POP      {r4-r8,pc}
;;;249    
                          ENDP

                  GPIO_StructInit PROC
;;;255      */
;;;256    void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct)
0001e2  f64f71ff          MOV      r1,#0xffff
;;;257    {
;;;258      /* Reset GPIO init structure parameters values */
;;;259      GPIO_InitStruct->GPIO_Pin  = GPIO_Pin_All;
0001e6  8001              STRH     r1,[r0,#0]
;;;260      GPIO_InitStruct->GPIO_Speed = GPIO_Speed_2MHz;
0001e8  2102              MOVS     r1,#2
0001ea  7081              STRB     r1,[r0,#2]
;;;261      GPIO_InitStruct->GPIO_Mode = GPIO_Mode_IN_FLOATING;
0001ec  2104              MOVS     r1,#4
0001ee  70c1              STRB     r1,[r0,#3]
;;;262    }
0001f0  4770              BX       lr
;;;263    
                          ENDP

                  GPIO_ReadInputDataBit PROC
;;;270      */
;;;271    uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
0001f2  4602              MOV      r2,r0
;;;272    {
;;;273      uint8_t bitstatus = 0x00;
0001f4  2000              MOVS     r0,#0
;;;274      
;;;275      /* Check the parameters */
;;;276      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;277      assert_param(IS_GET_GPIO_PIN(GPIO_Pin)); 
;;;278      
;;;279      if ((GPIOx->IDR & GPIO_Pin) != (uint32_t)Bit_RESET)
0001f6  6893              LDR      r3,[r2,#8]
0001f8  420b              TST      r3,r1
0001fa  d001              BEQ      |L1.512|
;;;280      {
;;;281        bitstatus = (uint8_t)Bit_SET;
0001fc  2001              MOVS     r0,#1
0001fe  e000              B        |L1.514|
                  |L1.512|
;;;282      }
;;;283      else
;;;284      {
;;;285        bitstatus = (uint8_t)Bit_RESET;
000200  2000              MOVS     r0,#0
                  |L1.514|
;;;286      }
;;;287      return bitstatus;
;;;288    }
000202  4770              BX       lr
;;;289    
                          ENDP

                  GPIO_ReadInputData PROC
;;;294      */
;;;295    uint16_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx)
000204  4601              MOV      r1,r0
;;;296    {
;;;297      /* Check the parameters */
;;;298      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;299      
;;;300      return ((uint16_t)GPIOx->IDR);
000206  6888              LDR      r0,[r1,#8]
000208  b280              UXTH     r0,r0
;;;301    }
00020a  4770              BX       lr
;;;302    
                          ENDP

                  GPIO_ReadOutputDataBit PROC
;;;309      */
;;;310    uint8_t GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
00020c  4602              MOV      r2,r0
;;;311    {
;;;312      uint8_t bitstatus = 0x00;
00020e  2000              MOVS     r0,#0
;;;313      /* Check the parameters */
;;;314      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;315      assert_param(IS_GET_GPIO_PIN(GPIO_Pin)); 
;;;316      
;;;317      if ((GPIOx->ODR & GPIO_Pin) != (uint32_t)Bit_RESET)
000210  68d3              LDR      r3,[r2,#0xc]
000212  420b              TST      r3,r1
000214  d001              BEQ      |L1.538|
;;;318      {
;;;319        bitstatus = (uint8_t)Bit_SET;
000216  2001              MOVS     r0,#1
000218  e000              B        |L1.540|
                  |L1.538|
;;;320      }
;;;321      else
;;;322      {
;;;323        bitstatus = (uint8_t)Bit_RESET;
00021a  2000              MOVS     r0,#0
                  |L1.540|
;;;324      }
;;;325      return bitstatus;
;;;326    }
00021c  4770              BX       lr
;;;327    
                          ENDP

                  GPIO_ReadOutputData PROC
;;;332      */
;;;333    uint16_t GPIO_ReadOutputData(GPIO_TypeDef* GPIOx)
00021e  4601              MOV      r1,r0
;;;334    {
;;;335      /* Check the parameters */
;;;336      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;337        
;;;338      return ((uint16_t)GPIOx->ODR);
000220  68c8              LDR      r0,[r1,#0xc]
000222  b280              UXTH     r0,r0
;;;339    }
000224  4770              BX       lr
;;;340    
                          ENDP

                  GPIO_SetBits PROC
;;;348      */
;;;349    void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
000226  6101              STR      r1,[r0,#0x10]
;;;350    {
;;;351      /* Check the parameters */
;;;352      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;353      assert_param(IS_GPIO_PIN(GPIO_Pin));
;;;354      
;;;355      GPIOx->BSRR = GPIO_Pin;
;;;356    }
000228  4770              BX       lr
;;;357    
                          ENDP

                  GPIO_ResetBits PROC
;;;365      */
;;;366    void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
00022a  6141              STR      r1,[r0,#0x14]
;;;367    {
;;;368      /* Check the parameters */
;;;369      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;370      assert_param(IS_GPIO_PIN(GPIO_Pin));
;;;371      
;;;372      GPIOx->BRR = GPIO_Pin;
;;;373    }
00022c  4770              BX       lr
;;;374    
                          ENDP

                  GPIO_WriteBit PROC
;;;385      */
;;;386    void GPIO_WriteBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction BitVal)
00022e  b10a              CBZ      r2,|L1.564|
;;;387    {
;;;388      /* Check the parameters */
;;;389      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;390      assert_param(IS_GET_GPIO_PIN(GPIO_Pin));
;;;391      assert_param(IS_GPIO_BIT_ACTION(BitVal)); 
;;;392      
;;;393      if (BitVal != Bit_RESET)
;;;394      {
;;;395        GPIOx->BSRR = GPIO_Pin;
000230  6101              STR      r1,[r0,#0x10]
000232  e000              B        |L1.566|
                  |L1.564|
;;;396      }
;;;397      else
;;;398      {
;;;399        GPIOx->BRR = GPIO_Pin;
000234  6141              STR      r1,[r0,#0x14]
                  |L1.566|
;;;400      }
;;;401    }
000236  4770              BX       lr
;;;402    
                          ENDP

                  GPIO_Write PROC
;;;409      */
;;;410    void GPIO_Write(GPIO_TypeDef* GPIOx, uint16_t PortVal)
000238  60c1              STR      r1,[r0,#0xc]
;;;411    {
;;;412      /* Check the parameters */
;;;413      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;414      
;;;415      GPIOx->ODR = PortVal;
;;;416    }
00023a  4770              BX       lr
;;;417    
                          ENDP

                  GPIO_PinLockConfig PROC
;;;425      */
;;;426    void GPIO_PinLockConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
00023c  f44f3280          MOV      r2,#0x10000
;;;427    {
;;;428      uint32_t tmp = 0x00010000;
;;;429      
;;;430      /* Check the parameters */
;;;431      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;432      assert_param(IS_GPIO_PIN(GPIO_Pin));
;;;433      
;;;434      tmp |= GPIO_Pin;
000240  430a              ORRS     r2,r2,r1
;;;435      /* Set LCKK bit */
;;;436      GPIOx->LCKR = tmp;
000242  6182              STR      r2,[r0,#0x18]
;;;437      /* Reset LCKK bit */
;;;438      GPIOx->LCKR =  GPIO_Pin;
000244  6181              STR      r1,[r0,#0x18]
;;;439      /* Set LCKK bit */
;;;440      GPIOx->LCKR = tmp;
000246  6182              STR      r2,[r0,#0x18]
;;;441      /* Read LCKK bit*/
;;;442      tmp = GPIOx->LCKR;
000248  6982              LDR      r2,[r0,#0x18]
;;;443      /* Read LCKK bit*/
;;;444      tmp = GPIOx->LCKR;
00024a  6982              LDR      r2,[r0,#0x18]
;;;445    }
00024c  4770              BX       lr
;;;446    
                          ENDP

                  GPIO_EventOutputConfig PROC
;;;456      */
;;;457    void GPIO_EventOutputConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource)
00024e  4602              MOV      r2,r0
;;;458    {
;;;459      uint32_t tmpreg = 0x00;
000250  2000              MOVS     r0,#0
;;;460      /* Check the parameters */
;;;461      assert_param(IS_GPIO_EVENTOUT_PORT_SOURCE(GPIO_PortSource));
;;;462      assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource));
;;;463        
;;;464      tmpreg = AFIO->EVCR;
000252  4b34              LDR      r3,|L1.804|
000254  6818              LDR      r0,[r3,#0]
;;;465      /* Clear the PORT[6:4] and PIN[3:0] bits */
;;;466      tmpreg &= EVCR_PORTPINCONFIG_MASK;
000256  f64f7380          MOV      r3,#0xff80
00025a  4018              ANDS     r0,r0,r3
;;;467      tmpreg |= (uint32_t)GPIO_PortSource << 0x04;
00025c  ea401002          ORR      r0,r0,r2,LSL #4
;;;468      tmpreg |= GPIO_PinSource;
000260  4308              ORRS     r0,r0,r1
;;;469      AFIO->EVCR = tmpreg;
000262  4b30              LDR      r3,|L1.804|
000264  6018              STR      r0,[r3,#0]
;;;470    }
000266  4770              BX       lr
;;;471    
                          ENDP

                  GPIO_EventOutputCmd PROC
;;;477      */
;;;478    void GPIO_EventOutputCmd(FunctionalState NewState)
000268  492f              LDR      r1,|L1.808|
;;;479    {
;;;480      /* Check the parameters */
;;;481      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;482      
;;;483      *(__IO uint32_t *) EVCR_EVOE_BB = (uint32_t)NewState;
00026a  61c8              STR      r0,[r1,#0x1c]
;;;484    }
00026c  4770              BX       lr
;;;485    
                          ENDP

                  GPIO_PinRemapConfig PROC
;;;518      */
;;;519    void GPIO_PinRemapConfig(uint32_t GPIO_Remap, FunctionalState NewState)
00026e  b5f0              PUSH     {r4-r7,lr}
;;;520    {
000270  460a              MOV      r2,r1
;;;521      uint32_t tmp = 0x00, tmp1 = 0x00, tmpreg = 0x00, tmpmask = 0x00;
000272  2300              MOVS     r3,#0
000274  2400              MOVS     r4,#0
000276  2100              MOVS     r1,#0
000278  2500              MOVS     r5,#0
;;;522      /* Check the parameters */
;;;523      assert_param(IS_GPIO_REMAP(GPIO_Remap));
;;;524      assert_param(IS_FUNCTIONAL_STATE(NewState));  
;;;525      
;;;526      tmpreg = AFIO->MAPR;
00027a  4e2a              LDR      r6,|L1.804|
00027c  6871              LDR      r1,[r6,#4]
;;;527      tmpmask = (GPIO_Remap & DBGAFR_POSITION_MASK) >> 0x10;
00027e  f3c04503          UBFX     r5,r0,#16,#4
;;;528      tmp = GPIO_Remap & LSB_MASK;
000282  b283              UXTH     r3,r0
;;;529      if ((GPIO_Remap & (DBGAFR_LOCATION_MASK | DBGAFR_NUMBITS_MASK)) == (DBGAFR_LOCATION_MASK | DBGAFR_NUMBITS_MASK))
000284  f4001640          AND      r6,r0,#0x300000
000288  f5b61f40          CMP      r6,#0x300000
00028c  d108              BNE      |L1.672|
;;;530      {
;;;531        tmpreg &= DBGAFR_SWJCFG_MASK;
00028e  f0216170          BIC      r1,r1,#0xf000000
;;;532        AFIO->MAPR &= DBGAFR_SWJCFG_MASK;
000292  4e24              LDR      r6,|L1.804|
000294  6876              LDR      r6,[r6,#4]
000296  f0266670          BIC      r6,r6,#0xf000000
00029a  4f22              LDR      r7,|L1.804|
00029c  607e              STR      r6,[r7,#4]
00029e  e012              B        |L1.710|
                  |L1.672|
;;;533      }
;;;534      else if ((GPIO_Remap & DBGAFR_NUMBITS_MASK) == DBGAFR_NUMBITS_MASK)
0002a0  f4001680          AND      r6,r0,#0x100000
0002a4  f5b61f80          CMP      r6,#0x100000
0002a8  d106              BNE      |L1.696|
;;;535      {
;;;536        tmp1 = ((uint32_t)0x03) << tmpmask;
0002aa  2603              MOVS     r6,#3
0002ac  fa06f405          LSL      r4,r6,r5
;;;537        tmpreg &= ~tmp1;
0002b0  43a1              BICS     r1,r1,r4
;;;538        tmpreg |= ~DBGAFR_SWJCFG_MASK;
0002b2  f0416170          ORR      r1,r1,#0xf000000
0002b6  e006              B        |L1.710|
                  |L1.696|
;;;539      }
;;;540      else
;;;541      {
;;;542        tmpreg &= ~(tmp << ((GPIO_Remap >> 0x15)*0x10));
0002b8  0d46              LSRS     r6,r0,#21
0002ba  0136              LSLS     r6,r6,#4
0002bc  fa03f606          LSL      r6,r3,r6
0002c0  43b1              BICS     r1,r1,r6
;;;543        tmpreg |= ~DBGAFR_SWJCFG_MASK;
0002c2  f0416170          ORR      r1,r1,#0xf000000
                  |L1.710|
;;;544      }
;;;545      if (NewState != DISABLE)
0002c6  b122              CBZ      r2,|L1.722|
;;;546      {
;;;547        tmpreg |= (tmp << ((GPIO_Remap >> 0x15)*0x10));
0002c8  0d46              LSRS     r6,r0,#21
0002ca  0136              LSLS     r6,r6,#4
0002cc  fa03f606          LSL      r6,r3,r6
0002d0  4331              ORRS     r1,r1,r6
                  |L1.722|
;;;548      }
;;;549      AFIO->MAPR = tmpreg;
0002d2  4e14              LDR      r6,|L1.804|
0002d4  6071              STR      r1,[r6,#4]
;;;550    }
0002d6  bdf0              POP      {r4-r7,pc}
;;;551    
                          ENDP

                  GPIO_EXTILineConfig PROC
;;;561      */
;;;562    void GPIO_EXTILineConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource)
0002d8  b530              PUSH     {r4,r5,lr}
;;;563    {
;;;564      uint32_t tmp = 0x00;
0002da  2200              MOVS     r2,#0
;;;565      /* Check the parameters */
;;;566      assert_param(IS_GPIO_EXTI_PORT_SOURCE(GPIO_PortSource));
;;;567      assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource));
;;;568      
;;;569      tmp = ((uint32_t)0x0F) << (0x04 * (GPIO_PinSource & (uint8_t)0x03));
0002dc  078b              LSLS     r3,r1,#30
0002de  0f1c              LSRS     r4,r3,#28
0002e0  230f              MOVS     r3,#0xf
0002e2  fa03f204          LSL      r2,r3,r4
;;;570      AFIO->EXTICR[GPIO_PinSource >> 0x02] &= ~tmp;
0002e6  4b0f              LDR      r3,|L1.804|
0002e8  3308              ADDS     r3,r3,#8
0002ea  108c              ASRS     r4,r1,#2
0002ec  f8533024          LDR      r3,[r3,r4,LSL #2]
0002f0  4393              BICS     r3,r3,r2
0002f2  4c0c              LDR      r4,|L1.804|
0002f4  3408              ADDS     r4,r4,#8
0002f6  108d              ASRS     r5,r1,#2
0002f8  f8443025          STR      r3,[r4,r5,LSL #2]
;;;571      AFIO->EXTICR[GPIO_PinSource >> 0x02] |= (((uint32_t)GPIO_PortSource) << (0x04 * (GPIO_PinSource & (uint8_t)0x03)));
0002fc  4623              MOV      r3,r4
0002fe  108c              ASRS     r4,r1,#2
000300  f8533024          LDR      r3,[r3,r4,LSL #2]
000304  078c              LSLS     r4,r1,#30
000306  0f24              LSRS     r4,r4,#28
000308  fa00f404          LSL      r4,r0,r4
00030c  4323              ORRS     r3,r3,r4
00030e  4c05              LDR      r4,|L1.804|
000310  3408              ADDS     r4,r4,#8
000312  108d              ASRS     r5,r1,#2
000314  f8443025          STR      r3,[r4,r5,LSL #2]
;;;572    }
000318  bd30              POP      {r4,r5,pc}
;;;573    
                          ENDP

00031a  0000              DCW      0x0000
                  |L1.796|
                          DCD      0x40011400
                  |L1.800|
                          DCD      0xbffef800
                  |L1.804|
                          DCD      0x40010000
                  |L1.808|
                          DCD      0x42200000
