; 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\twi_slave_dma.o --asm_dir=..\List\ --list_dir=..\List\ --depend=..\output\twi_slave_dma.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\twi_slave_dma.crf ..\Apps\TWI_Slave_DMA.c]
                          THUMB

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

                          REQUIRE _printf_percent
                          REQUIRE _printf_x
                          REQUIRE _printf_longlong_hex
                  TWI_Slave_DMA_Function PROC
;;;26     
;;;27     void TWI_Slave_DMA_Function(void)
000000  b086              SUB      sp,sp,#0x18
;;;28     {
;;;29     
;;;30     #if (TWI_Mode == 0)
;;;31      #if defined(SC32f12xx)
;;;32       GPIO_InitTypeDef GPIO_InitStruct;
;;;33     	GPIO_InitStruct.GPIO_Pin = GPIO_Pin_12;
;;;34       GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT_PP;
;;;35       GPIO_Init(GPIOB, &GPIO_InitStruct);
;;;36      #elif defined(SC32f10xx)
;;;37       GPIO_InitTypeDef GPIO_InitStruct;
;;;38     	GPIO_InitStruct.GPIO_Pin = GPIO_Pin_13;
000002  2001              MOVS     r0,#1
000004  0340              LSLS     r0,r0,#13
000006  4669              MOV      r1,sp
000008  8188              STRH     r0,[r1,#0xc]
;;;39       GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT_PP;
00000a  2402              MOVS     r4,#2
00000c  81cc              STRH     r4,[r1,#0xe]
;;;40       GPIO_Init(GPIOA, &GPIO_InitStruct);
00000e  a903              ADD      r1,sp,#0xc
000010  4853              LDR      r0,|L1.352|
000012  f7fffffe          BL       GPIO_Init
;;;41     
;;;42      #endif  
;;;43      
;;;44       TWI_InitTypeDef TWI_InitStruct; //定义TWI初始化结构体变量
;;;45       
;;;46       RCC_APB1Cmd(ENABLE);  //TWI1外设挂载在APB1时钟上
000016  2001              MOVS     r0,#1
000018  f7fffffe          BL       RCC_APB1Cmd
;;;47     #if defined(SC32f10xx)||defined(SC32f12xx)
;;;48       RCC_APB1PeriphClockCmd(RCC_APB1Periph_TWI1, ENABLE);
00001c  2101              MOVS     r1,#1
00001e  2010              MOVS     r0,#0x10
000020  f7fffffe          BL       RCC_APB1PeriphClockCmd
;;;49     #endif
;;;50       /* 结构体成员初始化 */
;;;51       TWI_StructInit(&TWI_InitStruct);
000024  4668              MOV      r0,sp
000026  f7fffffe          BL       TWI_StructInit
;;;52       
;;;53       /* TWI1配置为主机*/
;;;54       {
;;;55         TWI_InitStruct.TWI_Ack = TWI_Ack_Enable;	//回应ACK
00002a  4669              MOV      r1,sp
00002c  800c              STRH     r4,[r1,#0]
;;;56     #if defined(SC32f10xx)||defined(SC32f12xx)
;;;57         TWI_InitStruct.TWI_Prescaler = TWI_PRESCALER_64;
00002e  2003              MOVS     r0,#3
000030  0240              LSLS     r0,r0,#9
000032  8048              STRH     r0,[r1,#2]
;;;58     #endif
;;;59         TWI_InitStruct.TWI_Stretch = TWI_Stretch_Enable;
000034  2001              MOVS     r0,#1
;;;60         /*  根据结构体配置初始化串口 */
;;;61         TWI_Init(TWI1, &TWI_InitStruct);
000036  4c4b              LDR      r4,|L1.356|
000038  8088              STRH     r0,[r1,#4]            ;59
00003a  4620              MOV      r0,r4
00003c  f7fffffe          BL       TWI_Init
;;;62        
;;;63     
;;;64     #if defined(SC32f10xx)||defined(SC32f12xx)
;;;65         /* 使能TWI中断 */
;;;66         TWI_ITConfig(TWI1, TWI_IT_INT, ENABLE);
000040  2201              MOVS     r2,#1
000042  4611              MOV      r1,r2
000044  4620              MOV      r0,r4
000046  f7fffffe          BL       TWI_ITConfig
00004a  2101              MOVS     r1,#1
00004c  4a46              LDR      r2,|L1.360|
00004e  0609              LSLS     r1,r1,#24
000050  6011              STR      r1,[r2,#0]
;;;67         NVIC_EnableIRQ(TWI1_IRQn);
;;;68     #endif
;;;69     #if defined(SC32f12xx)
;;;70        TWI_PinRemapConfig(TWI0,TWI_PinRemap_A);
;;;71     #endif
;;;72         /* 使能接收发送口 */
;;;73         TWI_Cmd(TWI1, ENABLE);
000052  2101              MOVS     r1,#1
000054  4620              MOV      r0,r4
000056  f7fffffe          BL       TWI_Cmd
00005a  2500              MOVS     r5,#0
00005c  4626              MOV      r6,r4                 ;61
                  |L1.94|
;;;74       }
;;;75     #elif(TWI_Mode == 1)
;;;76       
;;;77       TWI_InitTypeDef TWI_InitStruct; //定义TWI初始化结构体变量
;;;78       DMA_InitTypeDef DMA_InitStruct; //定义DMA初始化结构体变量
;;;79       
;;;80       /* 使能DMA和TWI0的时钟 */
;;;81       RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA, ENABLE);
;;;82       RCC_APB0Cmd(ENABLE);  //TWI0外设挂载在APB0时钟上
;;;83     #if defined(SC32f10xx)||defined(SC32f12xx)
;;;84       RCC_APB0PeriphClockCmd(RCC_APB0Periph_TWI0, ENABLE);
;;;85     #endif
;;;86       /* 结构体成员初始化 */
;;;87       TWI_StructInit(&TWI_InitStruct);
;;;88       DMA_StructInit(&DMA_InitStruct);
;;;89       
;;;90       /* TWI0从机*/
;;;91       {
;;;92         /* 配置TWI0作为从机 */
;;;93         TWI_InitStruct.TWI_Ack = TWI_Ack_Enable;	//回应ACK
;;;94         TWI_InitStruct.TWI_GeneralCall = TWI_GeneralCall_Disable;	//不响应通用地址
;;;95         TWI_InitStruct.TWI_SlaveAdress = 0x12;	//配置从机地址
;;;96         TWI_InitStruct.TWI_Stretch = TWI_Stretch_Enable;
;;;97         /*  根据结构体配置初始化串口 */
;;;98         TWI_Init(TWI0, &TWI_InitStruct);
;;;99         /* 使能TWI中断 */
;;;100    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;101        TWI_ITConfig(TWI0, TWI_IT_INT, ENABLE);
;;;102        NVIC_EnableIRQ(TWI0_IRQn);
;;;103    #endif
;;;104        /* 使能TWI DMA */
;;;105        TWI_DMACmd(TWI0, TWI_DMAReq_TX, ENABLE);
;;;106        /* 使能接收发送口 */
;;;107        TWI_Cmd(TWI0, ENABLE);
;;;108      }
;;;109      
;;;110      /* TWI0从机DMA发送配置 */
;;;111      {
;;;112        DMA_InitStruct.DMA_BufferSize = 16;	//DMA搬运数量为16个
;;;113        DMA_InitStruct.DMA_CircularMode = DMA_CircularMode_Enable;	//关闭循环模式
;;;114        DMA_InitStruct.DMA_DataSize = DMA_DataSize_Byte;	//传输宽度为字节
;;;115        DMA_InitStruct.DMA_SourceMode = DMA_SourceMode_INC_CIRC;	//源地址循环递增
;;;116        DMA_InitStruct.DMA_TargetMode = DMA_TargetMode_FIXED;	//目标地址固定
;;;117        DMA_InitStruct.DMA_SrcAddress = (uint32_t)Slave_DMA_TWI0_SendData;
;;;118        DMA_InitStruct.DMA_DstAddress = (uint32_t)&TWI0->TWI_DATA;
;;;119    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;120        DMA_InitStruct.DMA_Request = DMA_Request_TWI0_TX;	//TWI0 发送触发DMA0
;;;121    #endif
;;;122        DMA_InitStruct.DMA_Priority = DMA_Priority_HIGH;	//设置优先级为高
;;;123        DMA_Init(DMA0, &DMA_InitStruct);
;;;124        DMA_Cmd(DMA0, ENABLE);	//使能DMA0
;;;125      }
;;;126      
;;;127      /* TWI0从机DMA接收配置 */
;;;128      {
;;;129        DMA_InitStruct.DMA_BufferSize = 16;	//DMA搬运数量为16个
;;;130        DMA_InitStruct.DMA_CircularMode = DMA_CircularMode_Enable;	//关闭循环模式
;;;131        DMA_InitStruct.DMA_DataSize = DMA_DataSize_Byte;	//传输宽度为字节
;;;132        DMA_InitStruct.DMA_SourceMode = DMA_SourceMode_FIXED;	//源地址固定
;;;133        DMA_InitStruct.DMA_TargetMode = DMA_TargetMode_INC_CIRC;	//目标地址循环递增
;;;134        DMA_InitStruct.DMA_SrcAddress = (uint32_t)&TWI0->TWI_DATA;
;;;135        DMA_InitStruct.DMA_DstAddress = (uint32_t)Slave_DMA_TWI0_ReceiveData;
;;;136    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;137        DMA_InitStruct.DMA_Request = DMA_Request_TWI0_RX;	//TWI0 发送触发DMA1
;;;138    #endif
;;;139        DMA_InitStruct.DMA_Priority = DMA_Priority_HIGH;	//设置优先级为高
;;;140        DMA_Init(DMA1, &DMA_InitStruct);
;;;141        DMA_Cmd(DMA1, ENABLE);	//使能DMA1
;;;142      }
;;;143    
;;;144    #endif
;;;145      
;;;146      while(1)
;;;147      {
;;;148    #if (TWI_Mode == 0)
;;;149        
;;;150        /* 主机发送 */
;;;151        TWI_GenerateSTART(TWI1, ENABLE);
00005e  2101              MOVS     r1,#1
000060  4630              MOV      r0,r6
000062  f7fffffe          BL       TWI_GenerateSTART
;;;152        {
;;;153          uint32_t delay_time = 100;
000066  2064              MOVS     r0,#0x64
                  |L1.104|
000068  1e40              SUBS     r0,r0,#1
;;;154          while(delay_time--);
00006a  d2fd              BCS      |L1.104|
;;;155        }
;;;156        while(TWI1_Flag == RESET);	//等待起始信号发送完成
00006c  4c3f              LDR      r4,|L1.364|
                  |L1.110|
00006e  7820              LDRB     r0,[r4,#0]  ; TWI1_Flag
000070  2800              CMP      r0,#0
000072  d0fc              BEQ      |L1.110|
;;;157        TWI1_Flag = RESET;
000074  7025              STRB     r5,[r4,#0]
;;;158        
;;;159        TWI_Send7bitAddress(TWI1, 0x12, TWI_Command_Write);
000076  2200              MOVS     r2,#0
000078  2112              MOVS     r1,#0x12
00007a  4630              MOV      r0,r6
00007c  f7fffffe          BL       TWI_Send7bitAddress
                  |L1.128|
;;;160        while(TWI1_Flag == RESET);	//等待地址发送完成
000080  7820              LDRB     r0,[r4,#0]  ; TWI1_Flag
000082  2800              CMP      r0,#0
000084  d0fc              BEQ      |L1.128|
;;;161        TWI1_Flag = RESET;
000086  7025              STRB     r5,[r4,#0]
;;;162        
;;;163        while(TWI1_Num < 16)
;;;164        {
;;;165          /* TWI1没有DMA，需要手动发送数据 */
;;;166          TWI_SendData(TWI1, Slave_DMA_TWI1_SendData[TWI1_Num]);
000088  4f38              LDR      r7,|L1.364|
00008a  1cbf              ADDS     r7,r7,#2
00008c  e00a              B        |L1.164|
                  |L1.142|
00008e  5c39              LDRB     r1,[r7,r0]
000090  4630              MOV      r0,r6
000092  f7fffffe          BL       TWI_SendData
                  |L1.150|
;;;167          while(TWI1_Flag == RESET);	//等待数据发送完成
000096  7820              LDRB     r0,[r4,#0]  ; TWI1_Flag
000098  2800              CMP      r0,#0
00009a  d0fc              BEQ      |L1.150|
;;;168          TWI1_Flag = RESET;
00009c  7025              STRB     r5,[r4,#0]
;;;169          TWI1_Num ++;
00009e  7860              LDRB     r0,[r4,#1]  ; TWI1_Num
0000a0  1c40              ADDS     r0,r0,#1
0000a2  7060              STRB     r0,[r4,#1]
                  |L1.164|
0000a4  7860              LDRB     r0,[r4,#1]            ;163  ; TWI1_Num
0000a6  2810              CMP      r0,#0x10              ;163
0000a8  d3f1              BCC      |L1.142|
;;;170        }
;;;171        TWI1_Num = 0;
0000aa  7065              STRB     r5,[r4,#1]
;;;172        TWI_GenerateSTOP(TWI1, ENABLE);
0000ac  2101              MOVS     r1,#1
0000ae  4630              MOV      r0,r6
0000b0  f7fffffe          BL       TWI_GenerateSTOP
                  |L1.180|
;;;173        while(TWI_GetStateMachine(TWI1) != TWI_Master_Idle);
0000b4  4630              MOV      r0,r6
0000b6  f7fffffe          BL       TWI_GetStateMachine
0000ba  2800              CMP      r0,#0
0000bc  d1fa              BNE      |L1.180|
;;;174        printf("TWI1主机发送数据成功！\r\n");
0000be  a02c              ADR      r0,|L1.368|
0000c0  f7fffffe          BL       __2printf
;;;175        
;;;176        {
;;;177          uint32_t delay_time = 5000;
0000c4  4831              LDR      r0,|L1.396|
                  |L1.198|
0000c6  1e40              SUBS     r0,r0,#1
;;;178          while(delay_time--);
0000c8  d2fd              BCS      |L1.198|
;;;179        }
;;;180        
;;;181        /* 主机接收 */
;;;182        TWI_AcknowledgeConfig(TWI1, ENABLE);
0000ca  2101              MOVS     r1,#1
0000cc  4630              MOV      r0,r6
0000ce  f7fffffe          BL       TWI_AcknowledgeConfig
;;;183        TWI_GenerateSTART(TWI1, ENABLE);
0000d2  2101              MOVS     r1,#1
0000d4  4630              MOV      r0,r6
0000d6  f7fffffe          BL       TWI_GenerateSTART
;;;184        {
;;;185          uint32_t delay_time = 100;
0000da  2064              MOVS     r0,#0x64
                  |L1.220|
0000dc  1e40              SUBS     r0,r0,#1
;;;186          while(delay_time--);
0000de  d2fd              BCS      |L1.220|
                  |L1.224|
;;;187        }
;;;188        while(TWI1_Flag == RESET);	//等待起始信号发送完成
0000e0  7820              LDRB     r0,[r4,#0]  ; TWI1_Flag
0000e2  2800              CMP      r0,#0
0000e4  d0fc              BEQ      |L1.224|
;;;189        TWI1_Flag = RESET;
0000e6  7025              STRB     r5,[r4,#0]
;;;190        
;;;191        TWI_Send7bitAddress(TWI1, 0x12, TWI_Command_Read);
0000e8  2201              MOVS     r2,#1
0000ea  2112              MOVS     r1,#0x12
0000ec  4630              MOV      r0,r6
0000ee  f7fffffe          BL       TWI_Send7bitAddress
                  |L1.242|
;;;192        while(TWI1_Flag == RESET);	//等待起始信号发送完成
0000f2  7820              LDRB     r0,[r4,#0]  ; TWI1_Flag
0000f4  2800              CMP      r0,#0
0000f6  d0fc              BEQ      |L1.242|
;;;193        TWI1_Flag = RESET;
0000f8  7025              STRB     r5,[r4,#0]
;;;194        
;;;195        while(TWI1_Num < 16)
;;;196        {
;;;197          
;;;198          while(TWI1_Flag == RESET);	//等待起始信号发送完成
;;;199          TWI1_Flag = RESET;
;;;200          /* TWI1没有DMA，需要手动接收数据 */
;;;201          Slave_DMA_TWI1_ReceiveData[TWI1_Num] = TWI_ReceiveData(TWI1);
0000fa  4f25              LDR      r7,|L1.400|
0000fc  e012              B        |L1.292|
                  |L1.254|
0000fe  7820              LDRB     r0,[r4,#0]            ;198  ; TWI1_Flag
000100  2800              CMP      r0,#0                 ;198
000102  d0fc              BEQ      |L1.254|
000104  7025              STRB     r5,[r4,#0]            ;199
000106  4630              MOV      r0,r6
000108  f7fffffe          BL       TWI_ReceiveData
00010c  4601              MOV      r1,r0
00010e  7860              LDRB     r0,[r4,#1]  ; TWI1_Num
000110  5439              STRB     r1,[r7,r0]
000112  1c40              ADDS     r0,r0,#1
;;;202          TWI1_Num ++;
000114  b2c0              UXTB     r0,r0
000116  7060              STRB     r0,[r4,#1]
;;;203          if(TWI1_Num == 15)
000118  280f              CMP      r0,#0xf
00011a  d103              BNE      |L1.292|
;;;204          {
;;;205            TWI_AcknowledgeConfig(TWI1, DISABLE);
00011c  2100              MOVS     r1,#0
00011e  4630              MOV      r0,r6
000120  f7fffffe          BL       TWI_AcknowledgeConfig
                  |L1.292|
000124  7860              LDRB     r0,[r4,#1]            ;195  ; TWI1_Num
000126  2810              CMP      r0,#0x10              ;195
000128  d3e9              BCC      |L1.254|
;;;206          }
;;;207          //TWI1_Flag = RESET;
;;;208        }
;;;209        TWI1_Num = 0;
00012a  7065              STRB     r5,[r4,#1]
;;;210        
;;;211        TWI_GenerateSTOP(TWI1, ENABLE);
00012c  2101              MOVS     r1,#1
00012e  4630              MOV      r0,r6
000130  f7fffffe          BL       TWI_GenerateSTOP
                  |L1.308|
;;;212        while(TWI_GetStateMachine(TWI1) != TWI_Master_Idle);
000134  4630              MOV      r0,r6
000136  f7fffffe          BL       TWI_GetStateMachine
00013a  2800              CMP      r0,#0
00013c  d1fa              BNE      |L1.308|
;;;213        for(int i=0 ;i <= 15 ;i++)	printf("TWI1主机接收到的数据是 %x。\r\n",Slave_DMA_TWI1_ReceiveData[i]);
00013e  2400              MOVS     r4,#0
                  |L1.320|
000140  5d39              LDRB     r1,[r7,r4]
000142  a014              ADR      r0,|L1.404|
000144  f7fffffe          BL       __2printf
000148  1c64              ADDS     r4,r4,#1
00014a  2c0f              CMP      r4,#0xf
00014c  ddf8              BLE      |L1.320|
;;;214         TWI_AcknowledgeConfig(TWI1, ENABLE);
00014e  2101              MOVS     r1,#1
000150  4630              MOV      r0,r6
000152  f7fffffe          BL       TWI_AcknowledgeConfig
;;;215        {
;;;216          uint32_t delay_time = 100000;
000156  4817              LDR      r0,|L1.436|
                  |L1.344|
000158  1e40              SUBS     r0,r0,#1
;;;217          while(delay_time--);
00015a  d2fd              BCS      |L1.344|
00015c  e77f              B        |L1.94|
;;;218        }	
;;;219    #elif(TWI_Mode == 1)
;;;220        /* 从机接收 */
;;;221        TWI_SetNbytes(TWI0, 16);
;;;222        DMA_SetCurrDataCounter(DMA1, 16);
;;;223        TWI_DMACmd(TWI0, TWI_DMAReq_RX, DISABLE);
;;;224        TWI_DMACmd(TWI0, TWI_DMAReq_RX, ENABLE);
;;;225        while(TWI_GetStateMachine(TWI0) != TWI_Slave_ReceivedaData);  //等待从机接收状态
;;;226        while(DMA_GetFlagStatus(DMA1, DMA_FLAG_TCIF) == RESET);
;;;227        DMA_ClearFlag(DMA1, DMA_FLAG_TCIF);
;;;228        while(TWI_GetStateMachine(TWI0) != TWI_Slave_Idle);  //等待从机空闲状态
;;;229        for(int i=0 ;i <= 15 ;i++)	printf("TWI0从机接收到的数据是 %x。\r\n",Slave_DMA_TWI0_ReceiveData[i]);
;;;230        /* 从机发送 */
;;;231        /* TWI使用DMA传输时需要配置Nbyte个数 */
;;;232        TWI_SetNbytes(TWI0, 16);
;;;233        DMA_SetCurrDataCounter(DMA0, 16);
;;;234    		 
;;;235        TWI_DMACmd(TWI0, TWI_DMAReq_TX, DISABLE);
;;;236        TWI_DMACmd(TWI0, TWI_DMAReq_TX, ENABLE);
;;;237    		while(TWI_GetStateMachine(TWI0) != TWI_Slave_SendData);  //等待从机发送状态
;;;238    		DMA_SoftwareTrigger(DMA0);	//软件触发第一次搬运
;;;239       
;;;240        
;;;241        while(DMA_GetFlagStatus(DMA0, DMA_FLAG_TCIF) == RESET);
;;;242        DMA_ClearFlag(DMA0, DMA_FLAG_TCIF);
;;;243        printf("TWI0从机发送数据成功！\r\n");
;;;244        
;;;245    #endif
;;;246        
;;;247      }
;;;248    }
;;;249    
                          ENDP

00015e  0000              DCW      0x0000
                  |L1.352|
                          DCD      0x40011000
                  |L1.356|
                          DCD      0x40021060
                  |L1.360|
                          DCD      0xe000e100
                  |L1.364|
                          DCD      ||.data||
                  |L1.368|
000170  54574931          DCB      "TWI1",214,247,187,250,183,162,203,205,202,253,190,221,179
000174  d6f7bbfa
000178  b7a2cbcd
00017c  cafdbedd
000180  b3      
000181  c9b9a6a3          DCB      201,185,166,163,161,"\r\n",0
000185  a10d0a00
000189  00                DCB      0
00018a  00                DCB      0
00018b  00                DCB      0
                  |L1.396|
                          DCD      0x00001388
                  |L1.400|
                          DCD      ||.bss||
                  |L1.404|
000194  54574931          DCB      "TWI1",214,247,187,250,189,211,202,213,181,189,181,196,202
000198  d6f7bbfa
00019c  bdd3cad5
0001a0  b5bdb5c4
0001a4  ca      
0001a5  fdbeddca          DCB      253,190,221,202,199," %x",161,163,"\r\n",0
0001a9  c7202578
0001ad  a1a30d0a
0001b1  00      
0001b2  00                DCB      0
0001b3  00                DCB      0
                  |L1.436|
                          DCD      0x000186a0

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

                  TWI_Slave_DMA_TWI0Handler PROC
;;;249    
;;;250    void TWI_Slave_DMA_TWI0Handler(void)
000000  4770              BX       lr
;;;251    {
;;;252    #if (TWI_Mode == 1)
;;;253    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;254      if(TWI_GetFlagStatus(TWI0, TWI_FLAG_TWIF) == SET)
;;;255      {
;;;256        TWI_ClearFlag(TWI0, TWI_FLAG_TWIF);
;;;257      }
;;;258    
;;;259    #endif
;;;260    #endif
;;;261    }
;;;262    
                          ENDP


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

                  TWI_Slave_DMA_TWI1Handler PROC
;;;264    
;;;265    void TWI_Slave_DMA_TWI1Handler(void)
000000  b510              PUSH     {r4,lr}
;;;266    {
;;;267    #if (TWI_Mode == 0)
;;;268    #if defined(SC32f10xx)||defined(SC32f12xx)
;;;269      if(TWI_GetFlagStatus(TWI1, TWI_FLAG_TWIF) == SET)
000002  4c07              LDR      r4,|L3.32|
000004  2101              MOVS     r1,#1
000006  4620              MOV      r0,r4
000008  f7fffffe          BL       TWI_GetFlagStatus
00000c  2801              CMP      r0,#1
00000e  d105              BNE      |L3.28|
;;;270      {
;;;271        TWI1_Flag = SET;
000010  4904              LDR      r1,|L3.36|
000012  7008              STRB     r0,[r1,#0]
;;;272        TWI_ClearFlag(TWI1, TWI_FLAG_TWIF);
000014  4601              MOV      r1,r0
000016  4620              MOV      r0,r4
000018  f7fffffe          BL       TWI_ClearFlag
                  |L3.28|
;;;273      }
;;;274    
;;;275    #endif
;;;276    #endif
;;;277    }
00001c  bd10              POP      {r4,pc}
;;;278    
                          ENDP

00001e  0000              DCW      0x0000
                  |L3.32|
                          DCD      0x40021060
                  |L3.36|
                          DCD      ||.data||

                          AREA ||.bss||, DATA, NOINIT, ALIGN=0

                  Slave_DMA_TWI1_ReceiveData
                          %        16

                          AREA ||.data||, DATA, ALIGN=0

                  TWI1_Flag
000000  00                DCB      0x00
                  TWI1_Num
000001  00                DCB      0x00
                  Slave_DMA_TWI1_SendData
000002  0102              DCB      0x01,0x02
000004  03040506          DCB      0x03,0x04,0x05,0x06
000008  0708090a          DCB      0x07,0x08,0x09,0x0a
00000c  0b0c0d0e          DCB      0x0b,0x0c,0x0d,0x0e
000010  0fff              DCB      0x0f,0xff

                          AREA ||area_number.8||, DATA, ALIGN=0

                          EXPORTAS ||area_number.8||, ||.data||
                  Slave_DMA_TWI0_SendData
000000  11121314          DCB      0x11,0x12,0x13,0x14
000004  15161718          DCB      0x15,0x16,0x17,0x18
000008  191a1b1c          DCB      0x19,0x1a,0x1b,0x1c
00000c  1d1e1f2f          DCB      0x1d,0x1e,0x1f,0x2f

;*** Start embedded assembler ***

#line 1 "..\\Apps\\TWI_Slave_DMA.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___15_TWI_Slave_DMA_c_5a8f1885____REV16|
#line 463 "..\\CMSIS\\cmsis_armcc.h"
|__asm___15_TWI_Slave_DMA_c_5a8f1885____REV16| PROC
#line 464

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
