; generated by Component: ARM Compiler 5.05 update 2 (build 169) Tool: ArmCC [4d0f38]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\stm32f4xx_usart.o --asm_dir=..\..\..\..\Build\demo\MICO-Fire_F429\list_RVMDK\ --list_dir=..\..\..\..\Build\demo\MICO-Fire_F429\list_RVMDK\ --depend=..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\stm32f4xx_usart.d --cpu=Cortex-M4.fp --apcs=interwork -O0 --diag_suppress=9931,1,1293 -I..\..\..\..\Board\fire_F429 -I..\..\..\..\Demos\fire\ov2640 -I..\..\..\..\include -I..\..\..\..\libraries\utilities -I..\..\..\..\libraries\utilities\json_c -I..\..\..\..\MICO\core -I..\..\..\..\MICO\security -I..\..\..\..\MICO\system -I..\..\..\..\MICO\system\command_console -I..\..\..\..\Platform\include -I..\..\..\..\Platform\Cortex-M4 -I..\..\..\..\Platform\Cortex-M4\CMSIS -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals\Libraries\STM32F4xx_StdPeriph_Driver\inc -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals\Libraries -I..\..\..\..\Platform\MCU\STM32F4xx\wlan_bus_driver -I..\..\..\..\Platform\Drivers\spi_flash -I..\..\..\..\Platform\Drivers -I..\..\..\..\libraries\daemons\homekit_server -I..\..\..\..\libraries\daemons\http_server -I..\..\..\..\Platform\Drivers\malloc -I..\..\..\..\Platform\Drivers\SDRAM -I..\..\..\..\Platform\Drivers\ov5640 -IG:\GIT_OSC\STM32_develop\F429-V2\develop\6-WIFI\STM32-WiFi\3.wifi_ov5640\Projects\STM32F429\demo\RVMDK\RTE -IC:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include -IC:\Keil_v5\ARM\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0 -D__UVISION_VERSION=515 -DSTM32F429xx -DUSE_STDPERIPH_DRIVER -DDEBUG -DHSE_VALUE=25000000 -DOV5640 --omf_browse=..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\stm32f4xx_usart.crf ..\..\..\..\Platform\MCU\STM32F4xx\peripherals\Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_usart.c]
                          THUMB

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

                  USART_ClearFlag PROC
