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


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

                  GPIO_ReadData PROC
;;;236     */
;;;237    uint16_t GPIO_ReadData ( GPIO_TypeDef* GPIOx )
000000  6800              LDR      r0,[r0,#0]
;;;238    {
;;;239        /* Check the parameters */
;;;240        assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;241    
;;;242        return ( uint16_t ) ( GPIOx->PIN );
000002  b280              UXTH     r0,r0
;;;243    }
000004  4770              BX       lr
;;;244    
                          ENDP


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

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


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

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


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

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


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

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


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

                  GPIO_TogglePins PROC
;;;511     */
;;;512    void GPIO_TogglePins ( GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin )
000000  b508              PUSH     {r3,lr}
;;;513    {
000002  3010              ADDS     r0,r0,#0x10
                  |L8.4|
;;;514        /* Check the parameters */
;;;515        assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;516        assert_param ( IS_GPIO_PIN ( GPIO_Pin ) );
;;;517        __IO uint32_t tmpreg = ( uint32_t ) GPIOx + ( 0x00000010UL );
;;;518        uint32_t temp = 0;
;;;519        /* Set the GPIOx PIN value  */
;;;520        while ( GPIO_Pin != 0 )
000004  9000              STR      r0,[sp,#0]
000006  2900              CMP      r1,#0
000008  d00a              BEQ      |L8.32|
;;;521        {
;;;522    
;;;523            if ( GPIO_Pin & 0x0001 )
00000a  07c8              LSLS     r0,r1,#31
00000c  d004              BEQ      |L8.24|
;;;524            {
;;;525                temp = ~ ( * ( ( uint8_t* ) ( tmpreg ) ) );
00000e  9800              LDR      r0,[sp,#0]
;;;526                ( * ( ( uint8_t* ) ( tmpreg ) ) ) = temp;
000010  9a00              LDR      r2,[sp,#0]
000012  7800              LDRB     r0,[r0,#0]            ;525
000014  43c0              MVNS     r0,r0                 ;525
000016  7010              STRB     r0,[r2,#0]
                  |L8.24|
;;;527            }
;;;528            GPIO_Pin = GPIO_Pin >> 1;
;;;529            tmpreg++;
000018  9800              LDR      r0,[sp,#0]
00001a  0849              LSRS     r1,r1,#1              ;528
00001c  1c40              ADDS     r0,r0,#1
00001e  e7f1              B        |L8.4|
                  |L8.32|
;;;530        }
;;;531    }
000020  bd08              POP      {r3,pc}
;;;532    
                          ENDP


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

                  GPIO_Write PROC
;;;415     */
;;;416    void GPIO_Write ( GPIO_TypeDef* GPIOx, uint16_t PortVal )
000000  6001              STR      r1,[r0,#0]
;;;417    {
;;;418        /* Check the parameters */
;;;419        assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;420    
;;;421        /*  */
;;;422        GPIOx->PIN = PortVal;
;;;423    }
000002  4770              BX       lr
;;;424    
                          ENDP


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

                  GPIO_WriteBit PROC
;;;461      */
;;;462    void GPIO_WriteBit ( GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction BitVal )
000000  2a00              CMP      r2,#0
;;;463    {
;;;464        /* Check the parameters */
;;;465        assert_param ( IS_GPIO_ALL_PERIPH ( GPIOx ) );
;;;466        assert_param ( IS_GET_GPIO_PIN ( GPIO_Pin ) );
;;;467        assert_param ( IS_GPIO_BITACTION ( BitVal ) );
;;;468    
;;;469        if ( BitVal != Bit_RESET )
;;;470        {
;;;471            GPIOx->PIN |= GPIO_Pin;
;;;472        }
;;;473        else
;;;474        {
;;;475            GPIOx->PIN &= ( ~GPIO_Pin ) ;
000002  6802              LDR      r2,[r0,#0]
000004  d001              BEQ      |L10.10|
000006  430a              ORRS     r2,r2,r1              ;471
000008  e000              B        |L10.12|
                  |L10.10|
00000a  438a              BICS     r2,r2,r1
                  |L10.12|
00000c  6002              STR      r2,[r0,#0]            ;471
;;;476        }
;;;477    }
00000e  4770              BX       lr
;;;478    
                          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 ***
