; generated by ARM C/C++ Compiler, RVCT4.0 [Build 728]
; commandline ArmCC [--debug -c --asm --interleave -o..\OBJ\stm32f10x_gpio.o --depend=..\OBJ\stm32f10x_gpio.d --cpu=Cortex-M3 --apcs=interwork -O0 -I..\..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\..\Libraries\CMSIS\CM3\CoreSupport -I..\..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x -I..\..\USER\INC -IC:\Keil\ARM\INC -IC:\Keil\ARM\INC\ST\STM32F10x -D__MICROLIB -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD --omf_browse=..\OBJ\stm32f10x_gpio.crf ..\..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c]
                          THUMB

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

                  GPIO_DeInit PROC
;;;107      */
;;;108    void GPIO_DeInit(GPIO_TypeDef* GPIOx)
000000  b510              PUSH     {r4,lr}
;;;109    {
000002  4604              MOV      r4,r0
;;;110      /* Check the parameters */
;;;111      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;112      
;;;113      if (GPIOx == GPIOA)
000004  48c7              LDR      r0,|L1.804|
000006  4284              CMP      r4,r0
000008  d108              BNE      |L1.28|
;;;114      {
;;;115        RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOA, ENABLE);
00000a  2101              MOVS     r1,#1
00000c  2004              MOVS     r0,#4
00000e  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;116        RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOA, DISABLE);
000012  2100              MOVS     r1,#0
000014  2004              MOVS     r0,#4
000016  f7fffffe          BL       RCC_APB2PeriphResetCmd
00001a  e046              B        |L1.170|
                  |L1.28|
;;;117      }
;;;118      else if (GPIOx == GPIOB)
00001c  48c2              LDR      r0,|L1.808|
00001e  4284              CMP      r4,r0
000020  d108              BNE      |L1.52|
;;;119      {
;;;120        RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOB, ENABLE);
000022  2101              MOVS     r1,#1
000024  2008              MOVS     r0,#8
000026  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;121        RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOB, DISABLE);
00002a  2100              MOVS     r1,#0
00002c  2008              MOVS     r0,#8
00002e  f7fffffe          BL       RCC_APB2PeriphResetCmd
000032  e03a              B        |L1.170|
                  |L1.52|
;;;122      }
;;;123      else if (GPIOx == GPIOC)
000034  48bd              LDR      r0,|L1.812|
000036  4284              CMP      r4,r0
000038  d108              BNE      |L1.76|
;;;124      {
;;;125        RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOC, ENABLE);
00003a  2101              MOVS     r1,#1
00003c  2010              MOVS     r0,#0x10
00003e  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;126        RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOC, DISABLE);
000042  2100              MOVS     r1,#0
000044  2010              MOVS     r0,#0x10
000046  f7fffffe          BL       RCC_APB2PeriphResetCmd
00004a  e02e              B        |L1.170|
                  |L1.76|
;;;127      }
;;;128      else if (GPIOx == GPIOD)
00004c  48b8              LDR      r0,|L1.816|
00004e  4284              CMP      r4,r0
000050  d108              BNE      |L1.100|
;;;129      {
;;;130        RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOD, ENABLE);
000052  2101              MOVS     r1,#1
000054  2020              MOVS     r0,#0x20
000056  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;131        RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOD, DISABLE);
00005a  2100              MOVS     r1,#0
00005c  2020              MOVS     r0,#0x20
00005e  f7fffffe          BL       RCC_APB2PeriphResetCmd
000062  e022              B        |L1.170|
                  |L1.100|
;;;132      }    
;;;133      else if (GPIOx == GPIOE)
000064  48b3              LDR      r0,|L1.820|
000066  4284              CMP      r4,r0
000068  d108              BNE      |L1.124|
;;;134      {
;;;135        RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOE, ENABLE);
00006a  2101              MOVS     r1,#1
00006c  2040              MOVS     r0,#0x40
00006e  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;136        RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOE, DISABLE);
000072  2100              MOVS     r1,#0
000074  2040              MOVS     r0,#0x40
000076  f7fffffe          BL       RCC_APB2PeriphResetCmd
00007a  e016              B        |L1.170|
                  |L1.124|
