stm32f4xx_gpio.txt 26.3 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681
; 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\stm32f4xx_gpio.o --asm_dir=.\Flash\List\ --list_dir=.\Flash\List\ --depend=.\flash\obj\stm32f4xx_gpio.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\stm32f4xx_gpio.crf ..\..\Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_gpio.c]
                          THUMB

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

                  GPIO_DeInit PROC
;;;126      */
;;;127    void GPIO_DeInit(GPIO_TypeDef* GPIOx)
000000  b510              PUSH     {r4,lr}
;;;128    {
;;;129      /* Check the parameters */
;;;130      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;131    
;;;132      if (GPIOx == GPIOA)
000002  4949              LDR      r1,|L1.296|
000004  4288              CMP      r0,r1
000006  d109              BNE      |L1.28|
;;;133      {
;;;134        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOA, ENABLE);
000008  2101              MOVS     r1,#1
00000a  4608              MOV      r0,r1
00000c  f7fffffe          BL       RCC_AHB1PeriphResetCmd
;;;135        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOA, DISABLE);
000010  2100              MOVS     r1,#0
000012  e8bd4010          POP      {r4,lr}
000016  2001              MOVS     r0,#1
000018  f7ffbffe          B.W      RCC_AHB1PeriphResetCmd
                  |L1.28|
;;;136      }
;;;137      else if (GPIOx == GPIOB)
00001c  4943              LDR      r1,|L1.300|
00001e  4288              CMP      r0,r1
000020  d109              BNE      |L1.54|
;;;138      {
;;;139        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOB, ENABLE);
000022  2101              MOVS     r1,#1
000024  2002              MOVS     r0,#2
000026  f7fffffe          BL       RCC_AHB1PeriphResetCmd
;;;140        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOB, DISABLE);
00002a  2100              MOVS     r1,#0
00002c  e8bd4010          POP      {r4,lr}
000030  2002              MOVS     r0,#2
000032  f7ffbffe          B.W      RCC_AHB1PeriphResetCmd
                  |L1.54|
;;;141      }
;;;142      else if (GPIOx == GPIOC)
000036  493e              LDR      r1,|L1.304|
000038  4288              CMP      r0,r1
00003a  d109              BNE      |L1.80|
;;;143      {
;;;144        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOC, ENABLE);
00003c  2101              MOVS     r1,#1
00003e  2004              MOVS     r0,#4
000040  f7fffffe          BL       RCC_AHB1PeriphResetCmd
;;;145        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOC, DISABLE);
000044  2100              MOVS     r1,#0
000046  e8bd4010          POP      {r4,lr}
00004a  2004              MOVS     r0,#4
00004c  f7ffbffe          B.W      RCC_AHB1PeriphResetCmd
                  |L1.80|
;;;146      }
;;;147      else if (GPIOx == GPIOD)
000050  4938              LDR      r1,|L1.308|
000052  4288              CMP      r0,r1
000054  d109              BNE      |L1.106|
;;;148      {
;;;149        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOD, ENABLE);
000056  2101              MOVS     r1,#1
000058  2008              MOVS     r0,#8
00005a  f7fffffe          BL       RCC_AHB1PeriphResetCmd
;;;150        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOD, DISABLE);
00005e  2100              MOVS     r1,#0
000060  e8bd4010          POP      {r4,lr}
000064  2008              MOVS     r0,#8
000066  f7ffbffe          B.W      RCC_AHB1PeriphResetCmd
                  |L1.106|
;;;151      }
;;;152      else if (GPIOx == GPIOE)
00006a  4933              LDR      r1,|L1.312|
00006c  4288              CMP      r0,r1
00006e  d109              BNE      |L1.132|
;;;153      {
;;;154        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOE, ENABLE);
000070  2101              MOVS     r1,#1
000072  2010              MOVS     r0,#0x10
000074  f7fffffe          BL       RCC_AHB1PeriphResetCmd
;;;155        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOE, DISABLE);
000078  2100              MOVS     r1,#0
00007a  e8bd4010          POP      {r4,lr}
00007e  2010              MOVS     r0,#0x10
000080  f7ffbffe          B.W      RCC_AHB1PeriphResetCmd
                  |L1.132|
