; 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:\Users\SOC\AppData\Local\Arm\Packs\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
;;;53      */
;;;54     void GPIO_DeInit ( GPIO_TypeDef* GPIOx )
000000  6a01              LDR      r1,[r0,#0x20]
;;;55     {
;;;56         /* Check the parameters */
;;;57         assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;58     
;;;59         /* Deinitializes the GPIOx PXCON register to their default reset values. */
;;;60         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]
;;;61         /* Deinitializes the GPIOx PXPH register to their default reset values. */
;;;62         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]
;;;63         /* Deinitializes the GPIOx PIN register to their default reset values. */
;;;64         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]
;;;65         /* Deinitializes the GPIOx PXLEV register to their default reset values. */
;;;66         GPIOx->PXLEV &= ( uint32_t ) 0x00000000;
000018  6e01              LDR      r1,[r0,#0x60]
00001a  2100              MOVS     r1,#0
00001c  6601              STR      r1,[r0,#0x60]
;;;67     }
00001e  4770              BX       lr
;;;68     
                          ENDP


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

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


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

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


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

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


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

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


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

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


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

                  GPIO_SetDriveLevel PROC
;;;161     */
;;;162    void GPIO_SetDriveLevel ( GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_DriveLevel_TypeDef GPIO_DriveLevel )
000000  b5f0              PUSH     {r4-r7,lr}
;;;163    {
;;;164        uint32_t tmppin, tmppos, tmpreg;
;;;165        /* Get GPIOx PXLEV value */
;;;166        tmpreg = GPIOx->PXLEV;
000002  6e04              LDR      r4,[r0,#0x60]
;;;167        /* Query the Pins that needs to be manipulated */
;;;168        for ( tmppos = 0; tmppos < 16; tmppos++ )
000004  2300              MOVS     r3,#0
;;;169        {
;;;170            tmppin = ( uint32_t ) ( 0x01 << tmppos );
000006  2701              MOVS     r7,#1
                  |L7.8|
000008  463d              MOV      r5,r7
00000a  409d              LSLS     r5,r5,r3
;;;171            if ( ( tmppin & GPIO_Pin ) != RESET )
00000c  420d              TST      r5,r1
00000e  d006              BEQ      |L7.30|
;;;172            {
;;;173                /* Clear the LEVx bits */
;;;174                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
;;;175                /* Set LEVx bits according to Drive Level value */
;;;176                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              ;168
000022  d3f1              BCC      |L7.8|
;;;177            }
;;;178        }
;;;179        /* Store GPIOx PXLEV the new value */
;;;180        GPIOx->PXLEV = tmpreg;
000024  6604              STR      r4,[r0,#0x60]
;;;181    
;;;182    }
000026  bdf0              POP      {r4-r7,pc}
;;;183    
                          ENDP


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

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


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

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


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

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