;;;137      } 
;;;138      else if (GPIOx == GPIOF)
00007c  48ae              LDR      r0,|L1.824|
00007e  4284              CMP      r4,r0
000080  d108              BNE      |L1.148|
;;;139      {
;;;140        RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOF, ENABLE);
000082  2101              MOVS     r1,#1
000084  2080              MOVS     r0,#0x80
000086  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;141        RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOF, DISABLE);
00008a  2100              MOVS     r1,#0
00008c  2080              MOVS     r0,#0x80
00008e  f7fffffe          BL       RCC_APB2PeriphResetCmd
000092  e00a              B        |L1.170|
                  |L1.148|
;;;142      }
;;;143      else
;;;144      {
;;;145        if (GPIOx == GPIOG)
000094  48a9              LDR      r0,|L1.828|
000096  4284              CMP      r4,r0
000098  d107              BNE      |L1.170|
;;;146        {
;;;147          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOG, ENABLE);
00009a  2101              MOVS     r1,#1
00009c  1580              ASRS     r0,r0,#22
00009e  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;148          RCC_APB2PeriphResetCmd(RCC_APB2Periph_GPIOG, DISABLE);
0000a2  2100              MOVS     r1,#0
0000a4  15a0              ASRS     r0,r4,#22
0000a6  f7fffffe          BL       RCC_APB2PeriphResetCmd
                  |L1.170|
;;;149        }
;;;150      }
;;;151    }
0000aa  bd10              POP      {r4,pc}
;;;152    
                          ENDP

                  GPIO_AFIODeInit PROC
;;;158      */
;;;159    void GPIO_AFIODeInit(void)
0000ac  b510              PUSH     {r4,lr}
;;;160    {
;;;161      RCC_APB2PeriphResetCmd(RCC_APB2Periph_AFIO, ENABLE);
0000ae  2101              MOVS     r1,#1
0000b0  4608              MOV      r0,r1
0000b2  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;162      RCC_APB2PeriphResetCmd(RCC_APB2Periph_AFIO, DISABLE);
0000b6  2100              MOVS     r1,#0
0000b8  2001              MOVS     r0,#1
0000ba  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;163    }
0000be  bd10              POP      {r4,pc}
;;;164    
                          ENDP

                  GPIO_Init PROC
