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

📄 stm32f10x_adc.lst

📁 stm32+ucos-ii
💻 LST
📖 第 1 页 / 共 5 页
字号:
    327            assert_param(IS_FUNCTIONAL_STATE(NewState));
    328            if (NewState != DISABLE)
   \                     ADC_DMACmd:
   \   00000000   C9B2               UXTB     R1,R1            ;; ZeroExt  R1,R1,#+24,#+24
   \   00000002   0029               CMP      R1,#+0
   \   00000004   05D0               BEQ.N    ??ADC_DMACmd_0
    329            {
    330              /* Enable the selected ADC DMA request */
    331              ADCx->CR2 |= CR2_DMA_Set;
   \   00000006   8268               LDR      R2,[R0, #+8]
   \   00000008   4FF48073           MOV      R3,#+256
   \   0000000C   1A43               ORRS     R2,R3,R2
   \   0000000E   8260               STR      R2,[R0, #+8]
   \   00000010   03E0               B.N      ??ADC_DMACmd_1
    332            }
    333            else
    334            {
    335              /* Disable the selected ADC DMA request */
    336              ADCx->CR2 &= CR2_DMA_Reset;
   \                     ??ADC_DMACmd_0:
   \   00000012   8268               LDR      R2,[R0, #+8]
   \   00000014   32F48072           BICS     R2,R2,#0x100
   \   00000018   8260               STR      R2,[R0, #+8]
    337            }
    338          }
   \                     ??ADC_DMACmd_1:
   \   0000001A   7047               BX       LR               ;; return
    339          
    340          /**
    341            * @brief  Enables or disables the specified ADC interrupts.
    342            * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
    343            * @param  ADC_IT: specifies the ADC interrupt sources to be enabled or disabled. 
    344            *   This parameter can be any combination of the following values:
    345            *     @arg ADC_IT_EOC: End of conversion interrupt mask
    346            *     @arg ADC_IT_AWD: Analog watchdog interrupt mask
    347            *     @arg ADC_IT_JEOC: End of injected conversion interrupt mask
    348            * @param  NewState: new state of the specified ADC interrupts.
    349            *   This parameter can be: ENABLE or DISABLE.
    350            * @retval None
    351            */

   \                                 In section .text, align 2, keep-with-next
    352          void ADC_ITConfig(ADC_TypeDef* ADCx, uint16_t ADC_IT, FunctionalState NewState)
    353          {
   \                     ADC_ITConfig:
   \   00000000   10B4               PUSH     {R4}
    354            uint8_t itmask = 0;
   \   00000002   0023               MOVS     R3,#+0
    355            /* Check the parameters */
    356            assert_param(IS_ADC_ALL_PERIPH(ADCx));
    357            assert_param(IS_FUNCTIONAL_STATE(NewState));
    358            assert_param(IS_ADC_IT(ADC_IT));
    359            /* Get the ADC IT index */
    360            itmask = (uint8_t)ADC_IT;
   \   00000004   0C00               MOVS     R4,R1
   \   00000006   2300               MOVS     R3,R4
    361            if (NewState != DISABLE)
   \   00000008   D2B2               UXTB     R2,R2            ;; ZeroExt  R2,R2,#+24,#+24
   \   0000000A   002A               CMP      R2,#+0
   \   0000000C   04D0               BEQ.N    ??ADC_ITConfig_0
    362            {
    363              /* Enable the selected ADC interrupts */
    364              ADCx->CR1 |= itmask;
   \   0000000E   4468               LDR      R4,[R0, #+4]
   \   00000010   DBB2               UXTB     R3,R3            ;; ZeroExt  R3,R3,#+24,#+24
   \   00000012   1C43               ORRS     R4,R3,R4
   \   00000014   4460               STR      R4,[R0, #+4]
   \   00000016   03E0               B.N      ??ADC_ITConfig_1
    365            }
    366            else
    367            {
    368              /* Disable the selected ADC interrupts */
    369              ADCx->CR1 &= (~(uint32_t)itmask);
   \                     ??ADC_ITConfig_0:
   \   00000018   4468               LDR      R4,[R0, #+4]
   \   0000001A   DBB2               UXTB     R3,R3            ;; ZeroExt  R3,R3,#+24,#+24
   \   0000001C   9C43               BICS     R4,R4,R3
   \   0000001E   4460               STR      R4,[R0, #+4]
    370            }
    371          }
   \                     ??ADC_ITConfig_1:
   \   00000020   10BC               POP      {R4}
   \   00000022   7047               BX       LR               ;; return
    372          
    373          /**
    374            * @brief  Resets the selected ADC calibration registers.
    375            * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
    376            * @retval None
    377            */

   \                                 In section .text, align 2, keep-with-next
    378          void ADC_ResetCalibration(ADC_TypeDef* ADCx)
    379          {
    380            /* Check the parameters */
    381            assert_param(IS_ADC_ALL_PERIPH(ADCx));
    382            /* Resets the selected ADC calibartion registers */  
    383            ADCx->CR2 |= CR2_RSTCAL_Set;
   \                     ADC_ResetCalibration:
   \   00000000   8168               LDR      R1,[R0, #+8]
   \   00000002   51F00801           ORRS     R1,R1,#0x8
   \   00000006   8160               STR      R1,[R0, #+8]
    384          }
   \   00000008   7047               BX       LR               ;; return
    385          
    386          /**
    387            * @brief  Gets the selected ADC reset calibration registers status.
    388            * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
    389            * @retval The new state of ADC reset calibration registers (SET or RESET).
    390            */

   \                                 In section .text, align 2, keep-with-next
    391          FlagStatus ADC_GetResetCalibrationStatus(ADC_TypeDef* ADCx)
    392          {
   \                     ADC_GetResetCalibrationStatus:
   \   00000000   0100               MOVS     R1,R0
    393            FlagStatus bitstatus = RESET;
   \   00000002   0020               MOVS     R0,#+0
    394            /* Check the parameters */
    395            assert_param(IS_ADC_ALL_PERIPH(ADCx));
    396            /* Check the status of RSTCAL bit */
    397            if ((ADCx->CR2 & CR2_RSTCAL_Set) != (uint32_t)RESET)
   \   00000004   8A68               LDR      R2,[R1, #+8]
   \   00000006   1207               LSLS     R2,R2,#+28
   \   00000008   02D5               BPL.N    ??ADC_GetResetCalibrationStatus_0
    398            {
    399              /* RSTCAL bit is set */
    400              bitstatus = SET;
   \   0000000A   0122               MOVS     R2,#+1
   \   0000000C   1000               MOVS     R0,R2
   \   0000000E   01E0               B.N      ??ADC_GetResetCalibrationStatus_1
    401            }
    402            else
    403            {
    404              /* RSTCAL bit is reset */
    405              bitstatus = RESET;
   \                     ??ADC_GetResetCalibrationStatus_0:
   \   00000010   0022               MOVS     R2,#+0
   \   00000012   1000               MOVS     R0,R2
    406            }
    407            /* Return the RSTCAL bit status */
    408            return  bitstatus;
   \                     ??ADC_GetResetCalibrationStatus_1:
   \   00000014   C0B2               UXTB     R0,R0            ;; ZeroExt  R0,R0,#+24,#+24
   \   00000016   7047               BX       LR               ;; return
    409          }
    410          
    411          /**
    412            * @brief  Starts the selected ADC calibration process.
    413            * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
    414            * @retval None
    415            */

   \                                 In section .text, align 2, keep-with-next
    416          void ADC_StartCalibration(ADC_TypeDef* ADCx)
    417          {
    418            /* Check the parameters */
    419            assert_param(IS_ADC_ALL_PERIPH(ADCx));
    420            /* Enable the selected ADC calibration process */  
    421            ADCx->CR2 |= CR2_CAL_Set;
   \                     ADC_StartCalibration:
   \   00000000   8168               LDR      R1,[R0, #+8]
   \   00000002   51F00401           ORRS     R1,R1,#0x4
   \   00000006   8160               STR      R1,[R0, #+8]
    422          }
   \   00000008   7047               BX       LR               ;; return
    423          
    424          /**
    425            * @brief  Gets the selected ADC calibration status.
    426            * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
    427            * @retval The new state of ADC calibration (SET or RESET).
    428            */

   \                                 In section .text, align 2, keep-with-next
    429          FlagStatus ADC_GetCalibrationStatus(ADC_TypeDef* ADCx)
    430          {
   \                     ADC_GetCalibrationStatus:
   \   00000000   0100               MOVS     R1,R0
    431            FlagStatus bitstatus = RESET;
   \   00000002   0020               MOVS     R0,#+0
    432            /* Check the parameters */
    433            assert_param(IS_ADC_ALL_PERIPH(ADCx));
    434            /* Check the status of CAL bit */
    435            if ((ADCx->CR2 & CR2_CAL_Set) != (uint32_t)RESET)
   \   00000004   8A68               LDR      R2,[R1, #+8]
   \   00000006   5207               LSLS     R2,R2,#+29
   \   00000008   02D5               BPL.N    ??ADC_GetCalibrationStatus_0
    436            {
    437              /* CAL bit is set: calibration on going */
    438              bitstatus = SET;
   \   0000000A   0122               MOVS     R2,#+1
   \   0000000C   1000               MOVS     R0,R2
   \   0000000E   01E0               B.N      ??ADC_GetCalibrationStatus_1
    439            }
    440            else
    441            {
    442              /* CAL bit is reset: end of calibration */
    443              bitstatus = RESET;
   \                     ??ADC_GetCalibrationStatus_0:
   \   00000010   0022               MOVS     R2,#+0
   \   00000012   1000               MOVS     R0,R2
    444            }
    445            /* Return the CAL bit status */
    446            return  bitstatus;
   \                     ??ADC_GetCalibrationStatus_1:
   \   00000014   C0B2               UXTB     R0,R0            ;; ZeroExt  R0,R0,#+24,#+24
   \   00000016   7047               BX       LR               ;; return
    447          }
    448          
    449          /**
    450            * @brief  Enables or disables the selected ADC software start conversion .
    451            * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
    452            * @param  NewState: new state of the selected ADC software start conversion.
    453            *   This parameter can be: ENABLE or DISABLE.
    454            * @retval None
    455            */

   \                                 In section .text, align 2, keep-with-next
    456          void ADC_SoftwareStartConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
    457          {
    458            /* Check the parameters */
    459            assert_param(IS_ADC_ALL_PERIPH(ADCx));
    460            assert_param(IS_FUNCTIONAL_STATE(NewState));
    461            if (NewState != DISABLE)
   \                     ADC_SoftwareStartConvCmd:
   \   00000000   C9B2               UXTB     R1,R1            ;; ZeroExt  R1,R1,#+24,#+24
   \   00000002   0029               CMP      R1,#+0
   \   00000004   04D0               BEQ.N    ??ADC_SoftwareStartConvCmd_0
    462            {
    463              /* Enable the selected ADC conversion on external event and start the selected
    464                 ADC conversion */
    465              ADCx->CR2 |= CR2_EXTTRIG_SWSTART_Set;
   \   00000006   8268               LDR      R2,[R0, #+8]
   \   00000008   52F4A002           ORRS     R2,R2,#0x500000
   \   0000000C   8260               STR      R2,[R0, #+8]
   \   0000000E   03E0               B.N      ??ADC_SoftwareStartConvCmd_1
    466            }
    467            else
    468            {
    469              /* Disable the selected ADC conversion on external event and stop the selected
    470                 ADC conversion */
    471              ADCx->CR2 &= CR2_EXTTRIG_SWSTART_Reset;

⌨️ 快捷键说明

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