;;;1343     */
;;;1344   void USART_ClearFlag(USART_TypeDef* USARTx, uint16_t USART_FLAG)
000000  f4017200          AND      r2,r1,#0x200
;;;1345   {
;;;1346     /* Check the parameters */
;;;1347     assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;1348     assert_param(IS_USART_CLEAR_FLAG(USART_FLAG));
;;;1349   
;;;1350     /* The CTS flag is not available for UART4 and UART5 */
;;;1351     if ((USART_FLAG & USART_FLAG_CTS) == USART_FLAG_CTS)
000004  f5b27f00          CMP      r2,#0x200
000008  d100              BNE      |L1.12|
;;;1352     {
;;;1353       assert_param(IS_USART_1236_PERIPH(USARTx));
00000a  bf00              NOP      
                  |L1.12|
;;;1354     } 
;;;1355          
;;;1356     USARTx->SR = (uint16_t)~USART_FLAG;
00000c  43ca              MVNS     r2,r1
00000e  8002              STRH     r2,[r0,#0]
;;;1357   }
000010  4770              BX       lr
;;;1358   
                          ENDP


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

                  USART_ClearITPendingBit PROC
;;;1451     */
;;;1452   void USART_ClearITPendingBit(USART_TypeDef* USARTx, uint16_t USART_IT)
000000  b510              PUSH     {r4,lr}
;;;1453   {
;;;1454     uint16_t bitpos = 0x00, itmask = 0x00;
000002  2200              MOVS     r2,#0
000004  2300              MOVS     r3,#0
;;;1455     /* Check the parameters */
;;;1456     assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;1457     assert_param(IS_USART_CLEAR_IT(USART_IT)); 
;;;1458   
;;;1459     /* The CTS interrupt is not available for UART4 and UART5 */
;;;1460     if (USART_IT == USART_IT_CTS)
000006  f640146a          MOV      r4,#0x96a
00000a  42a1              CMP      r1,r4
00000c  d100              BNE      |L2.16|
;;;1461     {
;;;1462       assert_param(IS_USART_1236_PERIPH(USARTx));
00000e  bf00              NOP      
                  |L2.16|
;;;1463     } 
;;;1464       
;;;1465     bitpos = USART_IT >> 0x08;
000010  120a              ASRS     r2,r1,#8
;;;1466     itmask = ((uint16_t)0x01 << (uint16_t)bitpos);
000012  2401              MOVS     r4,#1
000014  4094              LSLS     r4,r4,r2
000016  b2a3              UXTH     r3,r4
;;;1467     USARTx->SR = (uint16_t)~itmask;
000018  43dc              MVNS     r4,r3
00001a  8004              STRH     r4,[r0,#0]
;;;1468   }
00001c  bd10              POP      {r4,pc}
;;;1469   
                          ENDP


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

                  USART_ClockInit PROC
;;;378      */
;;;379    void USART_ClockInit(USART_TypeDef* USARTx, USART_ClockInitTypeDef* USART_ClockInitStruct)
000000  b510              PUSH     {r4,lr}
;;;380    {
000002  4602              MOV      r2,r0
;;;381      uint32_t tmpreg = 0x00;
000004  2000              MOVS     r0,#0
;;;382      /* Check the parameters */
;;;383      assert_param(IS_USART_1236_PERIPH(USARTx));
;;;384      assert_param(IS_USART_CLOCK(USART_ClockInitStruct->USART_Clock));
;;;385      assert_param(IS_USART_CPOL(USART_ClockInitStruct->USART_CPOL));
;;;386      assert_param(IS_USART_CPHA(USART_ClockInitStruct->USART_CPHA));
;;;387      assert_param(IS_USART_LASTBIT(USART_ClockInitStruct->USART_LastBit));
;;;388      
;;;389    /*---------------------------- USART CR2 Configuration -----------------------*/
;;;390      tmpreg = USARTx->CR2;
000006  8a10              LDRH     r0,[r2,#0x10]
;;;391      /* Clear CLKEN, CPOL, CPHA and LBCL bits */
;;;392      tmpreg &= (uint32_t)~((uint32_t)CR2_CLOCK_CLEAR_MASK);
000008  f4206070          BIC      r0,r0,#0xf00
;;;393      /* Configure the USART Clock, CPOL, CPHA and LastBit ------------*/
;;;394      /* Set CLKEN bit according to USART_Clock value */
;;;395      /* Set CPOL bit according to USART_CPOL value */
;;;396      /* Set CPHA bit according to USART_CPHA value */
;;;397      /* Set LBCL bit according to USART_LastBit value */
;;;398      tmpreg |= (uint32_t)USART_ClockInitStruct->USART_Clock | USART_ClockInitStruct->USART_CPOL | 
00000c  880b              LDRH     r3,[r1,#0]
00000e  884c              LDRH     r4,[r1,#2]
000010  4323              ORRS     r3,r3,r4
000012  888c              LDRH     r4,[r1,#4]
000014  4323              ORRS     r3,r3,r4
000016  88cc              LDRH     r4,[r1,#6]
000018  4323              ORRS     r3,r3,r4
00001a  4318              ORRS     r0,r0,r3
;;;399                     USART_ClockInitStruct->USART_CPHA | USART_ClockInitStruct->USART_LastBit;
;;;400      /* Write to USART CR2 */
;;;401      USARTx->CR2 = (uint16_t)tmpreg;
00001c  8210              STRH     r0,[r2,#0x10]
;;;402    }
00001e  bd10              POP      {r4,pc}
;;;403    
                          ENDP


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

                  USART_ClockStructInit PROC
;;;409      */
;;;410    void USART_ClockStructInit(USART_ClockInitTypeDef* USART_ClockInitStruct)
000000  2100              MOVS     r1,#0
;;;411    {
;;;412      /* USART_ClockInitStruct members default value */
;;;413      USART_ClockInitStruct->USART_Clock = USART_Clock_Disable;
000002  8001              STRH     r1,[r0,#0]
;;;414      USART_ClockInitStruct->USART_CPOL = USART_CPOL_Low;
000004  8041              STRH     r1,[r0,#2]
;;;415      USART_ClockInitStruct->USART_CPHA = USART_CPHA_1Edge;
000006  8081              STRH     r1,[r0,#4]
;;;416      USART_ClockInitStruct->USART_LastBit = USART_LastBit_Disable;
000008  80c1              STRH     r1,[r0,#6]
;;;417    }
00000a  4770              BX       lr
;;;418    
                          ENDP


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

                  USART_Cmd PROC
;;;426      */
;;;427    void USART_Cmd(USART_TypeDef* USARTx, FunctionalState NewState)
000000  b121              CBZ      r1,|L5.12|
;;;428    {
;;;429      /* Check the parameters */
;;;430      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;431      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;432      
;;;433      if (NewState != DISABLE)
;;;434      {
;;;435        /* Enable the selected USART by setting the UE bit in the CR1 register */
;;;436        USARTx->CR1 |= USART_CR1_UE;
000002  8982              LDRH     r2,[r0,#0xc]
000004  f4425200          ORR      r2,r2,#0x2000
000008  8182              STRH     r2,[r0,#0xc]
00000a  e004              B        |L5.22|
                  |L5.12|
;;;437      }
;;;438      else
;;;439      {
;;;440        /* Disable the selected USART by clearing the UE bit in the CR1 register */
;;;441        USARTx->CR1 &= (uint16_t)~((uint16_t)USART_CR1_UE);
00000c  8982              LDRH     r2,[r0,#0xc]
00000e  f64d73ff          MOV      r3,#0xdfff
000012  401a              ANDS     r2,r2,r3
000014  8182              STRH     r2,[r0,#0xc]
                  |L5.22|
;;;442      }
;;;443    }
000016  4770              BX       lr
;;;444    
                          ENDP


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

                  USART_DMACmd PROC
;;;1098     */
;;;1099   void USART_DMACmd(USART_TypeDef* USARTx, uint16_t USART_DMAReq, FunctionalState NewState)
000000  b11a              CBZ      r2,|L6.10|
;;;1100   {
;;;1101     /* Check the parameters */
;;;1102     assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;1103     assert_param(IS_USART_DMAREQ(USART_DMAReq));  
;;;1104     assert_param(IS_FUNCTIONAL_STATE(NewState)); 
;;;1105   
;;;1106     if (NewState != DISABLE)
;;;1107     {
;;;1108       /* Enable the DMA transfer for selected requests by setting the DMAT and/or
;;;1109          DMAR bits in the USART CR3 register */
;;;1110       USARTx->CR3 |= USART_DMAReq;
000002  8a83              LDRH     r3,[r0,#0x14]
000004  430b              ORRS     r3,r3,r1
000006  8283              STRH     r3,[r0,#0x14]
000008  e002              B        |L6.16|
                  |L6.10|
;;;1111     }
;;;1112     else
;;;1113     {
;;;1114       /* Disable the DMA transfer for selected requests by clearing the DMAT and/or
;;;1115          DMAR bits in the USART CR3 register */
;;;1116       USARTx->CR3 &= (uint16_t)~USART_DMAReq;
00000a  8a83              LDRH     r3,[r0,#0x14]
00000c  438b              BICS     r3,r3,r1
00000e  8283              STRH     r3,[r0,#0x14]
                  |L6.16|
;;;1117     }
;;;1118   }
000010  4770              BX       lr
;;;1119   
                          ENDP


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

                  USART_DeInit PROC
;;;186      */
;;;187    void USART_DeInit(USART_TypeDef* USARTx)
000000  b510              PUSH     {r4,lr}
;;;188    {
000002  4604              MOV      r4,r0
;;;189      /* Check the parameters */
;;;190      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;191    
;;;192      if (USARTx == USART1)
000004  4832              LDR      r0,|L7.208|
000006  4284              CMP      r4,r0
000008  d108              BNE      |L7.28|
;;;193      {
;;;194        RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, ENABLE);
00000a  2101              MOVS     r1,#1
00000c  2010              MOVS     r0,#0x10
00000e  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;195        RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, DISABLE);
000012  2100              MOVS     r1,#0
000014  2010              MOVS     r0,#0x10
000016  f7fffffe          BL       RCC_APB2PeriphResetCmd
00001a  e057              B        |L7.204|
                  |L7.28|
;;;196      }
;;;197      else if (USARTx == USART2)
00001c  482d              LDR      r0,|L7.212|
00001e  4284              CMP      r4,r0
000020  d109              BNE      |L7.54|
;;;198      {
;;;199        RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, ENABLE);
000022  2101              MOVS     r1,#1
000024  0448              LSLS     r0,r1,#17
000026  f7fffffe          BL       RCC_APB1PeriphResetCmd
;;;200        RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, DISABLE);
00002a  2100              MOVS     r1,#0
00002c  f44f3000          MOV      r0,#0x20000
000030  f7fffffe          BL       RCC_APB1PeriphResetCmd
000034  e04a              B        |L7.204|
                  |L7.54|
;;;201      }
;;;202      else if (USARTx == USART3)
000036  4828              LDR      r0,|L7.216|
000038  4284              CMP      r4,r0
00003a  d109              BNE      |L7.80|
;;;203      {
;;;204        RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, ENABLE);
00003c  2101              MOVS     r1,#1
00003e  0488              LSLS     r0,r1,#18
000040  f7fffffe          BL       RCC_APB1PeriphResetCmd
;;;205        RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, DISABLE);
000044  2100              MOVS     r1,#0
000046  f44f2080          MOV      r0,#0x40000
00004a  f7fffffe          BL       RCC_APB1PeriphResetCmd
00004e  e03d              B        |L7.204|
                  |L7.80|
;;;206      }    
;;;207      else if (USARTx == UART4)
000050  4822              LDR      r0,|L7.220|
000052  4284              CMP      r4,r0
000054  d109              BNE      |L7.106|
;;;208      {
;;;209        RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART4, ENABLE);
000056  2101              MOVS     r1,#1
000058  04c8              LSLS     r0,r1,#19
00005a  f7fffffe          BL       RCC_APB1PeriphResetCmd
;;;210        RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART4, DISABLE);
00005e  2100              MOVS     r1,#0
000060  f44f2000          MOV      r0,#0x80000
000064  f7fffffe          BL       RCC_APB1PeriphResetCmd
000068  e030              B        |L7.204|
                  |L7.106|
;;;211      }
;;;212      else if (USARTx == UART5)
00006a  481d              LDR      r0,|L7.224|
00006c  4284              CMP      r4,r0
00006e  d109              BNE      |L7.132|
;;;213      {
;;;214        RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART5, ENABLE);
000070  2101              MOVS     r1,#1
000072  0508              LSLS     r0,r1,#20
000074  f7fffffe          BL       RCC_APB1PeriphResetCmd
;;;215        RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART5, DISABLE);
000078  2100              MOVS     r1,#0
00007a  f44f1080          MOV      r0,#0x100000
00007e  f7fffffe          BL       RCC_APB1PeriphResetCmd
000082  e023              B        |L7.204|
                  |L7.132|
;;;216      }  
;;;217      else if (USARTx == USART6)
000084  4817              LDR      r0,|L7.228|
000086  4284              CMP      r4,r0
000088  d108              BNE      |L7.156|
;;;218      {
;;;219        RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE);
00008a  2101              MOVS     r1,#1
00008c  2020              MOVS     r0,#0x20
00008e  f7fffffe          BL       RCC_APB2PeriphResetCmd
;;;220        RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE);
000092  2100              MOVS     r1,#0
000094  2020              MOVS     r0,#0x20
000096  f7fffffe          BL       RCC_APB2PeriphResetCmd
00009a  e017              B        |L7.204|
                  |L7.156|
;;;221      }
;;;222      else if (USARTx == UART7)
00009c  4812              LDR      r0,|L7.232|
00009e  4284              CMP      r4,r0
0000a0  d109              BNE      |L7.182|
;;;223      {
;;;224        RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART7, ENABLE);
0000a2  2101              MOVS     r1,#1
0000a4  0788              LSLS     r0,r1,#30
0000a6  f7fffffe          BL       RCC_APB1PeriphResetCmd
;;;225        RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART7, DISABLE);
0000aa  2100              MOVS     r1,#0
0000ac  f04f4080          MOV      r0,#0x40000000
0000b0  f7fffffe          BL       RCC_APB1PeriphResetCmd
0000b4  e00a              B        |L7.204|
                  |L7.182|
;;;226      }     
;;;227      else
;;;228      {
;;;229        if (USARTx == UART8)
0000b6  480d              LDR      r0,|L7.236|
0000b8  4284              CMP      r4,r0
0000ba  d107              BNE      |L7.204|
;;;230        { 
;;;231          RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART8, ENABLE);
0000bc  2101              MOVS     r1,#1
0000be  0540              LSLS     r0,r0,#21
0000c0  f7fffffe          BL       RCC_APB1PeriphResetCmd
;;;232          RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART8, DISABLE);
0000c4  2100              MOVS     r1,#0
0000c6  0560              LSLS     r0,r4,#21
0000c8  f7fffffe          BL       RCC_APB1PeriphResetCmd
                  |L7.204|
;;;233        }
;;;234      }
;;;235    }
0000cc  bd10              POP      {r4,pc}
;;;236    
                          ENDP

0000ce  0000              DCW      0x0000
                  |L7.208|
                          DCD      0x40011000
                  |L7.212|
                          DCD      0x40004400
                  |L7.216|
                          DCD      0x40004800
                  |L7.220|
                          DCD      0x40004c00
                  |L7.224|
                          DCD      0x40005000
                  |L7.228|
                          DCD      0x40011400
                  |L7.232|
                          DCD      0x40007800
                  |L7.236|
                          DCD      0x40007c00

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

                  USART_GetFlagStatus PROC
;;;1294     */
;;;1295   FlagStatus USART_GetFlagStatus(USART_TypeDef* USARTx, uint16_t USART_FLAG)
000000  4602              MOV      r2,r0
;;;1296   {
;;;1297     FlagStatus bitstatus = RESET;
000002  2000              MOVS     r0,#0
;;;1298     /* Check the parameters */
;;;1299     assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;1300     assert_param(IS_USART_FLAG(USART_FLAG));
;;;1301   
;;;1302     /* The CTS flag is not available for UART4 and UART5 */
;;;1303     if (USART_FLAG == USART_FLAG_CTS)
000004  f5b17f00          CMP      r1,#0x200
000008  d100              BNE      |L8.12|
;;;1304     {
;;;1305       assert_param(IS_USART_1236_PERIPH(USARTx));
00000a  bf00              NOP      
                  |L8.12|
;;;1306     } 
;;;1307       
;;;1308     if ((USARTx->SR & USART_FLAG) != (uint16_t)RESET)
00000c  8813              LDRH     r3,[r2,#0]
00000e  400b              ANDS     r3,r3,r1
000010  b10b              CBZ      r3,|L8.22|
;;;1309     {
;;;1310       bitstatus = SET;
000012  2001              MOVS     r0,#1
000014  e000              B        |L8.24|
                  |L8.22|
;;;1311     }
;;;1312     else
;;;1313     {
;;;1314       bitstatus = RESET;
000016  2000              MOVS     r0,#0
                  |L8.24|
;;;1315     }
;;;1316     return bitstatus;
;;;1317   }
000018  4770              BX       lr
;;;1318   
                          ENDP


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

                  USART_GetITStatus PROC
;;;1377     */
;;;1378   ITStatus USART_GetITStatus(USART_TypeDef* USARTx, uint16_t USART_IT)
000000  b570              PUSH     {r4-r6,lr}
;;;1379   {
000002  4602              MOV      r2,r0
;;;1380     uint32_t bitpos = 0x00, itmask = 0x00, usartreg = 0x00;
000004  2400              MOVS     r4,#0
000006  2300              MOVS     r3,#0
000008  2500              MOVS     r5,#0
;;;1381     ITStatus bitstatus = RESET;
00000a  2000              MOVS     r0,#0
;;;1382     /* Check the parameters */
;;;1383     assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;1384     assert_param(IS_USART_GET_IT(USART_IT)); 
;;;1385   
;;;1386     /* The CTS interrupt is not available for UART4 and UART5 */ 
;;;1387     if (USART_IT == USART_IT_CTS)
00000c  f640166a          MOV      r6,#0x96a
000010  42b1              CMP      r1,r6
000012  d100              BNE      |L9.22|
;;;1388     {
;;;1389       assert_param(IS_USART_1236_PERIPH(USARTx));
000014  bf00              NOP      
                  |L9.22|
;;;1390     } 
;;;1391       
;;;1392     /* Get the USART register index */
;;;1393     usartreg = (((uint8_t)USART_IT) >> 0x05);
000016  f3c11542          UBFX     r5,r1,#5,#3
;;;1394     /* Get the interrupt position */
;;;1395     itmask = USART_IT & IT_MASK;
00001a  f001031f          AND      r3,r1,#0x1f
;;;1396     itmask = (uint32_t)0x01 << itmask;
00001e  2601              MOVS     r6,#1
000020  fa06f303          LSL      r3,r6,r3
;;;1397     
;;;1398     if (usartreg == 0x01) /* The IT  is in CR1 register */
000024  2d01              CMP      r5,#1
000026  d102              BNE      |L9.46|
;;;1399     {
;;;1400       itmask &= USARTx->CR1;
000028  8996              LDRH     r6,[r2,#0xc]
00002a  4033              ANDS     r3,r3,r6
00002c  e006              B        |L9.60|
                  |L9.46|
;;;1401     }
;;;1402     else if (usartreg == 0x02) /* The IT  is in CR2 register */
00002e  2d02              CMP      r5,#2
000030  d102              BNE      |L9.56|
;;;1403     {
;;;1404       itmask &= USARTx->CR2;
000032  8a16              LDRH     r6,[r2,#0x10]
000034  4033              ANDS     r3,r3,r6
000036  e001              B        |L9.60|
                  |L9.56|
;;;1405     }
;;;1406     else /* The IT  is in CR3 register */
;;;1407     {
;;;1408       itmask &= USARTx->CR3;
000038  8a96              LDRH     r6,[r2,#0x14]
00003a  4033              ANDS     r3,r3,r6
                  |L9.60|
;;;1409     }
;;;1410     
;;;1411     bitpos = USART_IT >> 0x08;
00003c  120c              ASRS     r4,r1,#8
;;;1412     bitpos = (uint32_t)0x01 << bitpos;
00003e  2601              MOVS     r6,#1
000040  fa06f404          LSL      r4,r6,r4
;;;1413     bitpos &= USARTx->SR;
000044  8816              LDRH     r6,[r2,#0]
000046  4034              ANDS     r4,r4,r6
;;;1414     if ((itmask != (uint16_t)RESET)&&(bitpos != (uint16_t)RESET))
000048  b113              CBZ      r3,|L9.80|
00004a  b10c              CBZ      r4,|L9.80|
;;;1415     {
;;;1416       bitstatus = SET;
00004c  2001              MOVS     r0,#1
00004e  e000              B        |L9.82|
                  |L9.80|
;;;1417     }
;;;1418     else
;;;1419     {
;;;1420       bitstatus = RESET;
000050  2000              MOVS     r0,#0
                  |L9.82|
;;;1421     }
;;;1422     
;;;1423     return bitstatus;  
;;;1424   }
000052  bd70              POP      {r4-r6,pc}
;;;1425   
                          ENDP


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

                  USART_HalfDuplexCmd PROC
;;;835      */
;;;836    void USART_HalfDuplexCmd(USART_TypeDef* USARTx, FunctionalState NewState)
000000  b121              CBZ      r1,|L10.12|
;;;837    {
;;;838      /* Check the parameters */
;;;839      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;840      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;841      
;;;842      if (NewState != DISABLE)
;;;843      {
;;;844        /* Enable the Half-Duplex mode by setting the HDSEL bit in the CR3 register */
;;;845        USARTx->CR3 |= USART_CR3_HDSEL;
000002  8a82              LDRH     r2,[r0,#0x14]
000004  f0420208          ORR      r2,r2,#8
000008  8282              STRH     r2,[r0,#0x14]
00000a  e004              B        |L10.22|
                  |L10.12|
;;;846      }
;;;847      else
;;;848      {
;;;849        /* Disable the Half-Duplex mode by clearing the HDSEL bit in the CR3 register */
;;;850        USARTx->CR3 &= (uint16_t)~((uint16_t)USART_CR3_HDSEL);
00000c  8a82              LDRH     r2,[r0,#0x14]
00000e  f64f73f7          MOV      r3,#0xfff7
000012  401a              ANDS     r2,r2,r3
000014  8282              STRH     r2,[r0,#0x14]
                  |L10.22|
;;;851      }
;;;852    }
000016  4770              BX       lr
;;;853    
                          ENDP


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

                  USART_ITConfig PROC
;;;1230     */
;;;1231   void USART_ITConfig(USART_TypeDef* USARTx, uint16_t USART_IT, FunctionalState NewState)
000000  b5f0              PUSH     {r4-r7,lr}
;;;1232   {
000002  4603              MOV      r3,r0
;;;1233     uint32_t usartreg = 0x00, itpos = 0x00, itmask = 0x00;
000004  2400              MOVS     r4,#0
000006  2600              MOVS     r6,#0
000008  2500              MOVS     r5,#0
;;;1234     uint32_t usartxbase = 0x00;
00000a  2000              MOVS     r0,#0
;;;1235     /* Check the parameters */
;;;1236     assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;1237     assert_param(IS_USART_CONFIG_IT(USART_IT));
;;;1238     assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;1239   
;;;1240     /* The CTS interrupt is not available for UART4 and UART5 */
;;;1241     if (USART_IT == USART_IT_CTS)
00000c  f640176a          MOV      r7,#0x96a
000010  42b9              CMP      r1,r7
000012  d100              BNE      |L11.22|
;;;1242     {
;;;1243       assert_param(IS_USART_1236_PERIPH(USARTx));
000014  bf00              NOP      
                  |L11.22|
;;;1244     } 
;;;1245       
;;;1246     usartxbase = (uint32_t)USARTx;
000016  4618              MOV      r0,r3
;;;1247   
;;;1248     /* Get the USART register index */
;;;1249     usartreg = (((uint8_t)USART_IT) >> 0x05);
000018  f3c11442          UBFX     r4,r1,#5,#3
;;;1250   
;;;1251     /* Get the interrupt position */
;;;1252     itpos = USART_IT & IT_MASK;
00001c  f001061f          AND      r6,r1,#0x1f
;;;1253     itmask = (((uint32_t)0x01) << itpos);
000020  2701              MOVS     r7,#1
000022  fa07f506          LSL      r5,r7,r6
;;;1254       
;;;1255     if (usartreg == 0x01) /* The IT is in CR1 register */
000026  2c01              CMP      r4,#1
000028  d101              BNE      |L11.46|
;;;1256     {
;;;1257       usartxbase += 0x0C;
00002a  300c              ADDS     r0,r0,#0xc
00002c  e004              B        |L11.56|
                  |L11.46|
;;;1258     }
;;;1259     else if (usartreg == 0x02) /* The IT is in CR2 register */
00002e  2c02              CMP      r4,#2
000030  d101              BNE      |L11.54|
;;;1260     {
;;;1261       usartxbase += 0x10;
000032  3010              ADDS     r0,r0,#0x10
000034  e000              B        |L11.56|
                  |L11.54|
;;;1262     }
;;;1263     else /* The IT is in CR3 register */
;;;1264     {
;;;1265       usartxbase += 0x14; 
000036  3014              ADDS     r0,r0,#0x14
                  |L11.56|
;;;1266     }
;;;1267     if (NewState != DISABLE)
000038  b11a              CBZ      r2,|L11.66|
;;;1268     {
;;;1269       *(__IO uint32_t*)usartxbase  |= itmask;
00003a  6807              LDR      r7,[r0,#0]
00003c  432f              ORRS     r7,r7,r5
00003e  6007              STR      r7,[r0,#0]
000040  e002              B        |L11.72|
                  |L11.66|
;;;1270     }
;;;1271     else
;;;1272     {
;;;1273       *(__IO uint32_t*)usartxbase &= ~itmask;
000042  6807              LDR      r7,[r0,#0]
000044  43af              BICS     r7,r7,r5
000046  6007              STR      r7,[r0,#0]
                  |L11.72|
;;;1274     }
;;;1275   }
000048  bdf0              POP      {r4-r7,pc}
;;;1276   
                          ENDP


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

                  USART_Init PROC
;;;245      */
;;;246    void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct)
000000  e92d47ff          PUSH     {r0-r10,lr}
;;;247    {
000004  4605              MOV      r5,r0
000006  460e              MOV      r6,r1
;;;248      uint32_t tmpreg = 0x00, apbclock = 0x00;
000008  2400              MOVS     r4,#0
00000a  46a1              MOV      r9,r4
;;;249      uint32_t integerdivider = 0x00;
00000c  bf00              NOP      
;;;250      uint32_t fractionaldivider = 0x00;
00000e  46a0              MOV      r8,r4
;;;251      RCC_ClocksTypeDef RCC_ClocksStatus;
;;;252    
;;;253      /* Check the parameters */
;;;254      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;255      assert_param(IS_USART_BAUDRATE(USART_InitStruct->USART_BaudRate));  
;;;256      assert_param(IS_USART_WORD_LENGTH(USART_InitStruct->USART_WordLength));
;;;257      assert_param(IS_USART_STOPBITS(USART_InitStruct->USART_StopBits));
;;;258      assert_param(IS_USART_PARITY(USART_InitStruct->USART_Parity));
;;;259      assert_param(IS_USART_MODE(USART_InitStruct->USART_Mode));
;;;260      assert_param(IS_USART_HARDWARE_FLOW_CONTROL(USART_InitStruct->USART_HardwareFlowControl));
;;;261    
;;;262      /* The hardware flow control is available only for USART1, USART2, USART3 and USART6 */
;;;263      if (USART_InitStruct->USART_HardwareFlowControl != USART_HardwareFlowControl_None)
000010  89b0              LDRH     r0,[r6,#0xc]
000012  b100              CBZ      r0,|L12.22|
;;;264      {
;;;265        assert_param(IS_USART_1236_PERIPH(USARTx));
000014  bf00              NOP      
                  |L12.22|
;;;266      }
;;;267    
;;;268    /*---------------------------- USART CR2 Configuration -----------------------*/
;;;269      tmpreg = USARTx->CR2;
000016  8a2c              LDRH     r4,[r5,#0x10]
;;;270    
;;;271      /* Clear STOP[13:12] bits */
;;;272      tmpreg &= (uint32_t)~((uint32_t)USART_CR2_STOP);
000018  f4245440          BIC      r4,r4,#0x3000
;;;273    
;;;274      /* Configure the USART Stop Bits, Clock, CPOL, CPHA and LastBit :
;;;275          Set STOP[13:12] bits according to USART_StopBits value */
;;;276      tmpreg |= (uint32_t)USART_InitStruct->USART_StopBits;
00001c  88f0              LDRH     r0,[r6,#6]
00001e  4304              ORRS     r4,r4,r0
;;;277      
;;;278      /* Write to USART CR2 */
;;;279      USARTx->CR2 = (uint16_t)tmpreg;
000020  822c              STRH     r4,[r5,#0x10]
;;;280    
;;;281    /*---------------------------- USART CR1 Configuration -----------------------*/
;;;282      tmpreg = USARTx->CR1;
000022  89ac              LDRH     r4,[r5,#0xc]
;;;283    
;;;284      /* Clear M, PCE, PS, TE and RE bits */
;;;285      tmpreg &= (uint32_t)~((uint32_t)CR1_CLEAR_MASK);
000024  f241600c          MOV      r0,#0x160c
000028  4384              BICS     r4,r4,r0
;;;286    
;;;287      /* Configure the USART Word Length, Parity and mode: 
;;;288         Set the M bits according to USART_WordLength value 
;;;289         Set PCE and PS bits according to USART_Parity value
;;;290         Set TE and RE bits according to USART_Mode value */
;;;291      tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity |
00002a  88b0              LDRH     r0,[r6,#4]
00002c  8931              LDRH     r1,[r6,#8]
00002e  4308              ORRS     r0,r0,r1
000030  8971              LDRH     r1,[r6,#0xa]
000032  4308              ORRS     r0,r0,r1
000034  4304              ORRS     r4,r4,r0
;;;292                USART_InitStruct->USART_Mode;
;;;293    
;;;294      /* Write to USART CR1 */
;;;295      USARTx->CR1 = (uint16_t)tmpreg;
000036  81ac              STRH     r4,[r5,#0xc]
;;;296    
;;;297    /*---------------------------- USART CR3 Configuration -----------------------*/  
;;;298      tmpreg = USARTx->CR3;
000038  8aac              LDRH     r4,[r5,#0x14]
;;;299    
;;;300      /* Clear CTSE and RTSE bits */
;;;301      tmpreg &= (uint32_t)~((uint32_t)CR3_CLEAR_MASK);
00003a  f4247440          BIC      r4,r4,#0x300
;;;302    
;;;303      /* Configure the USART HFC : 
;;;304          Set CTSE and RTSE bits according to USART_HardwareFlowControl value */
;;;305      tmpreg |= USART_InitStruct->USART_HardwareFlowControl;
00003e  89b0              LDRH     r0,[r6,#0xc]
000040  4304              ORRS     r4,r4,r0
;;;306    
;;;307      /* Write to USART CR3 */
;;;308      USARTx->CR3 = (uint16_t)tmpreg;
000042  82ac              STRH     r4,[r5,#0x14]
;;;309    
;;;310    /*---------------------------- USART BRR Configuration -----------------------*/
;;;311      /* Configure the USART Baud Rate */
;;;312      RCC_GetClocksFreq(&RCC_ClocksStatus);
000044  4668              MOV      r0,sp
000046  f7fffffe          BL       RCC_GetClocksFreq
;;;313    
;;;314      if ((USARTx == USART1) || (USARTx == USART6))
00004a  4820              LDR      r0,|L12.204|
00004c  4285              CMP      r5,r0
00004e  d002              BEQ      |L12.86|
000050  481f              LDR      r0,|L12.208|
000052  4285              CMP      r5,r0
000054  d102              BNE      |L12.92|
                  |L12.86|
;;;315      {
;;;316        apbclock = RCC_ClocksStatus.PCLK2_Frequency;
000056  f8dd900c          LDR      r9,[sp,#0xc]
00005a  e001              B        |L12.96|
                  |L12.92|
;;;317      }
;;;318      else
;;;319      {
;;;320        apbclock = RCC_ClocksStatus.PCLK1_Frequency;
00005c  f8dd9008          LDR      r9,[sp,#8]
                  |L12.96|
;;;321      }
;;;322      
;;;323      /* Determine the integer part */
;;;324      if ((USARTx->CR1 & USART_CR1_OVER8) != 0)
000060  89a8              LDRH     r0,[r5,#0xc]
000062  f4004000          AND      r0,r0,#0x8000
000066  b140              CBZ      r0,|L12.122|
;;;325      {
;;;326        /* Integer part computing in case Oversampling mode is 8 Samples */
;;;327        integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate)));    
000068  eb0900c9          ADD      r0,r9,r9,LSL #3
00006c  eb001009          ADD      r0,r0,r9,LSL #4
000070  6831              LDR      r1,[r6,#0]
000072  0049              LSLS     r1,r1,#1
000074  fbb0f7f1          UDIV     r7,r0,r1
000078  e007              B        |L12.138|
                  |L12.122|
;;;328      }
;;;329      else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */
;;;330      {
;;;331        /* Integer part computing in case Oversampling mode is 16 Samples */
;;;332        integerdivider = ((25 * apbclock) / (4 * (USART_InitStruct->USART_BaudRate)));    
00007a  eb0900c9          ADD      r0,r9,r9,LSL #3
00007e  eb001009          ADD      r0,r0,r9,LSL #4
000082  6831              LDR      r1,[r6,#0]
000084  0089              LSLS     r1,r1,#2
000086  fbb0f7f1          UDIV     r7,r0,r1
                  |L12.138|
;;;333      }
;;;334      tmpreg = (integerdivider / 100) << 4;
00008a  2064              MOVS     r0,#0x64
00008c  fbb7f0f0          UDIV     r0,r7,r0
000090  0104              LSLS     r4,r0,#4
;;;335    
;;;336      /* Determine the fractional part */
;;;337      fractionaldivider = integerdivider - (100 * (tmpreg >> 4));
000092  0920              LSRS     r0,r4,#4
000094  2164              MOVS     r1,#0x64
000096  fb017810          MLS      r8,r1,r0,r7
;;;338    
;;;339      /* Implement the fractional part in the register */
;;;340      if ((USARTx->CR1 & USART_CR1_OVER8) != 0)
00009a  89a8              LDRH     r0,[r5,#0xc]
00009c  f4004000          AND      r0,r0,#0x8000
0000a0  b140              CBZ      r0,|L12.180|
;;;341      {
;;;342        tmpreg |= ((((fractionaldivider * 8) + 50) / 100)) & ((uint8_t)0x07);
0000a2  2032              MOVS     r0,#0x32
0000a4  eb0000c8          ADD      r0,r0,r8,LSL #3
0000a8  fbb0f0f1          UDIV     r0,r0,r1
0000ac  f0000007          AND      r0,r0,#7
0000b0  4304              ORRS     r4,r4,r0
0000b2  e008              B        |L12.198|
                  |L12.180|
;;;343      }
;;;344      else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */
;;;345      {
;;;346        tmpreg |= ((((fractionaldivider * 16) + 50) / 100)) & ((uint8_t)0x0F);
0000b4  2032              MOVS     r0,#0x32
0000b6  eb001008          ADD      r0,r0,r8,LSL #4
0000ba  2164              MOVS     r1,#0x64
0000bc  fbb0f0f1          UDIV     r0,r0,r1
0000c0  f000000f          AND      r0,r0,#0xf
0000c4  4304              ORRS     r4,r4,r0
                  |L12.198|
;;;347      }
;;;348      
;;;349      /* Write to USART BRR register */
;;;350      USARTx->BRR = (uint16_t)tmpreg;
0000c6  812c              STRH     r4,[r5,#8]
;;;351    }
0000c8  e8bd87ff          POP      {r0-r10,pc}
;;;352    
                          ENDP

                  |L12.204|
                          DCD      0x40011000
                  |L12.208|
                          DCD      0x40011400

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

                  USART_IrDACmd PROC
;;;1052     */
;;;1053   void USART_IrDACmd(USART_TypeDef* USARTx, FunctionalState NewState)
000000  b121              CBZ      r1,|L13.12|
;;;1054   {
;;;1055     /* Check the parameters */
;;;1056     assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;1057     assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;1058       
;;;1059     if (NewState != DISABLE)
;;;1060     {
;;;1061       /* Enable the IrDA mode by setting the IREN bit in the CR3 register */
;;;1062       USARTx->CR3 |= USART_CR3_IREN;
000002  8a82              LDRH     r2,[r0,#0x14]
000004  f0420202          ORR      r2,r2,#2
000008  8282              STRH     r2,[r0,#0x14]
00000a  e004              B        |L13.22|
                  |L13.12|
;;;1063     }
;;;1064     else
;;;1065     {
;;;1066       /* Disable the IrDA mode by clearing the IREN bit in the CR3 register */
;;;1067       USARTx->CR3 &= (uint16_t)~((uint16_t)USART_CR3_IREN);
00000c  8a82              LDRH     r2,[r0,#0x14]
00000e  f64f73fd          MOV      r3,#0xfffd
000012  401a              ANDS     r2,r2,r3
000014  8282              STRH     r2,[r0,#0x14]
                  |L13.22|
;;;1068     }
;;;1069   }
000016  4770              BX       lr
;;;1070   
                          ENDP


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

                  USART_IrDAConfig PROC
;;;1034     */
;;;1035   void USART_IrDAConfig(USART_TypeDef* USARTx, uint16_t USART_IrDAMode)
000000  8a82              LDRH     r2,[r0,#0x14]
;;;1036   {
;;;1037     /* Check the parameters */
;;;1038     assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;1039     assert_param(IS_USART_IRDA_MODE(USART_IrDAMode));
;;;1040       
;;;1041     USARTx->CR3 &= (uint16_t)~((uint16_t)USART_CR3_IRLP);
000002  f64f73fb          MOV      r3,#0xfffb
000006  401a              ANDS     r2,r2,r3
000008  8282              STRH     r2,[r0,#0x14]
;;;1042     USARTx->CR3 |= USART_IrDAMode;
00000a  8a82              LDRH     r2,[r0,#0x14]
00000c  430a              ORRS     r2,r2,r1
00000e  8282              STRH     r2,[r0,#0x14]
;;;1043   }
000010  4770              BX       lr
;;;1044   
                          ENDP


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

                  USART_LINBreakDetectLengthConfig PROC
;;;740      */
;;;741    void USART_LINBreakDetectLengthConfig(USART_TypeDef* USARTx, uint16_t USART_LINBreakDetectLength)
000000  8a02              LDRH     r2,[r0,#0x10]
;;;742    {
;;;743      /* Check the parameters */
;;;744      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;745      assert_param(IS_USART_LIN_BREAK_DETECT_LENGTH(USART_LINBreakDetectLength));
;;;746      
;;;747      USARTx->CR2 &= (uint16_t)~((uint16_t)USART_CR2_LBDL);
000002  f64f73df          MOV      r3,#0xffdf
000006  401a              ANDS     r2,r2,r3
000008  8202              STRH     r2,[r0,#0x10]
;;;748      USARTx->CR2 |= USART_LINBreakDetectLength;  
00000a  8a02              LDRH     r2,[r0,#0x10]
00000c  430a              ORRS     r2,r2,r1
00000e  8202              STRH     r2,[r0,#0x10]
;;;749    }
000010  4770              BX       lr
;;;750    
                          ENDP


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

                  USART_LINCmd PROC
;;;758      */
;;;759    void USART_LINCmd(USART_TypeDef* USARTx, FunctionalState NewState)
000000  b121              CBZ      r1,|L16.12|
;;;760    {
;;;761      /* Check the parameters */
;;;762      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;763      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;764      
;;;765      if (NewState != DISABLE)
;;;766      {
;;;767        /* Enable the LIN mode by setting the LINEN bit in the CR2 register */
;;;768        USARTx->CR2 |= USART_CR2_LINEN;
000002  8a02              LDRH     r2,[r0,#0x10]
000004  f4424280          ORR      r2,r2,#0x4000
000008  8202              STRH     r2,[r0,#0x10]
00000a  e004              B        |L16.22|
                  |L16.12|
;;;769      }
;;;770      else
;;;771      {
;;;772        /* Disable the LIN mode by clearing the LINEN bit in the CR2 register */
;;;773        USARTx->CR2 &= (uint16_t)~((uint16_t)USART_CR2_LINEN);
00000c  8a02              LDRH     r2,[r0,#0x10]
00000e  f64b73ff          MOV      r3,#0xbfff
000012  401a              ANDS     r2,r2,r3
000014  8202              STRH     r2,[r0,#0x10]
                  |L16.22|
;;;774      }
;;;775    }
000016  4770              BX       lr
;;;776    
                          ENDP


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

                  USART_OneBitMethodCmd PROC
;;;499      */
;;;500    void USART_OneBitMethodCmd(USART_TypeDef* USARTx, FunctionalState NewState)
000000  b121              CBZ      r1,|L17.12|
;;;501    {
;;;502      /* Check the parameters */
;;;503      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;504      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;505      
;;;506      if (NewState != DISABLE)
;;;507      {
;;;508        /* Enable the one bit method by setting the ONEBITE bit in the CR3 register */
;;;509        USARTx->CR3 |= USART_CR3_ONEBIT;
000002  8a82              LDRH     r2,[r0,#0x14]
000004  f4426200          ORR      r2,r2,#0x800
000008  8282              STRH     r2,[r0,#0x14]
00000a  e004              B        |L17.22|
                  |L17.12|
;;;510      }
;;;511      else
;;;512      {
;;;513        /* Disable the one bit method by clearing the ONEBITE bit in the CR3 register */
;;;514        USARTx->CR3 &= (uint16_t)~((uint16_t)USART_CR3_ONEBIT);
00000c  8a82              LDRH     r2,[r0,#0x14]
00000e  f24f73ff          MOV      r3,#0xf7ff
000012  401a              ANDS     r2,r2,r3
000014  8282              STRH     r2,[r0,#0x14]
                  |L17.22|
;;;515      }
;;;516    }
000016  4770              BX       lr
;;;517    
                          ENDP


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

                  USART_OverSampling8Cmd PROC
;;;473      */
;;;474    void USART_OverSampling8Cmd(USART_TypeDef* USARTx, FunctionalState NewState)
000000  b121              CBZ      r1,|L18.12|
;;;475    {
;;;476      /* Check the parameters */
;;;477      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;478      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;479      
;;;480      if (NewState != DISABLE)
;;;481      {
;;;482        /* Enable the 8x Oversampling mode by setting the OVER8 bit in the CR1 register */
;;;483        USARTx->CR1 |= USART_CR1_OVER8;
000002  8982              LDRH     r2,[r0,#0xc]
000004  f4424200          ORR      r2,r2,#0x8000
000008  8182              STRH     r2,[r0,#0xc]
00000a  e003              B        |L18.20|
                  |L18.12|
;;;484      }
;;;485      else
;;;486      {
;;;487        /* Disable the 8x Oversampling mode by clearing the OVER8 bit in the CR1 register */
;;;488        USARTx->CR1 &= (uint16_t)~((uint16_t)USART_CR1_OVER8);
00000c  8982              LDRH     r2,[r0,#0xc]
00000e  f3c2020e          UBFX     r2,r2,#0,#15
000012  8182              STRH     r2,[r0,#0xc]
                  |L18.20|
;;;489      }
;;;490    }  
000014  4770              BX       lr
;;;491    
                          ENDP


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

                  USART_ReceiveData PROC
;;;572      */
;;;573    uint16_t USART_ReceiveData(USART_TypeDef* USARTx)
000000  4601              MOV      r1,r0
;;;574    {
;;;575      /* Check the parameters */
;;;576      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;577      
;;;578      /* Receive Data */
;;;579      return (uint16_t)(USARTx->DR & (uint16_t)0x01FF);
000002  8888              LDRH     r0,[r1,#4]
000004  f3c00008          UBFX     r0,r0,#0,#9
;;;580    }
000008  4770              BX       lr
;;;581    
                          ENDP


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

                  USART_ReceiverWakeUpCmd PROC
;;;644      */
;;;645    void USART_ReceiverWakeUpCmd(USART_TypeDef* USARTx, FunctionalState NewState)
000000  b121              CBZ      r1,|L20.12|
;;;646    {
;;;647      /* Check the parameters */
;;;648      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;649      assert_param(IS_FUNCTIONAL_STATE(NewState)); 
;;;650      
;;;651      if (NewState != DISABLE)
;;;652      {
;;;653        /* Enable the USART mute mode  by setting the RWU bit in the CR1 register */
;;;654        USARTx->CR1 |= USART_CR1_RWU;
000002  8982              LDRH     r2,[r0,#0xc]
000004  f0420202          ORR      r2,r2,#2
000008  8182              STRH     r2,[r0,#0xc]
00000a  e004              B        |L20.22|
                  |L20.12|
;;;655      }
;;;656      else
;;;657      {
;;;658        /* Disable the USART mute mode by clearing the RWU bit in the CR1 register */
;;;659        USARTx->CR1 &= (uint16_t)~((uint16_t)USART_CR1_RWU);
00000c  8982              LDRH     r2,[r0,#0xc]
00000e  f64f73fd          MOV      r3,#0xfffd
000012  401a              ANDS     r2,r2,r3
000014  8182              STRH     r2,[r0,#0xc]
                  |L20.22|
;;;660      }
;;;661    }
000016  4770              BX       lr
;;;662    /**
                          ENDP


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

                  USART_SendBreak PROC
;;;782      */
;;;783    void USART_SendBreak(USART_TypeDef* USARTx)
000000  8981              LDRH     r1,[r0,#0xc]
;;;784    {
;;;785      /* Check the parameters */
;;;786      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;787      
;;;788      /* Send break characters */
;;;789      USARTx->CR1 |= USART_CR1_SBK;
000002  f0410101          ORR      r1,r1,#1
000006  8181              STRH     r1,[r0,#0xc]
;;;790    }
000008  4770              BX       lr
;;;791    
                          ENDP


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

                  USART_SendData PROC
;;;556      */
;;;557    void USART_SendData(USART_TypeDef* USARTx, uint16_t Data)
000000  f3c10208          UBFX     r2,r1,#0,#9
;;;558    {
;;;559      /* Check the parameters */
;;;560      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;561      assert_param(IS_USART_DATA(Data)); 
;;;562        
;;;563      /* Transmit Data */
;;;564      USARTx->DR = (Data & (uint16_t)0x01FF);
000004  8082              STRH     r2,[r0,#4]
;;;565    }
000006  4770              BX       lr
;;;566    
                          ENDP


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

                  USART_SetAddress PROC
;;;624      */
;;;625    void USART_SetAddress(USART_TypeDef* USARTx, uint8_t USART_Address)
000000  8a02              LDRH     r2,[r0,#0x10]
;;;626    {
;;;627      /* Check the parameters */
;;;628      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;629      assert_param(IS_USART_ADDRESS(USART_Address)); 
;;;630        
;;;631      /* Clear the USART address */
;;;632      USARTx->CR2 &= (uint16_t)~((uint16_t)USART_CR2_ADD);
000002  f64f73f0          MOV      r3,#0xfff0
000006  401a              ANDS     r2,r2,r3
000008  8202              STRH     r2,[r0,#0x10]
;;;633      /* Set the USART address node */
;;;634      USARTx->CR2 |= USART_Address;
00000a  8a02              LDRH     r2,[r0,#0x10]
00000c  430a              ORRS     r2,r2,r1
00000e  8202              STRH     r2,[r0,#0x10]
;;;635    }
000010  4770              BX       lr
;;;636    
                          ENDP


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

                  USART_SetGuardTime PROC
;;;919      */
;;;920    void USART_SetGuardTime(USART_TypeDef* USARTx, uint8_t USART_GuardTime)
000000  8b02              LDRH     r2,[r0,#0x18]
;;;921    {    
;;;922      /* Check the parameters */
;;;923      assert_param(IS_USART_1236_PERIPH(USARTx));
;;;924      
;;;925      /* Clear the USART Guard time */
;;;926      USARTx->GTPR &= USART_GTPR_PSC;
000002  b2d2              UXTB     r2,r2
000004  8302              STRH     r2,[r0,#0x18]
;;;927      /* Set the USART guard time */
;;;928      USARTx->GTPR |= (uint16_t)((uint16_t)USART_GuardTime << 0x08);
000006  8b02              LDRH     r2,[r0,#0x18]
000008  ea422201          ORR      r2,r2,r1,LSL #8
00000c  8302              STRH     r2,[r0,#0x18]
;;;929    }
00000e  4770              BX       lr
;;;930    
                          ENDP


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

                  USART_SetPrescaler PROC
;;;452      */
;;;453    void USART_SetPrescaler(USART_TypeDef* USARTx, uint8_t USART_Prescaler)
000000  8b02              LDRH     r2,[r0,#0x18]
;;;454    { 
;;;455      /* Check the parameters */
;;;456      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;457      
;;;458      /* Clear the USART prescaler */
;;;459      USARTx->GTPR &= USART_GTPR_GT;
000002  f402427f          AND      r2,r2,#0xff00
000006  8302              STRH     r2,[r0,#0x18]
;;;460      /* Set the USART prescaler */
;;;461      USARTx->GTPR |= USART_Prescaler;
000008  8b02              LDRH     r2,[r0,#0x18]
00000a  430a              ORRS     r2,r2,r1
00000c  8302              STRH     r2,[r0,#0x18]
;;;462    }
00000e  4770              BX       lr
;;;463    
                          ENDP


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

                  USART_SmartCardCmd PROC
;;;938      */
;;;939    void USART_SmartCardCmd(USART_TypeDef* USARTx, FunctionalState NewState)
000000  b121              CBZ      r1,|L26.12|
;;;940    {
;;;941      /* Check the parameters */
;;;942      assert_param(IS_USART_1236_PERIPH(USARTx));
;;;943      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;944      if (NewState != DISABLE)
;;;945      {
;;;946        /* Enable the SC mode by setting the SCEN bit in the CR3 register */
;;;947        USARTx->CR3 |= USART_CR3_SCEN;
000002  8a82              LDRH     r2,[r0,#0x14]
000004  f0420220          ORR      r2,r2,#0x20
000008  8282              STRH     r2,[r0,#0x14]
00000a  e004              B        |L26.22|
                  |L26.12|
;;;948      }
;;;949      else
;;;950      {
;;;951        /* Disable the SC mode by clearing the SCEN bit in the CR3 register */
;;;952        USARTx->CR3 &= (uint16_t)~((uint16_t)USART_CR3_SCEN);
00000c  8a82              LDRH     r2,[r0,#0x14]
00000e  f64f73df          MOV      r3,#0xffdf
000012  401a              ANDS     r2,r2,r3
000014  8282              STRH     r2,[r0,#0x14]
                  |L26.22|
;;;953      }
;;;954    }
000016  4770              BX       lr
;;;955    
                          ENDP


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

                  USART_SmartCardNACKCmd PROC
;;;963      */
;;;964    void USART_SmartCardNACKCmd(USART_TypeDef* USARTx, FunctionalState NewState)
000000  b121              CBZ      r1,|L27.12|
;;;965    {
;;;966      /* Check the parameters */
;;;967      assert_param(IS_USART_1236_PERIPH(USARTx)); 
;;;968      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;969      if (NewState != DISABLE)
;;;970      {
;;;971        /* Enable the NACK transmission by setting the NACK bit in the CR3 register */
;;;972        USARTx->CR3 |= USART_CR3_NACK;
000002  8a82              LDRH     r2,[r0,#0x14]
000004  f0420210          ORR      r2,r2,#0x10
000008  8282              STRH     r2,[r0,#0x14]
00000a  e004              B        |L27.22|
                  |L27.12|
;;;973      }
;;;974      else
;;;975      {
;;;976        /* Disable the NACK transmission by clearing the NACK bit in the CR3 register */
;;;977        USARTx->CR3 &= (uint16_t)~((uint16_t)USART_CR3_NACK);
00000c  8a82              LDRH     r2,[r0,#0x14]
00000e  f64f73ef          MOV      r3,#0xffef
000012  401a              ANDS     r2,r2,r3
000014  8282              STRH     r2,[r0,#0x14]
                  |L27.22|
;;;978      }
;;;979    }
000016  4770              BX       lr
;;;980    
                          ENDP


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

                  USART_StructInit PROC
;;;358      */
;;;359    void USART_StructInit(USART_InitTypeDef* USART_InitStruct)
000000  f44f5116          MOV      r1,#0x2580
;;;360    {
;;;361      /* USART_InitStruct members default value */
;;;362      USART_InitStruct->USART_BaudRate = 9600;
000004  6001              STR      r1,[r0,#0]
;;;363      USART_InitStruct->USART_WordLength = USART_WordLength_8b;
000006  2100              MOVS     r1,#0
000008  8081              STRH     r1,[r0,#4]
;;;364      USART_InitStruct->USART_StopBits = USART_StopBits_1;
00000a  80c1              STRH     r1,[r0,#6]
;;;365      USART_InitStruct->USART_Parity = USART_Parity_No ;
00000c  8101              STRH     r1,[r0,#8]
;;;366      USART_InitStruct->USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
00000e  210c              MOVS     r1,#0xc
000010  8141              STRH     r1,[r0,#0xa]
;;;367      USART_InitStruct->USART_HardwareFlowControl = USART_HardwareFlowControl_None;  
000012  2100              MOVS     r1,#0
000014  8181              STRH     r1,[r0,#0xc]
;;;368    }
000016  4770              BX       lr
;;;369    
                          ENDP


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

                  USART_WakeUpConfig PROC
;;;671      */
;;;672    void USART_WakeUpConfig(USART_TypeDef* USARTx, uint16_t USART_WakeUp)
000000  8982              LDRH     r2,[r0,#0xc]
;;;673    {
;;;674      /* Check the parameters */
;;;675      assert_param(IS_USART_ALL_PERIPH(USARTx));
;;;676      assert_param(IS_USART_WAKEUP(USART_WakeUp));
;;;677      
;;;678      USARTx->CR1 &= (uint16_t)~((uint16_t)USART_CR1_WAKE);
000002  f24f73ff          MOV      r3,#0xf7ff
000006  401a              ANDS     r2,r2,r3
000008  8182              STRH     r2,[r0,#0xc]
;;;679      USARTx->CR1 |= USART_WakeUp;
00000a  8982              LDRH     r2,[r0,#0xc]
00000c  430a              ORRS     r2,r2,r1
00000e  8182              STRH     r2,[r0,#0xc]
;;;680    }
000010  4770              BX       lr
;;;681    
                          ENDP


;*** Start embedded assembler ***

#line 1 "..\\..\\..\\..\\Platform\\MCU\\STM32F4xx\\peripherals\\Libraries\\STM32F4xx_StdPeriph_Driver\\src\\stm32f4xx_usart.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___17_stm32f4xx_usart_c_9565154b____REV16|
#line 114 "..\\..\\..\\..\\Platform\\Cortex-M4\\CMSIS\\core_cmInstr.h"
|__asm___17_stm32f4xx_usart_c_9565154b____REV16| PROC
#line 115

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___17_stm32f4xx_usart_c_9565154b____REVSH|
#line 128
|__asm___17_stm32f4xx_usart_c_9565154b____REVSH| PROC
#line 129

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
