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

📄 stm32f10x_exti.lst

📁 STM32利用正交编码器实现电机的控制
💻 LST
📖 第 1 页 / 共 2 页
字号:
    110          
    111          /*******************************************************************************
    112          * Function Name  : EXTI_GenerateSWInterrupt
    113          * Description    : Generates a Software interrupt.
    114          * Input          : - EXTI_Line: specifies the EXTI lines to be enabled or
    115          *                    disabled.
    116          *                    This parameter can be:
    117          *                       - EXTI_Linex: External interrupt line x where x(0..18)
    118          * Output         : None
    119          * Return         : None
    120          *******************************************************************************/
    121          void EXTI_GenerateSWInterrupt(u32 EXTI_Line)
    122          {
    123            /* Check the parameters */
    124            assert(IS_EXTI_LINE(EXTI_Line));
    125            
    126            EXTI->SWIER |= EXTI_Line;
    127          }
    128          
    129          /*******************************************************************************
    130          * Function Name  : EXTI_GetFlagStatus
    131          * Description    : Checks whether the specified EXTI line flag is set or not.
    132          * Input          : - EXTI_Line: specifies the EXTI lines flag to check.
    133          *                    This parameter can be:
    134          *                       - EXTI_Linex: External interrupt line x where x(0..18)
    135          * Output         : None
    136          * Return         : The new state of EXTI_Line (SET or RESET).
    137          *******************************************************************************/
    138          FlagStatus EXTI_GetFlagStatus(u32 EXTI_Line)
    139          {
    140            FlagStatus bitstatus = RESET;
    141          
    142            /* Check the parameters */
    143            assert(IS_GET_EXTI_LINE(EXTI_Line));
    144            
    145            if ((EXTI->PR & EXTI_Line) != (u32)RESET)
    146            {
    147              bitstatus = SET;
    148            }
    149            else
    150            {
    151              bitstatus = RESET;
    152            }
    153            return bitstatus;
    154          }
    155          
    156          /*******************************************************************************
    157          * Function Name  : EXTI_ClearFlag
    158          * Description    : Clears the EXTI抯 line pending flags.
    159          * Input          : - EXTI_Line: specifies the EXTI lines flags to clear.
    160          *                    This parameter can be:
    161          *                       - EXTI_Linex: External interrupt line x where x(0..18)
    162          * Output         : None
    163          * Return         : None
    164          *******************************************************************************/
    165          void EXTI_ClearFlag(u32 EXTI_Line)
    166          {
    167            /* Check the parameters */
    168            assert(IS_EXTI_LINE(EXTI_Line));
    169            
    170            EXTI->PR = EXTI_Line;
    171          }
    172          
    173          /*******************************************************************************
    174          * Function Name  : EXTI_GetITStatus
    175          * Description    : Checks whether the specified EXTI line is asserted or not.
    176          * Input          : - EXTI_Line: specifies the EXTI lines to check.
    177          *                    This parameter can be:
    178          *                       - EXTI_Linex: External interrupt line x where x(0..18)
    179          * Output         : None
    180          * Return         : The new state of EXTI_Line (SET or RESET).
    181          *******************************************************************************/
    182          ITStatus EXTI_GetITStatus(u32 EXTI_Line)
    183          {
    184            ITStatus bitstatus = RESET;
    185            u32 enablestatus = 0;
    186          
    187            /* Check the parameters */
    188            assert(IS_GET_EXTI_LINE(EXTI_Line));
    189            
    190            enablestatus =  EXTI->IMR & EXTI_Line;
    191          
    192            if (((EXTI->PR & EXTI_Line) != (u32)RESET) && enablestatus)
    193            {
    194              bitstatus = SET;
    195            }
    196            else
    197            {
    198              bitstatus = RESET;
    199            }
    200            return bitstatus;
    201          }
    202          
    203          /*******************************************************************************
    204          * Function Name  : EXTI_ClearITPendingBit
    205          * Description    : Clears the EXTI抯 line pending bits.
    206          * Input          : - EXTI_Line: specifies the EXTI lines to clear.
    207          *                    This parameter can be:
    208          *                       - EXTI_Linex: External interrupt line x where x(0..18)
    209          * Output         : None
    210          * Return         : None
    211          *******************************************************************************/
    212          void EXTI_ClearITPendingBit(u32 EXTI_Line)
    213          {
    214            /* Check the parameters */
    215            assert(IS_EXTI_LINE(EXTI_Line));
    216            
    217            EXTI->PR = EXTI_Line;
    218          }
    219          
    220          /******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/

   Maximum stack usage in bytes:

     Function                 CSTACK
     --------                 ------
     EXTI_ClearFlag               8
     EXTI_ClearITPendingBit       8
     EXTI_DeInit                  0
     EXTI_GenerateSWInterrupt     8
     EXTI_GetFlagStatus           8
     EXTI_GetITStatus             8
     EXTI_Init                    8
     EXTI_StructInit              0


   Segment part sizes:

     Function/Label                 Bytes
     --------------                 -----
     EXTI_DeInit                      48
     EXTI_Init                       228
     EXTI_StructInit                  18
     EXTI_GenerateSWInterrupt         40
     EXTI_GetFlagStatus              132
     EXTI_ClearFlag                   32
     EXTI_GetITStatus                146
     EXTI_ClearITPendingBit           32
     ??DataTable27                     4
     ??DataTable28                     4
     ?<Constant "C:\\David JIANG\\ST MCU...">
                                      92
      Others                           8

 
 692 bytes in segment CODE
  92 bytes in segment DATA_C
 
 684 bytes of CODE  memory (+ 8 bytes shared)
  92 bytes of CONST memory

Errors: none
Warnings: none

⌨️ 快捷键说明

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