;;;156      }
;;;157      else if (GPIOx == GPIOF)
000084  492d              LDR      r1,|L1.316|
000086  4288              CMP      r0,r1
000088  d109              BNE      |L1.158|
;;;158      {
;;;159        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOF, ENABLE);
00008a  2101              MOVS     r1,#1
00008c  2020              MOVS     r0,#0x20
00008e  f7fffffe          BL       RCC_AHB1PeriphResetCmd
;;;160        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOF, DISABLE);
000092  2100              MOVS     r1,#0
000094  e8bd4010          POP      {r4,lr}
000098  2020              MOVS     r0,#0x20
00009a  f7ffbffe          B.W      RCC_AHB1PeriphResetCmd
                  |L1.158|
;;;161      }
;;;162      else if (GPIOx == GPIOG)
00009e  4928              LDR      r1,|L1.320|
0000a0  4288              CMP      r0,r1
0000a2  d109              BNE      |L1.184|
;;;163      {
;;;164        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOG, ENABLE);
0000a4  2101              MOVS     r1,#1
0000a6  2040              MOVS     r0,#0x40
0000a8  f7fffffe          BL       RCC_AHB1PeriphResetCmd
;;;165        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOG, DISABLE);
0000ac  2100              MOVS     r1,#0
0000ae  e8bd4010          POP      {r4,lr}
0000b2  2040              MOVS     r0,#0x40
0000b4  f7ffbffe          B.W      RCC_AHB1PeriphResetCmd
                  |L1.184|
;;;166      }
;;;167      else if (GPIOx == GPIOH)
0000b8  4922              LDR      r1,|L1.324|
0000ba  4288              CMP      r0,r1
0000bc  d109              BNE      |L1.210|
;;;168      {
;;;169        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOH, ENABLE);
0000be  2101              MOVS     r1,#1
0000c0  2080              MOVS     r0,#0x80
0000c2  f7fffffe          BL       RCC_AHB1PeriphResetCmd
;;;170        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOH, DISABLE);
0000c6  2100              MOVS     r1,#0
0000c8  e8bd4010          POP      {r4,lr}
0000cc  2080              MOVS     r0,#0x80
0000ce  f7ffbffe          B.W      RCC_AHB1PeriphResetCmd
                  |L1.210|
;;;171      }
;;;172    
;;;173      else if (GPIOx == GPIOI)
0000d2  491d              LDR      r1,|L1.328|
0000d4  4288              CMP      r0,r1
0000d6  d10a              BNE      |L1.238|
;;;174      {
;;;175        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, ENABLE);
0000d8  1584              ASRS     r4,r0,#22
0000da  2101              MOVS     r1,#1
0000dc  4620              MOV      r0,r4
0000de  f7fffffe          BL       RCC_AHB1PeriphResetCmd
;;;176        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, DISABLE);
0000e2  4620              MOV      r0,r4
0000e4  e8bd4010          POP      {r4,lr}
0000e8  2100              MOVS     r1,#0
0000ea  f7ffbffe          B.W      RCC_AHB1PeriphResetCmd
                  |L1.238|
;;;177      }
;;;178      else if (GPIOx == GPIOJ)
0000ee  4917              LDR      r1,|L1.332|
0000f0  4288              CMP      r0,r1
0000f2  d10a              BNE      |L1.266|
;;;179      {
;;;180        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOJ, ENABLE);
0000f4  1544              ASRS     r4,r0,#21
0000f6  2101              MOVS     r1,#1
0000f8  4620              MOV      r0,r4
0000fa  f7fffffe          BL       RCC_AHB1PeriphResetCmd
;;;181        RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOJ, DISABLE);
0000fe  4620              MOV      r0,r4
000100  e8bd4010          POP      {r4,lr}
000104  2100              MOVS     r1,#0
000106  f7ffbffe          B.W      RCC_AHB1PeriphResetCmd
                  |L1.266|
;;;182      }
;;;183      else
;;;184      {
;;;185        if (GPIOx == GPIOK)
00010a  4911              LDR      r1,|L1.336|
00010c  4288              CMP      r0,r1
00010e  d10a              BNE      |L1.294|
;;;186        {
;;;187          RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOK, ENABLE);
000110  1504              ASRS     r4,r0,#20
000112  2101              MOVS     r1,#1
000114  4620              MOV      r0,r4
000116  f7fffffe          BL       RCC_AHB1PeriphResetCmd
;;;188          RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOK, DISABLE);
00011a  4620              MOV      r0,r4
00011c  e8bd4010          POP      {r4,lr}
000120  2100              MOVS     r1,#0
000122  f7ffbffe          B.W      RCC_AHB1PeriphResetCmd
                  |L1.294|
