; generated by Component: ARM Compiler 5.06 update 7 (build 960) Tool: ArmCC [4d365d]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o..\output\sc32f1xxx_gpio.o --asm_dir=..\List\ --list_dir=..\List\ --depend=..\output\sc32f1xxx_gpio.d --cpu=Cortex-M0+ --apcs=interwork --diag_suppress=9931 -I..\FWLib\SC32F1XXX_Lib\inc -I..\User\HeadFiles -I..\User -I..\Drivers -I..\Apps -I..\CMSIS -IF:\Keil_ARMV5.36_pack\ARM\CMSIS\5.8.0\Device\ARM\ARMCM0plus\Include -D__UVISION_VERSION=536 -DARMCM0P -DSC32f10xx --omf_browse=..\output\sc32f1xxx_gpio.crf ..\FWLib\SC32F1XXX_Lib\src\sc32f1xxx_gpio.c]
                          THUMB

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

                  GPIO_DeInit PROC
;;;52      */
;;;53     void GPIO_DeInit ( GPIO_TypeDef* GPIOx )
000000  6a01              LDR      r1,[r0,#0x20]
;;;54     {
;;;55         /* Check the parameters */
;;;56         assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;57     
;;;58         /* Deinitializes the GPIOx PXCON register to their default reset values. */
;;;59         GPIOx->PXCON &= ( uint32_t ) ( ~GPIO_PIN_All );
000002  0c09              LSRS     r1,r1,#16
000004  0409              LSLS     r1,r1,#16
000006  6201              STR      r1,[r0,#0x20]
;;;60         /* Deinitializes the GPIOx PXPH register to their default reset values. */
;;;61         GPIOx->PXPH &= ( uint32_t ) ( ~GPIO_PIN_All );
000008  6c01              LDR      r1,[r0,#0x40]
00000a  0c09              LSRS     r1,r1,#16
00000c  0409              LSLS     r1,r1,#16
00000e  6401              STR      r1,[r0,#0x40]
;;;62         /* Deinitializes the GPIOx PIN register to their default reset values. */
;;;63         GPIOx->PIN &= ( uint32_t ) ( ~GPIO_PIN_All );
000010  6801              LDR      r1,[r0,#0]
000012  0c09              LSRS     r1,r1,#16
000014  0409              LSLS     r1,r1,#16
000016  6001              STR      r1,[r0,#0]
;;;64         /* Deinitializes the GPIOx PXLEV register to their default reset values. */
;;;65         GPIOx->PXLEV &= ( uint32_t ) 0x00000000;
000018  6e01              LDR      r1,[r0,#0x60]
00001a  2100              MOVS     r1,#0
00001c  6601              STR      r1,[r0,#0x60]
;;;66     }
00001e  4770              BX       lr
;;;67     
                          ENDP


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

                  GPIO_Init PROC
;;;79      */
;;;80     void GPIO_Init ( GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct )
000000  b5f0              PUSH     {r4-r7,lr}
;;;81     {
;;;82         uint32_t tmppin, tmppos, tmpreg;
;;;83     
;;;84         /* Check the parameters */
;;;85         assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;86         assert_param ( IS_GPIO_PIN ( GPIO_InitStruct->GPIO_Pin ) );
;;;87         assert_param ( IS_GPIO_MODE ( GPIO_InitStruct->GPIO_Mode ) );
;;;88     
;;;89         if ( GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT_PP )
000002  884b              LDRH     r3,[r1,#2]
;;;90         {
;;;91             /* Configure Pins to High-resistance output mode */
;;;92             GPIOx->PXCON |= ( uint32_t ) GPIO_InitStruct->GPIO_Pin;
000004  880a              LDRH     r2,[r1,#0]
000006  2b02              CMP      r3,#2                 ;89
000008  d004              BEQ      |L2.20|
;;;93         }
;;;94         else if ( GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IN_PU )
00000a  2b01              CMP      r3,#1
00000c  d006              BEQ      |L2.28|
;;;95         {
;;;96             /* Configure Pins to Pull-up input mode */
;;;97             GPIOx->PXCON &= ( uint32_t ) ( ~GPIO_InitStruct->GPIO_Pin );
;;;98             GPIOx->PXPH |= ( uint32_t ) GPIO_InitStruct->GPIO_Pin;
;;;99         }
;;;100        else if ( GPIO_InitStruct->GPIO_Mode == GPIO_Mode_IN_HI )
00000e  2b00              CMP      r3,#0
000010  d00b              BEQ      |L2.42|
000012  e011              B        |L2.56|
                  |L2.20|
000014  6a03              LDR      r3,[r0,#0x20]         ;92
000016  4313              ORRS     r3,r3,r2              ;92
000018  6203              STR      r3,[r0,#0x20]         ;92
00001a  e00d              B        |L2.56|
                  |L2.28|
00001c  6a03              LDR      r3,[r0,#0x20]         ;97
00001e  4393              BICS     r3,r3,r2              ;97
000020  6203              STR      r3,[r0,#0x20]         ;97
000022  6c02              LDR      r2,[r0,#0x40]         ;98
000024  880b              LDRH     r3,[r1,#0]            ;98
000026  431a              ORRS     r2,r2,r3              ;98
000028  e005              B        |L2.54|
                  |L2.42|
;;;101        {
;;;102            /* Configure Pin to High-resistance intput mode */
;;;103            GPIOx->PXCON &= ( uint32_t ) ( ~GPIO_InitStruct->GPIO_Pin );
00002a  6a03              LDR      r3,[r0,#0x20]
00002c  4393              BICS     r3,r3,r2
00002e  6203              STR      r3,[r0,#0x20]
;;;104            GPIOx->PXPH &= ( uint32_t ) ( ~GPIO_InitStruct->GPIO_Pin );
000030  6c02              LDR      r2,[r0,#0x40]
000032  880b              LDRH     r3,[r1,#0]
000034  439a              BICS     r2,r2,r3
                  |L2.54|
000036  6402              STR      r2,[r0,#0x40]
                  |L2.56|
;;;105        }
;;;106    
;;;107        /* Get GPIOx PXLEV value */
;;;108        tmpreg = GPIOx->PXLEV;
000038  6e03              LDR      r3,[r0,#0x60]
;;;109        /* Query the Pins that needs to be manipulated */
;;;110        for ( tmppos = 0; tmppos < 16; tmppos++ )
00003a  2200              MOVS     r2,#0
00003c  880e              LDRH     r6,[r1,#0]            ;92
;;;111        {
;;;112            tmppin = ( uint32_t ) ( 0x01 << tmppos );
;;;113            if ( ( tmppin & GPIO_InitStruct->GPIO_Pin ) != RESET )
;;;114            {
;;;115                /* Clear the LEVx bits */
;;;116                tmpreg &= ( uint32_t ) ~ ( GPIO_DriveLevel_3 << ( tmppos * 2 ) );
00003e  2703              MOVS     r7,#3
                  |L2.64|
000040  2401              MOVS     r4,#1                 ;112
000042  4094              LSLS     r4,r4,r2              ;112
000044  4226              TST      r6,r4                 ;113
000046  d006              BEQ      |L2.86|
000048  0054              LSLS     r4,r2,#1
00004a  463d              MOV      r5,r7
00004c  40a5              LSLS     r5,r5,r4
00004e  43ab              BICS     r3,r3,r5
;;;117                /* Set LEVx bits according to Drive Level value */
;;;118                tmpreg |= ( uint32_t ) ( GPIO_InitStruct->GPIO_DriveLevel << ( tmppos * 2 ) );
000050  888d              LDRH     r5,[r1,#4]
000052  40a5              LSLS     r5,r5,r4
000054  432b              ORRS     r3,r3,r5
                  |L2.86|
000056  1c52              ADDS     r2,r2,#1
000058  2a10              CMP      r2,#0x10              ;110
00005a  d3f1              BCC      |L2.64|
;;;119            }
;;;120        }
;;;121        /* Store GPIOx PXLEV the new value */
;;;122        GPIOx->PXLEV = tmpreg;
00005c  6603              STR      r3,[r0,#0x60]
;;;123    }
00005e  bdf0              POP      {r4-r7,pc}
;;;124    
                          ENDP


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

                  GPIO_ReadData PROC
;;;229     */
;;;230    uint16_t GPIO_ReadData ( GPIO_TypeDef* GPIOx )
000000  6800              LDR      r0,[r0,#0]
;;;231    {
;;;232        /* Check the parameters */
;;;233        assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;234    
;;;235        return ( uint16_t ) ( GPIOx->PIN );
000002  b280              UXTH     r0,r0
;;;236    }
000004  4770              BX       lr
;;;237    
                          ENDP


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

                  GPIO_ReadDataBit PROC
;;;270     */
;;;271    BitAction GPIO_ReadDataBit ( GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin )
000000  6800              LDR      r0,[r0,#0]
;;;272    {
;;;273        BitAction bitstatus;
;;;274        /* Check the parameters */
;;;275        assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;276        assert_param ( IS_GPIO_PIN ( GPIO_Pin ) );
;;;277    
;;;278        if ( GPIOx->PIN & GPIO_Pin )
000002  4008              ANDS     r0,r0,r1
000004  d000              BEQ      |L4.8|
;;;279        {
;;;280            bitstatus = Bit_SET;
000006  2001              MOVS     r0,#1
                  |L4.8|
;;;281        }
;;;282        else
;;;283        {
;;;284            bitstatus = Bit_RESET;
;;;285        }
;;;286    
;;;287        return bitstatus;
;;;288    }
000008  4770              BX       lr
;;;289    
                          ENDP


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

                  GPIO_ResetBits PROC
;;;368     */
;;;369    void GPIO_ResetBits ( GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin )
000000  b508              PUSH     {r3,lr}
;;;370    {
;;;371        /* Check the parameters */
;;;372        assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;373        assert_param ( IS_GPIO_PIN ( GPIO_Pin ) );
;;;374    
;;;375        __IO uint32_t tmpreg = ( uint32_t ) GPIOx;
000002  9000              STR      r0,[sp,#0]
000004  2000              MOVS     r0,#0
000006  e007              B        |L5.24|
                  |L5.8|
;;;376    
;;;377        while ( GPIO_Pin != 0 )
;;;378        {
;;;379            if ( GPIO_Pin & 0x0001 )
000008  07ca              LSLS     r2,r1,#31
00000a  d001              BEQ      |L5.16|
;;;380            {
;;;381                ( * ( ( uint8_t* ) ( tmpreg ) ) ) = 0;
00000c  9a00              LDR      r2,[sp,#0]
00000e  7010              STRB     r0,[r2,#0]
                  |L5.16|
;;;382            }
;;;383            GPIO_Pin = GPIO_Pin >> 1;
;;;384            tmpreg++;
000010  9a00              LDR      r2,[sp,#0]
000012  0849              LSRS     r1,r1,#1              ;383
000014  1c52              ADDS     r2,r2,#1
000016  9200              STR      r2,[sp,#0]
                  |L5.24|
000018  2900              CMP      r1,#0                 ;377
00001a  d1f5              BNE      |L5.8|
;;;385        }
;;;386    }
00001c  bd08              POP      {r3,pc}
;;;387    
                          ENDP


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

                  GPIO_SetBits PROC
;;;320     */
;;;321    void GPIO_SetBits ( GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin )
000000  b508              PUSH     {r3,lr}
;;;322    {
;;;323        /* Check the parameters */
;;;324        assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;325        assert_param ( IS_GPIO_PIN ( GPIO_Pin ) );
;;;326        __IO uint32_t tmpreg = ( uint32_t ) GPIOx;
;;;327        while ( GPIO_Pin != 0 )
;;;328        {
;;;329            if ( GPIO_Pin & 0x0001 )
;;;330            {
;;;331                ( * ( ( uint8_t* ) ( tmpreg ) ) ) = 1;
000002  9000              STR      r0,[sp,#0]
000004  2001              MOVS     r0,#1
000006  e007              B        |L6.24|
                  |L6.8|
000008  07ca              LSLS     r2,r1,#31             ;329
00000a  d001              BEQ      |L6.16|
00000c  9a00              LDR      r2,[sp,#0]
00000e  7010              STRB     r0,[r2,#0]
                  |L6.16|
;;;332            }
;;;333            GPIO_Pin = GPIO_Pin >> 1;
;;;334            tmpreg++;
000010  9a00              LDR      r2,[sp,#0]
000012  0849              LSRS     r1,r1,#1              ;333
000014  1c52              ADDS     r2,r2,#1
000016  9200              STR      r2,[sp,#0]
                  |L6.24|
000018  2900              CMP      r1,#0                 ;327
00001a  d1f5              BNE      |L6.8|
;;;335        }
;;;336    }
00001c  bd08              POP      {r3,pc}
;;;337    
                          ENDP


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

                  GPIO_SetDriveLevel PROC
;;;160     */
;;;161    void GPIO_SetDriveLevel ( GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_DriveLevel_TypeDef GPIO_DriveLevel )
000000  b5f0              PUSH     {r4-r7,lr}
;;;162    {
;;;163        uint32_t tmppin, tmppos, tmpreg;
;;;164        /* Get GPIOx PXLEV value */
;;;165        tmpreg = GPIOx->PXLEV;
000002  6e04              LDR      r4,[r0,#0x60]
;;;166        /* Query the Pins that needs to be manipulated */
;;;167        for ( tmppos = 0; tmppos < 16; tmppos++ )
000004  2300              MOVS     r3,#0
;;;168        {
;;;169            tmppin = ( uint32_t ) ( 0x01 << tmppos );
000006  2701              MOVS     r7,#1
                  |L7.8|
000008  463d              MOV      r5,r7
00000a  409d              LSLS     r5,r5,r3
;;;170            if ( ( tmppin & GPIO_Pin ) != RESET )
00000c  420d              TST      r5,r1
00000e  d006              BEQ      |L7.30|
;;;171            {
;;;172                /* Clear the LEVx bits */
;;;173                tmpreg &= ( uint32_t ) ~ ( GPIO_DriveLevel_3 << ( tmppos * 2 ) );
000010  005d              LSLS     r5,r3,#1
000012  2603              MOVS     r6,#3
000014  40ae              LSLS     r6,r6,r5
000016  43b4              BICS     r4,r4,r6
000018  4616              MOV      r6,r2
;;;174                /* Set LEVx bits according to Drive Level value */
;;;175                tmpreg |= ( uint32_t ) ( GPIO_DriveLevel << ( tmppos * 2 ) );
00001a  40ae              LSLS     r6,r6,r5
00001c  4334              ORRS     r4,r4,r6
                  |L7.30|
00001e  1c5b              ADDS     r3,r3,#1
000020  2b10              CMP      r3,#0x10              ;167
000022  d3f1              BCC      |L7.8|
;;;176            }
;;;177        }
;;;178        /* Store GPIOx PXLEV the new value */
;;;179        GPIOx->PXLEV = tmpreg;
000024  6604              STR      r4,[r0,#0x60]
;;;180    
;;;181    }
000026  bdf0              POP      {r4-r7,pc}
;;;182    
                          ENDP


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

                  GPIO_TogglePins PROC
;;;492     */
;;;493    void GPIO_TogglePins ( GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin )
000000  b508              PUSH     {r3,lr}
;;;494    {
000002  3010              ADDS     r0,r0,#0x10
                  |L8.4|
;;;495        /* Check the parameters */
;;;496        assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;497        assert_param ( IS_GPIO_PIN ( GPIO_Pin ) );
;;;498        __IO uint32_t tmpreg = ( uint32_t ) GPIOx + ( 0x00000010UL );
;;;499        uint32_t temp = 0;
;;;500        /* Set the GPIOx PIN value  */
;;;501        while ( GPIO_Pin != 0 )
000004  9000              STR      r0,[sp,#0]
000006  2900              CMP      r1,#0
000008  d00a              BEQ      |L8.32|
;;;502        {
;;;503    
;;;504            if ( GPIO_Pin & 0x0001 )
00000a  07c8              LSLS     r0,r1,#31
00000c  d004              BEQ      |L8.24|
;;;505            {
;;;506                temp = ~ ( * ( ( uint8_t* ) ( tmpreg ) ) );
00000e  9800              LDR      r0,[sp,#0]
;;;507                ( * ( ( uint8_t* ) ( tmpreg ) ) ) = temp;
000010  9a00              LDR      r2,[sp,#0]
000012  7800              LDRB     r0,[r0,#0]            ;506
000014  43c0              MVNS     r0,r0                 ;506
000016  7010              STRB     r0,[r2,#0]
                  |L8.24|
;;;508            }
;;;509            GPIO_Pin = GPIO_Pin >> 1;
;;;510            tmpreg++;
000018  9800              LDR      r0,[sp,#0]
00001a  0849              LSRS     r1,r1,#1              ;509
00001c  1c40              ADDS     r0,r0,#1
00001e  e7f1              B        |L8.4|
                  |L8.32|
;;;511        }
;;;512    }
000020  bd08              POP      {r3,pc}
;;;513    
                          ENDP


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

                  GPIO_Write PROC
;;;400     */
;;;401    void GPIO_Write ( GPIO_TypeDef* GPIOx, uint16_t PortVal )
000000  6001              STR      r1,[r0,#0]
;;;402    {
;;;403        /* Check the parameters */
;;;404        assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;405    
;;;406        /*  */
;;;407        GPIOx->PIN = PortVal;
;;;408    }
000002  4770              BX       lr
;;;409    
                          ENDP


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

                  GPIO_WriteBit PROC
;;;444      */
;;;445    void GPIO_WriteBit ( GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction BitVal )
000000  2a00              CMP      r2,#0
;;;446    {
;;;447        /* Check the parameters */
;;;448        assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;449        assert_param ( IS_GET_GPIO_PIN ( GPIO_Pin ) );
;;;450        assert_param ( IS_GPIO_BITACTION ( BitVal ) );
;;;451    
;;;452        if ( BitVal != Bit_RESET )
;;;453        {
;;;454            GPIOx->PIN |= GPIO_Pin;
;;;455        }
;;;456        else
;;;457        {
;;;458            GPIOx->PIN &= ( ~GPIO_Pin ) ;
000002  6802              LDR      r2,[r0,#0]
000004  d001              BEQ      |L10.10|
000006  430a              ORRS     r2,r2,r1              ;454
000008  e000              B        |L10.12|
                  |L10.10|
00000a  438a              BICS     r2,r2,r1
                  |L10.12|
00000c  6002              STR      r2,[r0,#0]            ;454
;;;459        }
;;;460    }
00000e  4770              BX       lr
;;;461    
                          ENDP


;*** Start embedded assembler ***

#line 1 "..\\FWLib\\SC32F1XXX_Lib\\src\\sc32f1xxx_gpio.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___16_sc32f1xxx_gpio_c_f8e8e39a____REV16|
#line 463 "..\\CMSIS\\cmsis_armcc.h"
|__asm___16_sc32f1xxx_gpio_c_f8e8e39a____REV16| PROC
#line 464

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___16_sc32f1xxx_gpio_c_f8e8e39a____REVSH|
#line 478
|__asm___16_sc32f1xxx_gpio_c_f8e8e39a____REVSH| PROC
#line 479

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