;;;172      */
;;;173    void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct)
0000c0  e92d41f0          PUSH     {r4-r8,lr}
;;;174    {
;;;175      uint32_t currentmode = 0x00, currentpin = 0x00, pinpos = 0x00, pos = 0x00;
0000c4  2200              MOVS     r2,#0
0000c6  2300              MOVS     r3,#0
0000c8  2400              MOVS     r4,#0
0000ca  2500              MOVS     r5,#0
;;;176      uint32_t tmpreg = 0x00, pinmask = 0x00;
0000cc  2600              MOVS     r6,#0
0000ce  2700              MOVS     r7,#0
;;;177      /* Check the parameters */
;;;178      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;179      assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode));
;;;180      assert_param(IS_GPIO_PIN(GPIO_InitStruct->GPIO_Pin));  
;;;181      
;;;182    /*---------------------------- GPIO Mode Configuration -----------------------*/
;;;183      currentmode = ((uint32_t)GPIO_InitStruct->GPIO_Mode) & ((uint32_t)0x0F);
0000d0  f891c003          LDRB     r12,[r1,#3]
0000d4  f00c020f          AND      r2,r12,#0xf
;;;184      if ((((uint32_t)GPIO_InitStruct->GPIO_Mode) & ((uint32_t)0x10)) != 0x00)
0000d8  f891c003          LDRB     r12,[r1,#3]
0000dc  f01c0f10          TST      r12,#0x10
0000e0  d003              BEQ      |L1.234|
;;;185      { 
;;;186        /* Check the parameters */
;;;187        assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed));
;;;188        /* Output mode */
;;;189        currentmode |= (uint32_t)GPIO_InitStruct->GPIO_Speed;
0000e2  f891c002          LDRB     r12,[r1,#2]
0000e6  ea4c0202          ORR      r2,r12,r2
                  |L1.234|
;;;190      }
;;;191    /*---------------------------- GPIO CRL Configuration ------------------------*/
;;;192      /* Configure the eight low port pins */
;;;193      if (((uint32_t)GPIO_InitStruct->GPIO_Pin & ((uint32_t)0x00FF)) != 0x00)
0000ea  f8b1c000          LDRH     r12,[r1,#0]
0000ee  f01c0fff          TST      r12,#0xff
0000f2  d031              BEQ      |L1.344|
;;;194      {
;;;195        tmpreg = GPIOx->CRL;
0000f4  6806              LDR      r6,[r0,#0]
;;;196        for (pinpos = 0x00; pinpos < 0x08; pinpos++)
0000f6  2400              MOVS     r4,#0
0000f8  e02b              B        |L1.338|
                  |L1.250|
;;;197        {
;;;198          pos = ((uint32_t)0x01) << pinpos;
0000fa  f04f0c01          MOV      r12,#1
0000fe  fa0cf504          LSL      r5,r12,r4
;;;199          /* Get the port pins position */
;;;200          currentpin = (GPIO_InitStruct->GPIO_Pin) & pos;
000102  f8b1c000          LDRH     r12,[r1,#0]
000106  ea0c0305          AND      r3,r12,r5
;;;201          if (currentpin == pos)
00010a  42ab              CMP      r3,r5
00010c  d120              BNE      |L1.336|
;;;202          {
;;;203            pos = pinpos << 2;
00010e  00a5              LSLS     r5,r4,#2
;;;204            /* Clear the corresponding low control register bits */
;;;205            pinmask = ((uint32_t)0x0F) << pos;
000110  f04f0c0f          MOV      r12,#0xf
000114  fa0cf705          LSL      r7,r12,r5
;;;206            tmpreg &= ~pinmask;
000118  43be              BICS     r6,r6,r7
;;;207            /* Write the mode configuration in the corresponding bits */
;;;208            tmpreg |= (currentmode << pos);
00011a  fa02fc05          LSL      r12,r2,r5
00011e  ea4c0606          ORR      r6,r12,r6
;;;209            /* Reset the corresponding ODR bit */
;;;210            if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPD)
000122  f891c003          LDRB     r12,[r1,#3]
000126  f1bc0f28          CMP      r12,#0x28
00012a  d106              BNE      |L1.314|
;;;211            {
;;;212              GPIOx->BRR = (((uint32_t)0x01) << pinpos);
00012c  f04f0c01          MOV      r12,#1
000130  fa0cfc04          LSL      r12,r12,r4
000134  f8c0c014          STR      r12,[r0,#0x14]
000138  e00a              B        |L1.336|
                  |L1.314|
;;;213            }
;;;214            else
;;;215            {
;;;216              /* Set the corresponding ODR bit */
;;;217              if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPU)
00013a  f891c003          LDRB     r12,[r1,#3]
00013e  f1bc0f48          CMP      r12,#0x48
000142  d105              BNE      |L1.336|
;;;218              {
;;;219                GPIOx->BSRR = (((uint32_t)0x01) << pinpos);
000144  f04f0c01          MOV      r12,#1
000148  fa0cfc04          LSL      r12,r12,r4
00014c  f8c0c010          STR      r12,[r0,#0x10]
                  |L1.336|
000150  1c64              ADDS     r4,r4,#1              ;196
                  |L1.338|
000152  2c08              CMP      r4,#8                 ;196
000154  d3d1              BCC      |L1.250|
;;;220              }
;;;221            }
;;;222          }
;;;223        }
;;;224        GPIOx->CRL = tmpreg;
000156  6006              STR      r6,[r0,#0]
                  |L1.344|
;;;225      }
;;;226    /*---------------------------- GPIO CRH Configuration ------------------------*/
;;;227      /* Configure the eight high port pins */
;;;228      if (GPIO_InitStruct->GPIO_Pin > 0x00FF)
000158  f8b1c000          LDRH     r12,[r1,#0]
00015c  f1bc0fff          CMP      r12,#0xff
000160  dd34              BLE      |L1.460|
;;;229      {
;;;230        tmpreg = GPIOx->CRH;
000162  6846              LDR      r6,[r0,#4]
;;;231        for (pinpos = 0x00; pinpos < 0x08; pinpos++)
000164  2400              MOVS     r4,#0
000166  e02e              B        |L1.454|
                  |L1.360|
;;;232        {
;;;233          pos = (((uint32_t)0x01) << (pinpos + 0x08));
000168  f1040c08          ADD      r12,r4,#8
00016c  f04f0801          MOV      r8,#1
000170  fa08f50c          LSL      r5,r8,r12
;;;234          /* Get the port pins position */
;;;235          currentpin = ((GPIO_InitStruct->GPIO_Pin) & pos);
000174  f8b1c000          LDRH     r12,[r1,#0]
000178  ea0c0305          AND      r3,r12,r5
;;;236          if (currentpin == pos)
00017c  42ab              CMP      r3,r5
00017e  d121              BNE      |L1.452|
;;;237          {
;;;238            pos = pinpos << 2;
000180  00a5              LSLS     r5,r4,#2
;;;239            /* Clear the corresponding high control register bits */
;;;240            pinmask = ((uint32_t)0x0F) << pos;
000182  f04f0c0f          MOV      r12,#0xf
000186  fa0cf705          LSL      r7,r12,r5
;;;241            tmpreg &= ~pinmask;
00018a  43be              BICS     r6,r6,r7
;;;242            /* Write the mode configuration in the corresponding bits */
;;;243            tmpreg |= (currentmode << pos);
00018c  fa02fc05          LSL      r12,r2,r5
000190  ea4c0606          ORR      r6,r12,r6
;;;244            /* Reset the corresponding ODR bit */
;;;245            if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPD)
000194  f891c003          LDRB     r12,[r1,#3]
000198  f1bc0f28          CMP      r12,#0x28
00019c  d105              BNE      |L1.426|
;;;246            {
;;;247              GPIOx->BRR = (((uint32_t)0x01) << (pinpos + 0x08));
00019e  f1040c08          ADD      r12,r4,#8
0001a2  fa08f80c          LSL      r8,r8,r12
0001a6  f8c08014          STR      r8,[r0,#0x14]
                  |L1.426|
;;;248            }
;;;249            /* Set the corresponding ODR bit */
;;;250            if (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IPU)
0001aa  f891c003          LDRB     r12,[r1,#3]
0001ae  f1bc0f48          CMP      r12,#0x48
0001b2  d107              BNE      |L1.452|
;;;251            {
;;;252              GPIOx->BSRR = (((uint32_t)0x01) << (pinpos + 0x08));
0001b4  f1040c08          ADD      r12,r4,#8
0001b8  f04f0801          MOV      r8,#1
0001bc  fa08f80c          LSL      r8,r8,r12
0001c0  f8c08010          STR      r8,[r0,#0x10]
                  |L1.452|
0001c4  1c64              ADDS     r4,r4,#1              ;231
                  |L1.454|
0001c6  2c08              CMP      r4,#8                 ;231
0001c8  d3ce              BCC      |L1.360|
;;;253            }
;;;254          }
;;;255        }
;;;256        GPIOx->CRH = tmpreg;
0001ca  6046              STR      r6,[r0,#4]
                  |L1.460|
;;;257      }
;;;258    }
0001cc  e8bd81f0          POP      {r4-r8,pc}
;;;259    
                          ENDP

                  GPIO_StructInit PROC
;;;265      */
;;;266    void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct)
0001d0  f64f71ff          MOV      r1,#0xffff
;;;267    {
;;;268      /* Reset GPIO init structure parameters values */
;;;269      GPIO_InitStruct->GPIO_Pin  = GPIO_Pin_All;
0001d4  8001              STRH     r1,[r0,#0]
;;;270      GPIO_InitStruct->GPIO_Speed = GPIO_Speed_2MHz;
0001d6  2102              MOVS     r1,#2
0001d8  7081              STRB     r1,[r0,#2]
;;;271      GPIO_InitStruct->GPIO_Mode = GPIO_Mode_IN_FLOATING;
0001da  2104              MOVS     r1,#4
0001dc  70c1              STRB     r1,[r0,#3]
;;;272    }
0001de  4770              BX       lr
;;;273    
                          ENDP

                  GPIO_ReadInputDataBit PROC
;;;280      */
;;;281    uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
0001e0  4602              MOV      r2,r0
;;;282    {
;;;283      uint8_t bitstatus = 0x00;
0001e2  2000              MOVS     r0,#0
;;;284      
;;;285      /* Check the parameters */
;;;286      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;287      assert_param(IS_GET_GPIO_PIN(GPIO_Pin)); 
;;;288      
;;;289      if ((GPIOx->IDR & GPIO_Pin) != (uint32_t)Bit_RESET)
0001e4  6893              LDR      r3,[r2,#8]
0001e6  420b              TST      r3,r1
0001e8  d001              BEQ      |L1.494|
;;;290      {
;;;291        bitstatus = (uint8_t)Bit_SET;
0001ea  2001              MOVS     r0,#1
0001ec  e000              B        |L1.496|
                  |L1.494|
;;;292      }
;;;293      else
;;;294      {
;;;295        bitstatus = (uint8_t)Bit_RESET;
0001ee  2000              MOVS     r0,#0
                  |L1.496|
;;;296      }
;;;297      return bitstatus;
;;;298    }
0001f0  4770              BX       lr
;;;299    
                          ENDP

                  GPIO_ReadInputData PROC
;;;304      */
;;;305    uint16_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx)
0001f2  4601              MOV      r1,r0
;;;306    {
;;;307      /* Check the parameters */
;;;308      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;309      
;;;310      return ((uint16_t)GPIOx->IDR);
0001f4  6888              LDR      r0,[r1,#8]
0001f6  b280              UXTH     r0,r0
;;;311    }
0001f8  4770              BX       lr
;;;312    
                          ENDP

                  GPIO_ReadOutputDataBit PROC
;;;319      */
;;;320    uint8_t GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
0001fa  4602              MOV      r2,r0
;;;321    {
;;;322      uint8_t bitstatus = 0x00;
0001fc  2000              MOVS     r0,#0
;;;323      /* Check the parameters */
;;;324      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;325      assert_param(IS_GET_GPIO_PIN(GPIO_Pin)); 
;;;326      
;;;327      if ((GPIOx->ODR & GPIO_Pin) != (uint32_t)Bit_RESET)
0001fe  68d3              LDR      r3,[r2,#0xc]
000200  420b              TST      r3,r1
000202  d001              BEQ      |L1.520|
;;;328      {
;;;329        bitstatus = (uint8_t)Bit_SET;
000204  2001              MOVS     r0,#1
000206  e000              B        |L1.522|
                  |L1.520|
;;;330      }
;;;331      else
;;;332      {
;;;333        bitstatus = (uint8_t)Bit_RESET;
000208  2000              MOVS     r0,#0
                  |L1.522|
;;;334      }
;;;335      return bitstatus;
;;;336    }
00020a  4770              BX       lr
;;;337    
                          ENDP

                  GPIO_ReadOutputData PROC
;;;342      */
;;;343    uint16_t GPIO_ReadOutputData(GPIO_TypeDef* GPIOx)
00020c  4601              MOV      r1,r0
;;;344    {
;;;345      /* Check the parameters */
;;;346      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;347        
;;;348      return ((uint16_t)GPIOx->ODR);
00020e  68c8              LDR      r0,[r1,#0xc]
000210  b280              UXTH     r0,r0
;;;349    }
000212  4770              BX       lr
;;;350    
                          ENDP

                  GPIO_SetBits PROC
;;;357      */
;;;358    void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
000214  6101              STR      r1,[r0,#0x10]
;;;359    {
;;;360      /* Check the parameters */
;;;361      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;362      assert_param(IS_GPIO_PIN(GPIO_Pin));
;;;363      
;;;364      GPIOx->BSRR = GPIO_Pin;
;;;365    }
000216  4770              BX       lr
;;;366    
                          ENDP

                  GPIO_ResetBits PROC
;;;373      */
;;;374    void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
000218  6141              STR      r1,[r0,#0x14]
;;;375    {
;;;376      /* Check the parameters */
;;;377      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;378      assert_param(IS_GPIO_PIN(GPIO_Pin));
;;;379      
;;;380      GPIOx->BRR = GPIO_Pin;
;;;381    }
00021a  4770              BX       lr
;;;382    
                          ENDP

                  GPIO_WriteBit PROC
;;;393      */
;;;394    void GPIO_WriteBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction BitVal)
00021c  b10a              CBZ      r2,|L1.546|
;;;395    {
;;;396      /* Check the parameters */
;;;397      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;398      assert_param(IS_GET_GPIO_PIN(GPIO_Pin));
;;;399      assert_param(IS_GPIO_BIT_ACTION(BitVal)); 
;;;400      
;;;401      if (BitVal != Bit_RESET)
;;;402      {
;;;403        GPIOx->BSRR = GPIO_Pin;
00021e  6101              STR      r1,[r0,#0x10]
000220  e000              B        |L1.548|
                  |L1.546|
;;;404      }
;;;405      else
;;;406      {
;;;407        GPIOx->BRR = GPIO_Pin;
000222  6141              STR      r1,[r0,#0x14]
                  |L1.548|
;;;408      }
;;;409    }
000224  4770              BX       lr
;;;410    
                          ENDP

                  GPIO_Write PROC
;;;416      */
;;;417    void GPIO_Write(GPIO_TypeDef* GPIOx, uint16_t PortVal)
000226  60c1              STR      r1,[r0,#0xc]
;;;418    {
;;;419      /* Check the parameters */
;;;420      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;421      
;;;422      GPIOx->ODR = PortVal;
;;;423    }
000228  4770              BX       lr
;;;424    
                          ENDP

                  GPIO_PinLockConfig PROC
;;;431      */
;;;432    void GPIO_PinLockConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
00022a  f44f3280          MOV      r2,#0x10000
;;;433    {
;;;434      uint32_t tmp = 0x00010000;
;;;435      
;;;436      /* Check the parameters */
;;;437      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;438      assert_param(IS_GPIO_PIN(GPIO_Pin));
;;;439      
;;;440      tmp |= GPIO_Pin;
00022e  430a              ORRS     r2,r2,r1
;;;441      /* Set LCKK bit */
;;;442      GPIOx->LCKR = tmp;
000230  6182              STR      r2,[r0,#0x18]
;;;443      /* Reset LCKK bit */
;;;444      GPIOx->LCKR =  GPIO_Pin;
000232  6181              STR      r1,[r0,#0x18]
;;;445      /* Set LCKK bit */
;;;446      GPIOx->LCKR = tmp;
000234  6182              STR      r2,[r0,#0x18]
;;;447      /* Read LCKK bit*/
;;;448      tmp = GPIOx->LCKR;
000236  6982              LDR      r2,[r0,#0x18]
;;;449      /* Read LCKK bit*/
;;;450      tmp = GPIOx->LCKR;
000238  6982              LDR      r2,[r0,#0x18]
;;;451    }
00023a  4770              BX       lr
;;;452    
                          ENDP

                  GPIO_EventOutputConfig PROC
;;;461      */
;;;462    void GPIO_EventOutputConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource)
00023c  2200              MOVS     r2,#0
;;;463    {
;;;464      uint32_t tmpreg = 0x00;
;;;465      /* Check the parameters */
;;;466      assert_param(IS_GPIO_EVENTOUT_PORT_SOURCE(GPIO_PortSource));
;;;467      assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource));
;;;468        
;;;469      tmpreg = AFIO->EVCR;
00023e  4b40              LDR      r3,|L1.832|
000240  681a              LDR      r2,[r3,#0]
;;;470      /* Clear the PORT[6:4] and PIN[3:0] bits */
;;;471      tmpreg &= EVCR_PORTPINCONFIG_MASK;
000242  f64f7380          MOV      r3,#0xff80
000246  401a              ANDS     r2,r2,r3
;;;472      tmpreg |= (uint32_t)GPIO_PortSource << 0x04;
000248  ea421200          ORR      r2,r2,r0,LSL #4
;;;473      tmpreg |= GPIO_PinSource;
00024c  430a              ORRS     r2,r2,r1
;;;474      AFIO->EVCR = tmpreg;
00024e  4b3c              LDR      r3,|L1.832|
000250  601a              STR      r2,[r3,#0]
;;;475    }
000252  4770              BX       lr
;;;476    
                          ENDP

                  GPIO_EventOutputCmd PROC
;;;482      */
;;;483    void GPIO_EventOutputCmd(FunctionalState NewState)
000254  493b              LDR      r1,|L1.836|
;;;484    {
;;;485      /* Check the parameters */
;;;486      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;487      
;;;488      *(__IO uint32_t *) EVCR_EVOE_BB = (uint32_t)NewState;
000256  61c8              STR      r0,[r1,#0x1c]
;;;489    }
000258  4770              BX       lr
;;;490    
                          ENDP

                  GPIO_PinRemapConfig PROC
;;;548      */
;;;549    void GPIO_PinRemapConfig(uint32_t GPIO_Remap, FunctionalState NewState)
00025a  b5f0              PUSH     {r4-r7,lr}
;;;550    {
;;;551      uint32_t tmp = 0x00, tmp1 = 0x00, tmpreg = 0x00, tmpmask = 0x00;
00025c  2200              MOVS     r2,#0
00025e  2300              MOVS     r3,#0
000260  2400              MOVS     r4,#0
000262  2500              MOVS     r5,#0
;;;552    
;;;553      /* Check the parameters */
;;;554      assert_param(IS_GPIO_REMAP(GPIO_Remap));
;;;555      assert_param(IS_FUNCTIONAL_STATE(NewState));  
;;;556      
;;;557      if((GPIO_Remap & 0x80000000) == 0x80000000)
000264  f0004600          AND      r6,r0,#0x80000000
000268  f1b64f00          CMP      r6,#0x80000000
00026c  d102              BNE      |L1.628|
;;;558      {
;;;559        tmpreg = AFIO->MAPR2;
00026e  4e34              LDR      r6,|L1.832|
000270  69f4              LDR      r4,[r6,#0x1c]
000272  e001              B        |L1.632|
                  |L1.628|
;;;560      }
;;;561      else
;;;562      {
;;;563        tmpreg = AFIO->MAPR;
000274  4e32              LDR      r6,|L1.832|
000276  6874              LDR      r4,[r6,#4]
                  |L1.632|
;;;564      }
;;;565    
;;;566      tmpmask = (GPIO_Remap & DBGAFR_POSITION_MASK) >> 0x10;
000278  f3c04503          UBFX     r5,r0,#16,#4
;;;567      tmp = GPIO_Remap & LSB_MASK;
00027c  b282              UXTH     r2,r0
;;;568    
;;;569      if ((GPIO_Remap & (DBGAFR_LOCATION_MASK | DBGAFR_NUMBITS_MASK)) == (DBGAFR_LOCATION_MASK | DBGAFR_NUMBITS_MASK))
00027e  f4001640          AND      r6,r0,#0x300000
000282  f5b61f40          CMP      r6,#0x300000
000286  d108              BNE      |L1.666|
;;;570      {
;;;571        tmpreg &= DBGAFR_SWJCFG_MASK;
000288  f0246470          BIC      r4,r4,#0xf000000
;;;572        AFIO->MAPR &= DBGAFR_SWJCFG_MASK;
00028c  4e2c              LDR      r6,|L1.832|
00028e  6876              LDR      r6,[r6,#4]
000290  f0266670          BIC      r6,r6,#0xf000000
000294  4f2a              LDR      r7,|L1.832|
000296  607e              STR      r6,[r7,#4]
000298  e012              B        |L1.704|
                  |L1.666|
;;;573      }
;;;574      else if ((GPIO_Remap & DBGAFR_NUMBITS_MASK) == DBGAFR_NUMBITS_MASK)
00029a  f4001680          AND      r6,r0,#0x100000
00029e  f5b61f80          CMP      r6,#0x100000
0002a2  d106              BNE      |L1.690|
;;;575      {
;;;576        tmp1 = ((uint32_t)0x03) << tmpmask;
0002a4  2603              MOVS     r6,#3
0002a6  fa06f305          LSL      r3,r6,r5
;;;577        tmpreg &= ~tmp1;
0002aa  439c              BICS     r4,r4,r3
;;;578        tmpreg |= ~DBGAFR_SWJCFG_MASK;
0002ac  f0446470          ORR      r4,r4,#0xf000000
0002b0  e006              B        |L1.704|
                  |L1.690|
;;;579      }
;;;580      else
;;;581      {
;;;582        tmpreg &= ~(tmp << ((GPIO_Remap >> 0x15)*0x10));
0002b2  0d46              LSRS     r6,r0,#21
0002b4  0136              LSLS     r6,r6,#4
0002b6  fa02f606          LSL      r6,r2,r6
0002ba  43b4              BICS     r4,r4,r6
;;;583        tmpreg |= ~DBGAFR_SWJCFG_MASK;
0002bc  f0446470          ORR      r4,r4,#0xf000000
                  |L1.704|
;;;584      }
;;;585    
;;;586      if (NewState != DISABLE)
0002c0  b121              CBZ      r1,|L1.716|
;;;587      {
;;;588        tmpreg |= (tmp << ((GPIO_Remap >> 0x15)*0x10));
0002c2  0d46              LSRS     r6,r0,#21
0002c4  0136              LSLS     r6,r6,#4
0002c6  fa02f606          LSL      r6,r2,r6
0002ca  4334              ORRS     r4,r4,r6
                  |L1.716|
;;;589      }
;;;590    
;;;591      if((GPIO_Remap & 0x80000000) == 0x80000000)
0002cc  f0004600          AND      r6,r0,#0x80000000
0002d0  f1b64f00          CMP      r6,#0x80000000
0002d4  d102              BNE      |L1.732|
;;;592      {
;;;593        AFIO->MAPR2 = tmpreg;
0002d6  4e1a              LDR      r6,|L1.832|
0002d8  61f4              STR      r4,[r6,#0x1c]
0002da  e001              B        |L1.736|
                  |L1.732|
;;;594      }
;;;595      else
;;;596      {
;;;597        AFIO->MAPR = tmpreg;
0002dc  4e18              LDR      r6,|L1.832|
0002de  6074              STR      r4,[r6,#4]
                  |L1.736|
;;;598      }  
;;;599    }
0002e0  bdf0              POP      {r4-r7,pc}
;;;600    
                          ENDP

                  GPIO_EXTILineConfig PROC
;;;608      */
;;;609    void GPIO_EXTILineConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource)
0002e2  b530              PUSH     {r4,r5,lr}
;;;610    {
;;;611      uint32_t tmp = 0x00;
0002e4  2200              MOVS     r2,#0
;;;612      /* Check the parameters */
;;;613      assert_param(IS_GPIO_EXTI_PORT_SOURCE(GPIO_PortSource));
;;;614      assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource));
;;;615      
;;;616      tmp = ((uint32_t)0x0F) << (0x04 * (GPIO_PinSource & (uint8_t)0x03));
0002e6  078b              LSLS     r3,r1,#30
0002e8  0f1c              LSRS     r4,r3,#28
0002ea  230f              MOVS     r3,#0xf
0002ec  fa03f204          LSL      r2,r3,r4
;;;617      AFIO->EXTICR[GPIO_PinSource >> 0x02] &= ~tmp;
0002f0  4b13              LDR      r3,|L1.832|
0002f2  3308              ADDS     r3,r3,#8
0002f4  108c              ASRS     r4,r1,#2
0002f6  f8534024          LDR      r4,[r3,r4,LSL #2]
0002fa  4394              BICS     r4,r4,r2
0002fc  108d              ASRS     r5,r1,#2
0002fe  f8434025          STR      r4,[r3,r5,LSL #2]
;;;618      AFIO->EXTICR[GPIO_PinSource >> 0x02] |= (((uint32_t)GPIO_PortSource) << (0x04 * (GPIO_PinSource & (uint8_t)0x03)));
000302  108c              ASRS     r4,r1,#2
000304  f8533024          LDR      r3,[r3,r4,LSL #2]
000308  078c              LSLS     r4,r1,#30
00030a  0f24              LSRS     r4,r4,#28
00030c  fa00f404          LSL      r4,r0,r4
000310  4323              ORRS     r3,r3,r4
000312  4c0b              LDR      r4,|L1.832|
000314  3408              ADDS     r4,r4,#8
000316  108d              ASRS     r5,r1,#2
000318  f8443025          STR      r3,[r4,r5,LSL #2]
;;;619    }
00031c  bd30              POP      {r4,r5,pc}
;;;620    
                          ENDP

                  GPIO_ETH_MediaInterfaceConfig PROC
;;;629      */
;;;630    void GPIO_ETH_MediaInterfaceConfig(uint32_t GPIO_ETH_MediaInterface) 
00031e  490a              LDR      r1,|L1.840|
;;;631    { 
;;;632      assert_param(IS_GPIO_ETH_MEDIA_INTERFACE(GPIO_ETH_MediaInterface)); 
;;;633    
;;;634      /* Configure MII_RMII selection bit */ 
;;;635      *(__IO uint32_t *) MAPR_MII_RMII_SEL_BB = GPIO_ETH_MediaInterface; 
000320  6008              STR      r0,[r1,#0]
;;;636    }
000322  4770              BX       lr
;;;637      
                          ENDP

                  |L1.804|
                          DCD      0x40010800
                  |L1.808|
                          DCD      0x40010c00
                  |L1.812|
                          DCD      0x40011000
                  |L1.816|
                          DCD      0x40011400
                  |L1.820|
                          DCD      0x40011800
                  |L1.824|
                          DCD      0x40011c00
                  |L1.828|
                          DCD      0x40012000
                  |L1.832|
                          DCD      0x40010000
                  |L1.836|
                          DCD      0x42200000
                  |L1.840|
                          DCD      0x422000dc