;;;189        }
;;;190      }
;;;191    }
000126  bd10              POP      {r4,pc}
;;;192    
                          ENDP

                  |L1.296|
                          DCD      0x40020000
                  |L1.300|
                          DCD      0x40020400
                  |L1.304|
                          DCD      0x40020800
                  |L1.308|
                          DCD      0x40020c00
                  |L1.312|
                          DCD      0x40021000
                  |L1.316|
                          DCD      0x40021400
                  |L1.320|
                          DCD      0x40021800
                  |L1.324|
                          DCD      0x40021c00
                  |L1.328|
                          DCD      0x40022000
                  |L1.332|
                          DCD      0x40022400
                  |L1.336|
                          DCD      0x40022800

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

                  GPIO_Init PROC
;;;201      */
;;;202    void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;203    {
;;;204      uint32_t pinpos = 0x00, pos = 0x00 , currentpin = 0x00;
000004  2200              MOVS     r2,#0
;;;205    
;;;206      /* Check the parameters */
;;;207      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;208      assert_param(IS_GPIO_PIN(GPIO_InitStruct->GPIO_Pin));
;;;209      assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode));
;;;210      assert_param(IS_GPIO_PUPD(GPIO_InitStruct->GPIO_PuPd));
;;;211    
;;;212      /* ------------------------- Configure the port pins ---------------- */
;;;213      /*-- GPIO Mode Configuration --*/
;;;214      for (pinpos = 0x00; pinpos < 0x10; pinpos++)
;;;215      {
;;;216        pos = ((uint32_t)0x01) << pinpos;
000006  2701              MOVS     r7,#1
;;;217        /* Get the port pins position */
;;;218        currentpin = (GPIO_InitStruct->GPIO_Pin) & pos;
;;;219    
;;;220        if (currentpin == pos)
;;;221        {
;;;222          GPIOx->MODER  &= ~(GPIO_MODER_MODER0 << (pinpos * 2));
000008  f04f0c03          MOV      r12,#3
                  |L2.12|
00000c  fa07f502          LSL      r5,r7,r2              ;216
000010  680b              LDR      r3,[r1,#0]            ;218
000012  402b              ANDS     r3,r3,r5              ;218
000014  42ab              CMP      r3,r5                 ;220
000016  d12c              BNE      |L2.114|
000018  6806              LDR      r6,[r0,#0]
00001a  0053              LSLS     r3,r2,#1
00001c  fa0cf403          LSL      r4,r12,r3
000020  43a6              BICS     r6,r6,r4
000022  6006              STR      r6,[r0,#0]
;;;223          GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2));
000024  790e              LDRB     r6,[r1,#4]
000026  f8d08000          LDR      r8,[r0,#0]
00002a  409e              LSLS     r6,r6,r3
00002c  ea460608          ORR      r6,r6,r8
000030  6006              STR      r6,[r0,#0]
;;;224    
;;;225          if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF))
000032  790e              LDRB     r6,[r1,#4]
000034  2e01              CMP      r6,#1
000036  d001              BEQ      |L2.60|
000038  2e02              CMP      r6,#2
00003a  d112              BNE      |L2.98|
                  |L2.60|
;;;226          {
;;;227            /* Check Speed mode parameters */
;;;228            assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed));
;;;229    
;;;230            /* Speed mode configuration */
;;;231            GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (pinpos * 2));
00003c  6886              LDR      r6,[r0,#8]
00003e  43a6              BICS     r6,r6,r4
000040  6086              STR      r6,[r0,#8]
;;;232            GPIOx->OSPEEDR |= ((uint32_t)(GPIO_InitStruct->GPIO_Speed) << (pinpos * 2));
000042  794e              LDRB     r6,[r1,#5]
000044  f8d08008          LDR      r8,[r0,#8]
000048  409e              LSLS     r6,r6,r3
00004a  ea460608          ORR      r6,r6,r8
00004e  6086              STR      r6,[r0,#8]
;;;233    
;;;234            /* Check Output mode parameters */
;;;235            assert_param(IS_GPIO_OTYPE(GPIO_InitStruct->GPIO_OType));
;;;236    
;;;237            /* Output mode configuration*/
;;;238            GPIOx->OTYPER  &= ~((GPIO_OTYPER_OT_0) << ((uint16_t)pinpos)) ;
000050  6846              LDR      r6,[r0,#4]
000052  43ae              BICS     r6,r6,r5
000054  6046              STR      r6,[r0,#4]
;;;239            GPIOx->OTYPER |= (uint16_t)(((uint16_t)GPIO_InitStruct->GPIO_OType) << ((uint16_t)pinpos));
000056  6845              LDR      r5,[r0,#4]
000058  798e              LDRB     r6,[r1,#6]
00005a  4096              LSLS     r6,r6,r2
00005c  b2b6              UXTH     r6,r6
00005e  4335              ORRS     r5,r5,r6
000060  6045              STR      r5,[r0,#4]
                  |L2.98|
;;;240          }
;;;241    
;;;242          /* Pull-up Pull down resistor configuration*/
;;;243          GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << ((uint16_t)pinpos * 2));
000062  68c5              LDR      r5,[r0,#0xc]
000064  43a5              BICS     r5,r5,r4
000066  60c5              STR      r5,[r0,#0xc]
;;;244          GPIOx->PUPDR |= (((uint32_t)GPIO_InitStruct->GPIO_PuPd) << (pinpos * 2));
000068  79cc              LDRB     r4,[r1,#7]
00006a  409c              LSLS     r4,r4,r3
00006c  68c3              LDR      r3,[r0,#0xc]
00006e  431c              ORRS     r4,r4,r3
000070  60c4              STR      r4,[r0,#0xc]
                  |L2.114|
000072  1c52              ADDS     r2,r2,#1              ;214
000074  2a10              CMP      r2,#0x10              ;214
000076  d3c9              BCC      |L2.12|
;;;245        }
;;;246      }
;;;247    }
000078  e8bd81f0          POP      {r4-r8,pc}
;;;248    
                          ENDP


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

                  GPIO_PinAFConfig PROC
;;;578      */
;;;579    void GPIO_PinAFConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF)
000000  b510              PUSH     {r4,lr}
;;;580    {
;;;581      uint32_t temp = 0x00;
;;;582      uint32_t temp_2 = 0x00;
;;;583      
;;;584      /* Check the parameters */
;;;585      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;586      assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource));
;;;587      assert_param(IS_GPIO_AF(GPIO_AF));
;;;588      
;;;589      temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ;
000002  074b              LSLS     r3,r1,#29
000004  0edb              LSRS     r3,r3,#27
000006  409a              LSLS     r2,r2,r3
;;;590      GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ;
000008  08c9              LSRS     r1,r1,#3
00000a  eb000081          ADD      r0,r0,r1,LSL #2
00000e  6a01              LDR      r1,[r0,#0x20]
000010  240f              MOVS     r4,#0xf
000012  409c              LSLS     r4,r4,r3
000014  43a1              BICS     r1,r1,r4
000016  6201              STR      r1,[r0,#0x20]
;;;591      temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp;
000018  6a01              LDR      r1,[r0,#0x20]
00001a  4311              ORRS     r1,r1,r2
;;;592      GPIOx->AFR[GPIO_PinSource >> 0x03] = temp_2;
00001c  6201              STR      r1,[r0,#0x20]
;;;593    }
00001e  bd10              POP      {r4,pc}
;;;594    
                          ENDP


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

                  GPIO_PinLockConfig PROC
;;;276      */
;;;277    void GPIO_PinLockConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
000000  b508              PUSH     {r3,lr}
;;;278    {
;;;279      __IO uint32_t tmp = 0x00010000;
;;;280    
;;;281      /* Check the parameters */
;;;282      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;283      assert_param(IS_GPIO_PIN(GPIO_Pin));
;;;284    
;;;285      tmp |= GPIO_Pin;
000002  f4413280          ORR      r2,r1,#0x10000
000006  9200              STR      r2,[sp,#0]
;;;286      /* Set LCKK bit */
;;;287      GPIOx->LCKR = tmp;
000008  9a00              LDR      r2,[sp,#0]
00000a  61c2              STR      r2,[r0,#0x1c]
;;;288      /* Reset LCKK bit */
;;;289      GPIOx->LCKR =  GPIO_Pin;
00000c  61c1              STR      r1,[r0,#0x1c]
;;;290      /* Set LCKK bit */
;;;291      GPIOx->LCKR = tmp;
00000e  9900              LDR      r1,[sp,#0]
000010  61c1              STR      r1,[r0,#0x1c]
;;;292      /* Read LCKK bit*/
;;;293      tmp = GPIOx->LCKR;
000012  69c1              LDR      r1,[r0,#0x1c]
;;;294      /* Read LCKK bit*/
;;;295      tmp = GPIOx->LCKR;
000014  69c0              LDR      r0,[r0,#0x1c]
000016  9000              STR      r0,[sp,#0]
;;;296    }
000018  bd08              POP      {r3,pc}
;;;297    
                          ENDP


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

                  GPIO_ReadInputData PROC
;;;348      */
;;;349    uint16_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx)
000000  6900              LDR      r0,[r0,#0x10]
;;;350    {
;;;351      /* Check the parameters */
;;;352      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;353    
;;;354      return ((uint16_t)GPIOx->IDR);
000002  b280              UXTH     r0,r0
;;;355    }
000004  4770              BX       lr
;;;356    
                          ENDP


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

                  GPIO_ReadInputDataBit PROC
;;;322      */
;;;323    uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
000000  4602              MOV      r2,r0
;;;324    {
;;;325      uint8_t bitstatus = 0x00;
000002  2000              MOVS     r0,#0
;;;326    
;;;327      /* Check the parameters */
;;;328      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;329      assert_param(IS_GET_GPIO_PIN(GPIO_Pin));
;;;330    
;;;331      if ((GPIOx->IDR & GPIO_Pin) != (uint32_t)Bit_RESET)
000004  6912              LDR      r2,[r2,#0x10]
000006  420a              TST      r2,r1
000008  d000              BEQ      |L6.12|
;;;332      {
;;;333        bitstatus = (uint8_t)Bit_SET;
00000a  2001              MOVS     r0,#1
                  |L6.12|
;;;334      }
;;;335      else
;;;336      {
;;;337        bitstatus = (uint8_t)Bit_RESET;
;;;338      }
;;;339      return bitstatus;
;;;340    }
00000c  4770              BX       lr
;;;341    
                          ENDP


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

                  GPIO_ReadOutputData PROC
;;;391      */
;;;392    uint16_t GPIO_ReadOutputData(GPIO_TypeDef* GPIOx)
000000  6940              LDR      r0,[r0,#0x14]
;;;393    {
;;;394      /* Check the parameters */
;;;395      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;396    
;;;397      return ((uint16_t)GPIOx->ODR);
000002  b280              UXTH     r0,r0
;;;398    }
000004  4770              BX       lr
;;;399    
                          ENDP


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

                  GPIO_ReadOutputDataBit PROC
;;;365      */
;;;366    uint8_t GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
000000  4602              MOV      r2,r0
;;;367    {
;;;368      uint8_t bitstatus = 0x00;
000002  2000              MOVS     r0,#0
;;;369    
;;;370      /* Check the parameters */
;;;371      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;372      assert_param(IS_GET_GPIO_PIN(GPIO_Pin));
;;;373    
;;;374      if (((GPIOx->ODR) & GPIO_Pin) != (uint32_t)Bit_RESET)
000004  6952              LDR      r2,[r2,#0x14]
000006  420a              TST      r2,r1
000008  d000              BEQ      |L8.12|
;;;375      {
;;;376        bitstatus = (uint8_t)Bit_SET;
00000a  2001              MOVS     r0,#1
                  |L8.12|
;;;377      }
;;;378      else
;;;379      {
;;;380        bitstatus = (uint8_t)Bit_RESET;
;;;381      }
;;;382      return bitstatus;
;;;383    }
00000c  4770              BX       lr
;;;384    
                          ENDP


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

                  GPIO_ResetBits PROC
;;;432      */
;;;433    void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
000000  8341              STRH     r1,[r0,#0x1a]
;;;434    {
;;;435      /* Check the parameters */
;;;436      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;437      assert_param(IS_GPIO_PIN(GPIO_Pin));
;;;438    
;;;439      GPIOx->BSRRH = GPIO_Pin;
;;;440    }
000002  4770              BX       lr
;;;441    
                          ENDP


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

                  GPIO_SetBits PROC
;;;411      */
;;;412    void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
000000  8301              STRH     r1,[r0,#0x18]
;;;413    {
;;;414      /* Check the parameters */
;;;415      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;416      assert_param(IS_GPIO_PIN(GPIO_Pin));
;;;417    
;;;418      GPIOx->BSRRL = GPIO_Pin;
;;;419    }
000002  4770              BX       lr
;;;420    
                          ENDP


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

                  GPIO_StructInit PROC
;;;253      */
;;;254    void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct)
000000  f64f71ff          MOV      r1,#0xffff
;;;255    {
;;;256      /* Reset GPIO init structure parameters values */
;;;257      GPIO_InitStruct->GPIO_Pin  = GPIO_Pin_All;
000004  6001              STR      r1,[r0,#0]
;;;258      GPIO_InitStruct->GPIO_Mode = GPIO_Mode_IN;
000006  2100              MOVS     r1,#0
000008  7101              STRB     r1,[r0,#4]
;;;259      GPIO_InitStruct->GPIO_Speed = GPIO_Speed_2MHz;
00000a  7141              STRB     r1,[r0,#5]
;;;260      GPIO_InitStruct->GPIO_OType = GPIO_OType_PP;
00000c  7181              STRB     r1,[r0,#6]
;;;261      GPIO_InitStruct->GPIO_PuPd = GPIO_PuPd_NOPULL;
00000e  71c1              STRB     r1,[r0,#7]
;;;262    }
000010  4770              BX       lr
;;;263    
                          ENDP


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

                  GPIO_ToggleBits PROC
;;;495      */
;;;496    void GPIO_ToggleBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
000000  6942              LDR      r2,[r0,#0x14]
;;;497    {
;;;498      /* Check the parameters */
;;;499      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;500    
;;;501      GPIOx->ODR ^= GPIO_Pin;
000002  404a              EORS     r2,r2,r1
000004  6142              STR      r2,[r0,#0x14]
;;;502    }
000006  4770              BX       lr
;;;503    
                          ENDP


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

                  GPIO_Write PROC
;;;479      */
;;;480    void GPIO_Write(GPIO_TypeDef* GPIOx, uint16_t PortVal)
000000  6141              STR      r1,[r0,#0x14]
;;;481    {
;;;482      /* Check the parameters */
;;;483      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;484    
;;;485      GPIOx->ODR = PortVal;
;;;486    }
000002  4770              BX       lr
;;;487    
                          ENDP


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

                  GPIO_WriteBit PROC
;;;454      */
;;;455    void GPIO_WriteBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction BitVal)
000000  2a00              CMP      r2,#0
;;;456    {
000002  d001              BEQ      |L14.8|
;;;457      /* Check the parameters */
;;;458      assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
;;;459      assert_param(IS_GET_GPIO_PIN(GPIO_Pin));
;;;460      assert_param(IS_GPIO_BIT_ACTION(BitVal));
;;;461    
;;;462      if (BitVal != Bit_RESET)
;;;463      {
;;;464        GPIOx->BSRRL = GPIO_Pin;
000004  8301              STRH     r1,[r0,#0x18]
;;;465      }
;;;466      else
;;;467      {
;;;468        GPIOx->BSRRH = GPIO_Pin ;
;;;469      }
;;;470    }
000006  4770              BX       lr
                  |L14.8|
000008  8341              STRH     r1,[r0,#0x1a]         ;468
00000a  4770              BX       lr
;;;471    
                          ENDP


;*** Start embedded assembler ***

#line 1 "..\\..\\Libraries\\STM32F4xx_StdPeriph_Driver\\src\\stm32f4xx_gpio.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___16_stm32f4xx_gpio_c_f8e8e39a____REV16|
#line 129 "..\\..\\Libraries\\CMSIS\\Include\\core_cmInstr.h"
|__asm___16_stm32f4xx_gpio_c_f8e8e39a____REV16| PROC
#line 130

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

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

 rrx r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***