; 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_twi.o --asm_dir=..\List\ --list_dir=..\List\ --depend=..\output\sc32f1xxx_twi.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_twi.crf ..\FWLib\SC32F1XXX_Lib\src\sc32f1xxx_twi.c]
                          THUMB

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

                  TWI_AcknowledgeConfig PROC
;;;190      */
;;;191    void TWI_AcknowledgeConfig ( TWI_TypeDef* TWIx, FunctionalState NewState )
000000  2900              CMP      r1,#0
;;;192    {
;;;193    #if defined (SC32f10xx) || defined (SC32f12xx)  
;;;194        /* Check the parameters */
;;;195        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;196        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;197        if ( NewState != DISABLE )
;;;198        {
;;;199            /* Enable the acknowledgement */
;;;200            TWIx->TWI_CON |= TWI_CON_AA;
;;;201        }
;;;202        else
;;;203        {
;;;204            /* Disable the acknowledgement */
;;;205            TWIx->TWI_CON &= ( uint16_t ) ~TWI_CON_AA;
000002  6801              LDR      r1,[r0,#0]
000004  d002              BEQ      |L1.12|
000006  2202              MOVS     r2,#2                 ;200
000008  4311              ORRS     r1,r1,r2              ;200
00000a  e001              B        |L1.16|
                  |L1.12|
00000c  4a01              LDR      r2,|L1.20|
00000e  4011              ANDS     r1,r1,r2
                  |L1.16|
000010  6001              STR      r1,[r0,#0]            ;200
;;;206        }		
;;;207    #endif
;;;208    }
000012  4770              BX       lr
;;;209    
                          ENDP

                  |L1.20|
                          DCD      0x0000fffd

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

                  TWI_ClearFlag PROC
;;;641     */
;;;642    void TWI_ClearFlag ( TWI_TypeDef* TWIx, TWI_FLAG_TypeDef TWI_FLAG )
000000  6842              LDR      r2,[r0,#4]
;;;643    {
;;;644        /* Check the parameters */
;;;645        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;646        /* Clear the flags */
;;;647        TWIx->TWI_STS |= ( uint16_t ) TWI_FLAG;
000002  430a              ORRS     r2,r2,r1
000004  6042              STR      r2,[r0,#4]
;;;648    }
000006  4770              BX       lr
;;;649    
                          ENDP


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

                  TWI_Cmd PROC
;;;157     */
;;;158    void TWI_Cmd ( TWI_TypeDef* TWIx, FunctionalState NewState )
000000  2900              CMP      r1,#0
;;;159    {
;;;160    #if defined (SC32f10xx) || defined (SC32f12xx)  
;;;161        /* Check the parameters */
;;;162        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;163        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;164        if ( NewState != DISABLE )
;;;165        {
;;;166            /* Enable the TWI Function */
;;;167            TWIx->TWI_CON |= TWI_CON_TWEN;
;;;168        }
;;;169        else
;;;170        {
;;;171            /* Disable the TWI Function */
;;;172            TWIx->TWI_CON &= ( uint16_t ) ~TWI_CON_TWEN;
000002  6801              LDR      r1,[r0,#0]
000004  d002              BEQ      |L3.12|
000006  2280              MOVS     r2,#0x80              ;167
000008  4311              ORRS     r1,r1,r2              ;167
00000a  e001              B        |L3.16|
                  |L3.12|
00000c  4a01              LDR      r2,|L3.20|
00000e  4011              ANDS     r1,r1,r2
                  |L3.16|
000010  6001              STR      r1,[r0,#0]            ;167
;;;173        }		
;;;174    #endif
;;;175    }
000012  4770              BX       lr
;;;176    
                          ENDP

                  |L3.20|
                          DCD      0x0000ff7f

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

                  TWI_DMACmd PROC
;;;699     */
;;;700    void TWI_DMACmd ( TWI_TypeDef* TWIx, TWI_DMAReq_TypeDef TWI_DMAReq, FunctionalState NewState )
000000  2a00              CMP      r2,#0
;;;701    {
;;;702        /* Check the parameters */
;;;703        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;704        assert_param ( IS_TWI_DMAREQ ( TWI_DMAReq ) );
;;;705        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;706        if ( NewState != DISABLE )
;;;707        {
;;;708            /* Enable the selected TWI DMA requests */
;;;709            TWIx->TWI_IDE |= TWI_DMAReq;
;;;710        }
;;;711        else
;;;712        {
;;;713            /* Disable the selected TWI DMA requests */
;;;714            TWIx->TWI_IDE &= ( uint16_t ) ~TWI_DMAReq;
000002  6902              LDR      r2,[r0,#0x10]
000004  d001              BEQ      |L4.10|
000006  430a              ORRS     r2,r2,r1              ;709
000008  e002              B        |L4.16|
                  |L4.10|
00000a  43c9              MVNS     r1,r1
00000c  b289              UXTH     r1,r1
00000e  400a              ANDS     r2,r2,r1
                  |L4.16|
000010  6102              STR      r2,[r0,#0x10]         ;709
;;;715        }
;;;716    }
000012  4770              BX       lr
;;;717    
                          ENDP


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

                  TWI_DeInit PROC
;;;50      */
;;;51     void TWI_DeInit ( TWI_TypeDef* TWIx )
000000  490c              LDR      r1,|L5.52|
;;;52     {
000002  b510              PUSH     {r4,lr}
;;;53     #if defined (SC32f10xx) || defined (SC32f12xx) 
;;;54         /* Check the parameters */
;;;55         assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;56         if ( TWIx == TWI0 )
000004  4288              CMP      r0,r1
000006  d108              BNE      |L5.26|
;;;57         {
;;;58             /* Enable TWI0 reset state */
;;;59             RCC_APB0PeriphResetCmd ( RCC_APB0Periph_TWI0, ENABLE );
000008  2101              MOVS     r1,#1
00000a  2010              MOVS     r0,#0x10
00000c  f7fffffe          BL       RCC_APB0PeriphResetCmd
;;;60             /* Disable TWI0 reset state */
;;;61             RCC_APB0PeriphResetCmd ( RCC_APB0Periph_TWI0, DISABLE );
000010  2100              MOVS     r1,#0
000012  2010              MOVS     r0,#0x10
000014  f7fffffe          BL       RCC_APB0PeriphResetCmd
                  |L5.24|
;;;62         }
;;;63         else if ( TWIx == TWI1 )
;;;64         {
;;;65     
;;;66             /* Enable TWI1 reset state */
;;;67             RCC_APB1PeriphResetCmd ( RCC_APB1Periph_TWI1, ENABLE );
;;;68             /* Disable TWI1 reset state */
;;;69             RCC_APB1PeriphResetCmd ( RCC_APB1Periph_TWI1, DISABLE );
;;;70     
;;;71     		}		
;;;72     #endif
;;;73     			
;;;74         
;;;75     }
000018  bd10              POP      {r4,pc}
                  |L5.26|
00001a  4907              LDR      r1,|L5.56|
00001c  4288              CMP      r0,r1                 ;63
00001e  d1fb              BNE      |L5.24|
000020  2101              MOVS     r1,#1                 ;67
000022  2010              MOVS     r0,#0x10              ;67
000024  f7fffffe          BL       RCC_APB1PeriphResetCmd
000028  2100              MOVS     r1,#0                 ;69
00002a  2010              MOVS     r0,#0x10              ;69
00002c  f7fffffe          BL       RCC_APB1PeriphResetCmd
000030  bd10              POP      {r4,pc}
;;;76     
                          ENDP

000032  0000              DCW      0x0000
                  |L5.52|
                          DCD      0x40020060
                  |L5.56|
                          DCD      0x40021060

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

                  TWI_GeneralCallCmd PROC
;;;223      */
;;;224    void TWI_GeneralCallCmd ( TWI_TypeDef* TWIx, FunctionalState NewState )
000000  2900              CMP      r1,#0
;;;225    {
;;;226    #if defined (SC32f10xx) || defined (SC32f12xx)  
;;;227        /* Check the parameters */
;;;228        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;229        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;230        if ( NewState != DISABLE )
;;;231        {
;;;232            /* Enable general call */
;;;233            TWIx->TWI_ADD |= TWI_ADD_GC;
;;;234        }
;;;235        else
;;;236        {
;;;237            /* Disable general call */
;;;238            TWIx->TWI_ADD &= ( uint16_t ) ~TWI_ADD_GC;
000002  6881              LDR      r1,[r0,#8]
000004  d002              BEQ      |L6.12|
000006  2201              MOVS     r2,#1                 ;233
000008  4311              ORRS     r1,r1,r2              ;233
00000a  e001              B        |L6.16|
                  |L6.12|
00000c  4a01              LDR      r2,|L6.20|
00000e  4011              ANDS     r1,r1,r2
                  |L6.16|
000010  6081              STR      r1,[r0,#8]            ;233
;;;239        }
;;;240    
;;;241    #endif		
;;;242    }
000012  4770              BX       lr
;;;243    
                          ENDP

                  |L6.20|
                          DCD      0x0000fffe

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

                  TWI_GenerateSTART PROC
;;;352      */
;;;353    void TWI_GenerateSTART ( TWI_TypeDef* TWIx, FunctionalState NewState )
000000  2900              CMP      r1,#0
;;;354    {
;;;355    #if defined (SC32f10xx) || defined (SC32f12xx) 
;;;356        /* Check the parameters */
;;;357        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;358        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;359        if ( NewState != DISABLE )
;;;360        {
;;;361            /* Generate a START condition */
;;;362            TWIx->TWI_CON |= TWI_CON_STA;
;;;363        }
;;;364        else
;;;365        {
;;;366            /* Disable the START condition generation */
;;;367            TWIx->TWI_CON &= ( uint16_t ) ~TWI_CON_STA;
000002  6801              LDR      r1,[r0,#0]
000004  d002              BEQ      |L7.12|
000006  2220              MOVS     r2,#0x20              ;362
000008  4311              ORRS     r1,r1,r2              ;362
00000a  e001              B        |L7.16|
                  |L7.12|
00000c  4a01              LDR      r2,|L7.20|
00000e  4011              ANDS     r1,r1,r2
                  |L7.16|
000010  6001              STR      r1,[r0,#0]            ;362
;;;368        }	
;;;369    #endif
;;;370    }
000012  4770              BX       lr
;;;371    
                          ENDP

                  |L7.20|
                          DCD      0x0000ffdf

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

                  TWI_GenerateSTOP PROC
;;;385      */
;;;386    void TWI_GenerateSTOP ( TWI_TypeDef* TWIx, FunctionalState NewState )
000000  2900              CMP      r1,#0
;;;387    {
;;;388    #if defined (SC32f10xx) || defined (SC32f12xx) 
;;;389        /* Check the parameters */
;;;390        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;391        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;392        if ( NewState != DISABLE )
;;;393        {
;;;394            /* Generate a STOP condition */
;;;395            TWIx->TWI_CON |= TWI_CON_STO;
;;;396        }
;;;397        else
;;;398        {
;;;399            /* Disable the STOP condition generation */
;;;400            TWIx->TWI_CON &= ( uint16_t ) ~TWI_CON_STO;
000002  6801              LDR      r1,[r0,#0]
000004  d002              BEQ      |L8.12|
000006  2210              MOVS     r2,#0x10              ;395
000008  4311              ORRS     r1,r1,r2              ;395
00000a  e001              B        |L8.16|
                  |L8.12|
00000c  4a01              LDR      r2,|L8.20|
00000e  4011              ANDS     r1,r1,r2
                  |L8.16|
000010  6001              STR      r1,[r0,#0]            ;395
;;;401        }
;;;402    		
;;;403    #endif
;;;404    }
000012  4770              BX       lr
;;;405    
                          ENDP

                  |L8.20|
                          DCD      0x0000ffef

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

                  TWI_GetFlagStatus PROC
;;;608     */
;;;609    FlagStatus TWI_GetFlagStatus ( TWI_TypeDef* TWIx, TWI_FLAG_TypeDef TWI_FLAG )
000000  4602              MOV      r2,r0
;;;610    {
;;;611        ITStatus bitstatus = RESET;
;;;612        /* Check the parameters */
;;;613        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;614        assert_param ( IS_TWI_FLAG ( TWI_FLAG ) );
;;;615        if ( ( TWIx->TWI_STS & TWI_FLAG ) != ( uint16_t ) RESET )
000002  6852              LDR      r2,[r2,#4]
000004  2000              MOVS     r0,#0                 ;611
000006  420a              TST      r2,r1
000008  d000              BEQ      |L9.12|
;;;616        {
;;;617            bitstatus = SET;
00000a  2001              MOVS     r0,#1
                  |L9.12|
;;;618        }
;;;619        else
;;;620        {
;;;621            bitstatus = RESET;
;;;622        }
;;;623        return bitstatus;
;;;624    }
00000c  4770              BX       lr
;;;625    
                          ENDP


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

                  TWI_GetNbytes PROC
;;;311      */
;;;312    uint8_t TWI_GetNbytes ( TWI_TypeDef* TWIx )
000000  6840              LDR      r0,[r0,#4]
;;;313    {
;;;314    #if defined (SC32f10xx) || defined (SC32f12xx) 
;;;315        uint8_t tmpnum;
;;;316    
;;;317        /* Check the parameters */
;;;318        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;319    
;;;320        tmpnum = ( uint8_t ) ( TWIx->TWI_STS >> TWI_STS_NBYTES_Pos );
000002  0200              LSLS     r0,r0,#8
000004  0e00              LSRS     r0,r0,#24
;;;321    
;;;322        return tmpnum;
;;;323    	
;;;324    #endif
;;;325    }
000006  4770              BX       lr
;;;326    
                          ENDP


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

                  TWI_GetStateMachine PROC
;;;672     */
;;;673    TWI_StateMachine_TypeDef TWI_GetStateMachine ( TWI_TypeDef* TWIx )
000000  6840              LDR      r0,[r0,#4]
;;;674    {
;;;675    #if defined (SC32f10xx) || defined (SC32f12xx) 
;;;676        /* Check the parameters */
;;;677        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;678    
;;;679        return ( TWI_StateMachine_TypeDef ) ( TWIx->TWI_STS & TWI_STS_STATE );
000002  2107              MOVS     r1,#7
000004  0209              LSLS     r1,r1,#8
000006  4008              ANDS     r0,r0,r1
;;;680    #endif
;;;681    }
000008  4770              BX       lr
;;;682    
                          ENDP


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

                  TWI_ITConfig PROC
;;;569     */
;;;570    void TWI_ITConfig ( TWI_TypeDef* TWIx, uint16_t TWI_IT, FunctionalState NewState )
000000  2a00              CMP      r2,#0
;;;571    {
;;;572        /* Check the parameters */
;;;573        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;574        assert_param ( IS_TWI_IT ( TWI_IT ) );
;;;575        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;576        if ( NewState != DISABLE )
;;;577        {
;;;578            /* Enable the Interrupt sources */
;;;579            TWIx->TWI_IDE |= TWI_IT;
;;;580        }
;;;581        else
;;;582        {
;;;583            /* Disable the Interrupt sources */
;;;584            TWIx->TWI_IDE &= ( uint16_t ) ~TWI_IT;
000002  6902              LDR      r2,[r0,#0x10]
000004  d001              BEQ      |L12.10|
000006  430a              ORRS     r2,r2,r1              ;579
000008  e002              B        |L12.16|
                  |L12.10|
00000a  43c9              MVNS     r1,r1
00000c  b289              UXTH     r1,r1
00000e  400a              ANDS     r2,r2,r1
                  |L12.16|
000010  6102              STR      r2,[r0,#0x10]         ;579
;;;585        }
;;;586    }
000012  4770              BX       lr
;;;587    
                          ENDP


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

                  TWI_Init PROC
;;;104     */
;;;105    void TWI_Init ( TWI_TypeDef* TWIx, TWI_InitTypeDef* TWI_InitStruct )
000000  b510              PUSH     {r4,lr}
;;;106    {
;;;107    #if defined (SC32f10xx) || defined (SC32f12xx)   
;;;108        uint32_t tmpreg;
;;;109        /* Check the parameters */
;;;110        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;111        assert_param ( IS_TWI_ACK ( TWI_InitStruct->TWI_Ack ) );
;;;112        assert_param ( IS_TWI_PRESCALER ( TWI_InitStruct->TWI_Prescaler ) );
;;;113        assert_param ( IS_TWI_STRETCH ( TWI_InitStruct->TWI_Stretch ) );
;;;114        assert_param ( IS_TWI_GENERALCALL ( TWI_InitStruct->TWI_GeneralCall ) );
;;;115        /*---------------------------- TWIx TWI_CON Configuration ------------------------*/
;;;116        /* Get the TWIx TWI_CON value */
;;;117        tmpreg = TWIx->TWI_CON;
000002  6803              LDR      r3,[r0,#0]
;;;118        /* Clear AA, TWCK, STRETCH bits */
;;;119        tmpreg &= ( uint32_t ) ~ ( TWI_CON_AA | TWI_CON_SPOS | TWI_CON_STRETCH );
000004  4a09              LDR      r2,|L13.44|
;;;120        /* Configure TWIx: Ack, Clock division and Slave Clock Stretch */
;;;121        /* Set AA bits to TWI_Ack value */
;;;122        /* Set TWCK bits according to TWI_DataSize value */
;;;123        /* Set STRETCH bit according to TWI_Stretch value */
;;;124        tmpreg |= ( uint32_t ) ( TWI_InitStruct->TWI_Ack | TWI_InitStruct->TWI_Prescaler |
000006  884c              LDRH     r4,[r1,#2]
000008  4013              ANDS     r3,r3,r2              ;119
00000a  880a              LDRH     r2,[r1,#0]
00000c  4322              ORRS     r2,r2,r4
00000e  888c              LDRH     r4,[r1,#4]
000010  431c              ORRS     r4,r4,r3
000012  4322              ORRS     r2,r2,r4
;;;125                                 TWI_InitStruct->TWI_Stretch );
;;;126        /* Write to TWIx TWI_CON */
;;;127        TWIx->TWI_CON = tmpreg;
000014  6002              STR      r2,[r0,#0]
;;;128        /*---------------------------- TWIx TWI_ADD Configuration ------------------------*/
;;;129        /* Get the TWIx TWI_ADD value */
;;;130        tmpreg = TWIx->TWI_ADD;
000016  6882              LDR      r2,[r0,#8]
;;;131        /* Clear GC, TWCK, STRETCH bits */
;;;132        tmpreg &= ( uint32_t ) ~ ( TWI_ADD_GC | TWI_ADD_TWA );
;;;133        /* Configure TWIx: General Call and Slave Slave Address */
;;;134        /* Set AA bits to TWI_GC value */
;;;135        /* Set TWA according to TWI_SlaveAdress value */
;;;136        tmpreg |= ( uint32_t ) ( TWI_InitStruct->TWI_GeneralCall | ( ( TWI_InitStruct->TWI_SlaveAdress << 1 ) & 0xFE ) );
000018  88cb              LDRH     r3,[r1,#6]
00001a  7a09              LDRB     r1,[r1,#8]
00001c  0a12              LSRS     r2,r2,#8              ;132
00001e  0212              LSLS     r2,r2,#8              ;132
000020  0649              LSLS     r1,r1,#25
000022  0e09              LSRS     r1,r1,#24
000024  4311              ORRS     r1,r1,r2
000026  430b              ORRS     r3,r3,r1
;;;137    
;;;138        /* Write to TWIx TWI_ADD */
;;;139        TWIx->TWI_ADD = tmpreg;
000028  6083              STR      r3,[r0,#8]
;;;140    
;;;141    #endif
;;;142    }
00002a  bd10              POP      {r4,pc}
;;;143    
                          ENDP

                  |L13.44|
                          DCD      0xffff3ffc

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

                  TWI_PinRemapConfig PROC
;;;511     */
;;;512    void TWI_PinRemapConfig ( TWI_TypeDef* TWIx, TWI_PinRemap_TypeDef TWI_Remap )
000000  6802              LDR      r2,[r0,#0]
;;;513    {
;;;514    #if defined (SC32f10xx) || defined (SC32f12xx)   
;;;515        uint32_t tmpreg ;
;;;516        /* Check the parameters */
;;;517        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;518        if ( TWIx == TWI0 )
;;;519        {
;;;520            assert_param ( IS_TWI_LIST1_PINREMAP ( TWI_Remap ) );
;;;521        }
;;;522        else
;;;523        {
;;;524            assert_param ( IS_TWI_LIST2_PINREMAP ( TWI_Remap ) );
;;;525        }
;;;526    
;;;527        tmpreg = TWIx->TWI_CON;
;;;528    
;;;529        tmpreg &= ( uint32_t ) ( ~TWI_CON_SPOS );
000002  2303              MOVS     r3,#3
000004  039b              LSLS     r3,r3,#14
000006  439a              BICS     r2,r2,r3
;;;530    
;;;531        tmpreg |= TWI_Remap;
000008  430a              ORRS     r2,r2,r1
;;;532    
;;;533        TWIx->TWI_CON = tmpreg;
00000a  6002              STR      r2,[r0,#0]
;;;534    
;;;535    #endif	
;;;536    }
00000c  4770              BX       lr
;;;537    
                          ENDP


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

                  TWI_ReceiveData PROC
;;;478     */
;;;479    uint8_t TWI_ReceiveData ( TWI_TypeDef* TWIx )
000000  68c0              LDR      r0,[r0,#0xc]
;;;480    {
;;;481        /* Check the parameters */
;;;482        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;483        /* Receive Data */
;;;484        return ( uint8_t ) TWIx->TWI_DATA;
000002  b2c0              UXTB     r0,r0
;;;485    }
000004  4770              BX       lr
;;;486    
                          ENDP


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

                  TWI_Send7bitAddress PROC
;;;420      */
;;;421    void TWI_Send7bitAddress ( TWI_TypeDef* TWIx, uint8_t Address, TWI_Command_TypeDef TWI_Command )
000000  0649              LSLS     r1,r1,#25
;;;422    {
;;;423        /* Check the parameters */
;;;424        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;425        assert_param ( IS_TWI_COMMAND ( TWI_Command ) );
;;;426        Address = ( Address << 1 );
000002  0e09              LSRS     r1,r1,#24
;;;427        /* Test on the direction to set/reset the read/write bit */
;;;428        if ( TWI_Command != TWI_Command_Write )
000004  2a00              CMP      r2,#0
000006  d002              BEQ      |L16.14|
;;;429        {
;;;430            /* Set the address bit0 for read */
;;;431            Address |= TWI_Command_Read;
000008  2201              MOVS     r2,#1
00000a  4311              ORRS     r1,r1,r2
00000c  e001              B        |L16.18|
                  |L16.14|
;;;432        }
;;;433        else
;;;434        {
;;;435            /* Reset the address bit0 for write */
;;;436            Address &= ( uint8_t ) ~ ( ( uint8_t ) TWI_Command_Read );
00000e  0849              LSRS     r1,r1,#1
000010  0049              LSLS     r1,r1,#1
                  |L16.18|
;;;437        }
;;;438    
;;;439        /* Send the address */
;;;440        TWIx->TWI_DATA = Address;
000012  60c1              STR      r1,[r0,#0xc]
;;;441    }
000014  4770              BX       lr
;;;442    
                          ENDP


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

                  TWI_SendData PROC
;;;459     */
;;;460    void TWI_SendData ( TWI_TypeDef* TWIx, uint8_t Data )
000000  60c1              STR      r1,[r0,#0xc]
;;;461    {
;;;462        /* Check the parameters */
;;;463        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;464        /* Transmit Data */
;;;465        TWIx->TWI_DATA = Data;
;;;466    }
000002  4770              BX       lr
;;;467    
                          ENDP


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

                  TWI_SetNbytes PROC
;;;290      */
;;;291    void TWI_SetNbytes ( TWI_TypeDef* TWIx, uint8_t Nbytes )
000000  0409              LSLS     r1,r1,#16
;;;292    {
;;;293    #if defined (SC32f10xx) || defined (SC32f12xx)  
;;;294        /* Check the parameters */
;;;295        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;296    
;;;297        TWIx->TWI_STS = ( uint32_t ) ( Nbytes << TWI_STS_NBYTES_Pos );
000002  6041              STR      r1,[r0,#4]
;;;298    #endif
;;;299    }
000004  4770              BX       lr
;;;300    
                          ENDP


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

                  TWI_StretchClockConfig PROC
;;;257      */
;;;258    void TWI_StretchClockConfig ( TWI_TypeDef* TWIx, FunctionalState NewState )
000000  2900              CMP      r1,#0
;;;259    {
;;;260    #if defined (SC32f10xx) || defined (SC32f12xx)  
;;;261        /* Check the parameters */
;;;262        assert_param ( IS_TWI_ALL_PERIPH ( TWIx ) );
;;;263        assert_param ( IS_FUNCTIONAL_STATE ( NewState ) );
;;;264        if ( NewState == DISABLE )
;;;265        {
;;;266            /* Enable the selected TWI Clock stretching */
;;;267            TWIx->TWI_CON |= TWI_CON_STRETCH;
;;;268        }
;;;269        else
;;;270        {
;;;271            /* Disable the selected TWI Clock stretching */
;;;272            TWIx->TWI_CON &= ( uint16_t ) ~ ( ( uint16_t ) TWI_CON_STRETCH );
000002  6801              LDR      r1,[r0,#0]
000004  d003              BEQ      |L19.14|
000006  4a03              LDR      r2,|L19.20|
000008  4011              ANDS     r1,r1,r2
                  |L19.10|
00000a  6001              STR      r1,[r0,#0]            ;267
;;;273        }
;;;274    		
;;;275    #endif
;;;276    }
00000c  4770              BX       lr
                  |L19.14|
00000e  2201              MOVS     r2,#1                 ;267
000010  4311              ORRS     r1,r1,r2              ;267
000012  e7fa              B        |L19.10|
;;;277    
                          ENDP

                  |L19.20|
                          DCD      0x0000fffe

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

                  TWI_StructInit PROC
;;;81       */
;;;82     void TWI_StructInit ( TWI_InitTypeDef* TWI_InitStruct )
000000  2102              MOVS     r1,#2
;;;83     {
;;;84         /* Set the default configuration */
;;;85         TWI_InitStruct->TWI_Ack = TWI_Ack_Enable;
000002  8001              STRH     r1,[r0,#0]
;;;86         TWI_InitStruct->TWI_Prescaler = 0x00;
000004  2100              MOVS     r1,#0
000006  8041              STRH     r1,[r0,#2]
;;;87         TWI_InitStruct->TWI_Stretch = 0;
000008  8081              STRH     r1,[r0,#4]
;;;88     
;;;89         TWI_InitStruct->TWI_GeneralCall = TWI_GeneralCall_Disable;
00000a  80c1              STRH     r1,[r0,#6]
;;;90         TWI_InitStruct->TWI_SlaveAdress = 0x00;
00000c  6081              STR      r1,[r0,#8]
;;;91     }
00000e  4770              BX       lr
;;;92     
                          ENDP


;*** Start embedded assembler ***

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

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
