⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stm32f10x_usart.lst

📁 完成数据的采集
💻 LST
📖 第 1 页 / 共 5 页
字号:
   \   0000000C   0A43               ORRS     R2,R2,R1
   \   0000000E   0282               STRH     R2,[R0, #+16]
    376          }
   \   00000010   7047               BX       LR               ;; return
   \   00000012   00BF               Nop      
   \                     ??USART_SetAddress_0:
   \   00000014   F0FF0000           DC32     0xfff0
    377          
    378          /*******************************************************************************
    379          * Function Name  : USART_WakeUpConfig
    380          * Description    : Selects the USART WakeUp method.
    381          * Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
    382          *                    peripheral.
    383          *                  - USART_WakeUp: specifies the USART wakeup method.
    384          *                    This parameter can be one of the following values:
    385          *                        - USART_WakeUp_IdleLine
    386          *                        - USART_WakeUp_AddressMark
    387          * Output         : None
    388          * Return         : None
    389          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    390          void USART_WakeUpConfig(USART_TypeDef* USARTx, u16 USART_WakeUp)
    391          {
    392            /* Check the parameters */
    393            assert_param(IS_USART_WAKEUP(USART_WakeUp));
    394            
    395            USARTx->CR1 &= CR3_WAKE_Mask;
   \                     USART_WakeUpConfig:
   \   00000000   8289               LDRH     R2,[R0, #+12]
   \   00000002   034B               LDR.N    R3,??USART_WakeUpConfig_0  ;; 0xf7ff
   \   00000004   1340               ANDS     R3,R3,R2
   \   00000006   8381               STRH     R3,[R0, #+12]
    396            USARTx->CR1 |= USART_WakeUp;
   \   00000008   8289               LDRH     R2,[R0, #+12]
   \   0000000A   0A43               ORRS     R2,R2,R1
   \   0000000C   8281               STRH     R2,[R0, #+12]
    397          }
   \   0000000E   7047               BX       LR               ;; return
   \                     ??USART_WakeUpConfig_0:
   \   00000010   FFF70000           DC32     0xf7ff
    398          
    399          /*******************************************************************************
    400          * Function Name  : USART_ReceiverWakeUpCmd
    401          * Description    : Determines if the USART is in mute mode or not.
    402          * Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
    403          *                    peripheral.
    404          *                  - NewState: new state of the USART mode.
    405          *                    This parameter can be: ENABLE or DISABLE.
    406          * Output         : None
    407          * Return         : None
    408          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    409          void USART_ReceiverWakeUpCmd(USART_TypeDef* USARTx, FunctionalState NewState)
    410          {
    411            /* Check the parameters */
    412            assert_param(IS_FUNCTIONAL_STATE(NewState)); 
    413            
    414            if (NewState != DISABLE)
   \                     USART_ReceiverWakeUpCmd:
   \   00000000   C9B2               UXTB     R1,R1            ;; ZeroExtS R1,R1,#+24,#+24
   \   00000002   0029               CMP      R1,#+0
   \   00000004   04D0               BEQ.N    ??USART_ReceiverWakeUpCmd_0
    415            {
    416              /* Enable the mute mode USART by setting the RWU bit in the CR1 register */
    417              USARTx->CR1 |= CR1_RWU_Set;
   \   00000006   8289               LDRH     R2,[R0, #+12]
   \   00000008   52F00202           ORRS     R2,R2,#0x2
   \   0000000C   8281               STRH     R2,[R0, #+12]
   \   0000000E   03E0               B.N      ??USART_ReceiverWakeUpCmd_1
    418            }
    419            else
    420            {
    421              /* Disable the mute mode USART by clearing the RWU bit in the CR1 register */
    422              USARTx->CR1 &= CR1_RWU_Reset;
   \                     ??USART_ReceiverWakeUpCmd_0:
   \   00000010   8289               LDRH     R2,[R0, #+12]
   \   00000012   ....               LDR.N    R3,??DataTable3  ;; 0xfffd
   \   00000014   1340               ANDS     R3,R3,R2
   \   00000016   8381               STRH     R3,[R0, #+12]
    423            }
    424          }
   \                     ??USART_ReceiverWakeUpCmd_1:
   \   00000018   7047               BX       LR               ;; return
    425          
    426          /*******************************************************************************
    427          * Function Name  : USART_LINBreakDetectLengthConfig
    428          * Description    : Sets the USART LIN Break detection length.
    429          * Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
    430          *                    peripheral.
    431          *                  - USART_LINBreakDetectLength: specifies the LIN break
    432          *                    detection length.
    433          *                    This parameter can be one of the following values:
    434          *                       - USART_LINBreakDetectLength_10b
    435          *                       - USART_LINBreakDetectLength_11b
    436          * Output         : None
    437          * Return         : None
    438          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    439          void USART_LINBreakDetectLengthConfig(USART_TypeDef* USARTx, u16 USART_LINBreakDetectLength)
    440          {
    441            /* Check the parameters */
    442            assert_param(IS_USART_LIN_BREAK_DETECT_LENGTH(USART_LINBreakDetectLength));
    443            
    444            USARTx->CR2 &= CR3_LBDL_Mask;
   \                     USART_LINBreakDetectLengthConfig:
   \   00000000   028A               LDRH     R2,[R0, #+16]
   \   00000002   ....               LDR.N    R3,??DataTable2  ;; 0xffdf
   \   00000004   1340               ANDS     R3,R3,R2
   \   00000006   0382               STRH     R3,[R0, #+16]
    445            USARTx->CR2 |= USART_LINBreakDetectLength;  
   \   00000008   028A               LDRH     R2,[R0, #+16]
   \   0000000A   0A43               ORRS     R2,R2,R1
   \   0000000C   0282               STRH     R2,[R0, #+16]
    446          }
   \   0000000E   7047               BX       LR               ;; return
    447          
    448          /*******************************************************************************
    449          * Function Name  : USART_LINCmd
    450          * Description    : Enables or disables the USART抯 LIN mode.
    451          * Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
    452          *                    peripheral.
    453          *                  - NewState: new state of the USART LIN mode.
    454          *                    This parameter can be: ENABLE or DISABLE.
    455          * Output         : None
    456          * Return         : None
    457          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    458          void USART_LINCmd(USART_TypeDef* USARTx, FunctionalState NewState)
    459          {
    460            /* Check the parameters */
    461            assert_param(IS_FUNCTIONAL_STATE(NewState));
    462            
    463            if (NewState != DISABLE)
   \                     USART_LINCmd:
   \   00000000   C9B2               UXTB     R1,R1            ;; ZeroExtS R1,R1,#+24,#+24
   \   00000002   0029               CMP      R1,#+0
   \   00000004   04D0               BEQ.N    ??USART_LINCmd_0
    464            {
    465              /* Enable the LIN mode by setting the LINE bit in the CR2 register */
    466              USARTx->CR2 |= CR2_LINE_Set;
   \   00000006   028A               LDRH     R2,[R0, #+16]
   \   00000008   52F48042           ORRS     R2,R2,#0x4000
   \   0000000C   0282               STRH     R2,[R0, #+16]
   \   0000000E   03E0               B.N      ??USART_LINCmd_1
    467            }
    468            else
    469            {
    470              /* Disable the LIN mode by clearing the LINE bit in the CR2 register */
    471              USARTx->CR2 &= CR2_LINE_Reset;
   \                     ??USART_LINCmd_0:
   \   00000010   028A               LDRH     R2,[R0, #+16]
   \   00000012   024B               LDR.N    R3,??USART_LINCmd_2  ;; 0xbfff
   \   00000014   1340               ANDS     R3,R3,R2
   \   00000016   0382               STRH     R3,[R0, #+16]
    472            }
    473          }
   \                     ??USART_LINCmd_1:
   \   00000018   7047               BX       LR               ;; return
   \   0000001A   00BF               Nop      
   \                     ??USART_LINCmd_2:
   \   0000001C   FFBF0000           DC32     0xbfff
    474          
    475          /*******************************************************************************
    476          * Function Name  : USART_SendData
    477          * Description    : Transmits signle data through the USARTx peripheral.
    478          * Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
    479          *                    peripheral.
    480          *                  - Data: the data to transmit.
    481          * Output         : None
    482          * Return         : None
    483          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    484          void USART_SendData(USART_TypeDef* USARTx, u16 Data)
    485          {
    486            /* Check the parameters */
    487            assert_param(IS_USART_DATA(Data)); 
    488              
    489            /* Transmit Data */
    490            USARTx->DR = (Data & (u16)0x01FF);
   \                     USART_SendData:
   \   00000000   CA05               LSLS     R2,R1,#+23       ;; ZeroExtS R2,R1,#+23,#+23
   \   00000002   D20D               LSRS     R2,R2,#+23
   \   00000004   8280               STRH     R2,[R0, #+4]
    491          }
   \   00000006   7047               BX       LR               ;; return
    492          
    493          /*******************************************************************************
    494          * Function Name  : USART_ReceiveData
    495          * Description    : Returns the most recent received data by the USARTx peripheral.
    496          * Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
    497          *                    peripheral.
    498          * Output         : None
    499          * Return         : The received data.
    500          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    501          u16 USART_ReceiveData(USART_TypeDef* USARTx)
    502          {
    503            /* Receive Data */
    504            return (u16)(USARTx->DR & (u16)0x01FF);
   \                     USART_ReceiveData:
   \   00000000   8088               LDRH     R0,[R0, #+4]
   \   00000002   C005               LSLS     R0,R0,#+23       ;; ZeroExtS R0,R0,#+23,#+23
   \   00000004   C00D               LSRS     R0,R0,#+23
   \   00000006   7047               BX       LR               ;; return
    505          }
    506          
    507          /*******************************************************************************
    508          * Function Name  : USART_SendBreak
    509          * Description    : Transmits break characters.
    510          * Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
    511          *                    peripheral.
    512          * Output         : None
    513          * Return         : None
    514          *******************************************************************************/

   \                                 In section .XML, align 4, keep-with-next
    515          void USART_SendBreak(USART_TypeDef* USARTx)
    516          {
    517            /* Send break characters */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -