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

📄 stm32f10x_rtc.lst

📁 完成数据的采集
💻 LST
📖 第 1 页 / 共 2 页
字号:
    174            tmp = ((u32)RTC->DIVH & (u32)0x000F) << 0x10;
    175            tmp |= RTC->DIVL;
    176          
    177            return tmp;
    178          }
    179          
    180          /*******************************************************************************
    181          * Function Name  : RTC_WaitForLastTask
    182          * Description    : Waits until last write operation on RTC registers has finished.
    183          *                  This function must be called before any write to RTC registers.
    184          * Input          : None
    185          * Output         : None
    186          * Return         : None
    187          *******************************************************************************/
    188          void RTC_WaitForLastTask(void)
    189          {
    190            /* Loop until RTOFF flag is set */
    191            while ((RTC->CRL & RTC_FLAG_RTOFF) == (u16)RESET)
    192            {
    193            }
    194          }
    195          
    196          /*******************************************************************************
    197          * Function Name  : RTC_WaitForSynchro
    198          * Description    : Waits until the RTC registers (RTC_CNT, RTC_ALR and RTC_PRL)
    199          *                  are synchronized with RTC APB clock.
    200          *                  This function must be called before any read operation after
    201          *                  an APB reset or an APB clock stop.
    202          * Input          : None
    203          * Output         : None
    204          * Return         : None
    205          *******************************************************************************/
    206          void RTC_WaitForSynchro(void)
    207          {
    208            /* Clear RSF flag */
    209            RTC->CRL &= (u16)~RTC_FLAG_RSF;
    210          
    211            /* Loop until RSF flag is set */
    212            while ((RTC->CRL & RTC_FLAG_RSF) == (u16)RESET)
    213            {
    214            }
    215          }
    216          
    217          /*******************************************************************************
    218          * Function Name  : RTC_GetFlagStatus
    219          * Description    : Checks whether the specified RTC flag is set or not.
    220          * Input          : - RTC_FLAG: specifies the flag to check.
    221          *                    This parameter can be one the following values:
    222          *                       - RTC_FLAG_RTOFF: RTC Operation OFF flag
    223          *                       - RTC_FLAG_RSF: Registers Synchronized flag
    224          *                       - RTC_FLAG_OW: Overflow flag
    225          *                       - RTC_FLAG_ALR: Alarm flag
    226          *                       - RTC_FLAG_SEC: Second flag
    227          * Output         : None
    228          * Return         : The new state of RTC_FLAG (SET or RESET).
    229          *******************************************************************************/
    230          FlagStatus RTC_GetFlagStatus(u16 RTC_FLAG)
    231          {
    232            FlagStatus bitstatus = RESET;
    233            
    234            /* Check the parameters */
    235            assert_param(IS_RTC_GET_FLAG(RTC_FLAG)); 
    236            
    237            if ((RTC->CRL & RTC_FLAG) != (u16)RESET)
    238            {
    239              bitstatus = SET;
    240            }
    241            else
    242            {
    243              bitstatus = RESET;
    244            }
    245            return bitstatus;
    246          }
    247          
    248          /*******************************************************************************
    249          * Function Name  : RTC_ClearFlag
    250          * Description    : Clears the RTC抯 pending flags.
    251          * Input          : - RTC_FLAG: specifies the flag to clear.
    252          *                    This parameter can be any combination of the following values:
    253          *                       - RTC_FLAG_RSF: Registers Synchronized flag. This flag
    254          *                         is cleared only after an APB reset or an APB Clock stop.
    255          *                       - RTC_FLAG_OW: Overflow flag
    256          *                       - RTC_FLAG_ALR: Alarm flag
    257          *                       - RTC_FLAG_SEC: Second flag
    258          * Output         : None
    259          * Return         : None
    260          *******************************************************************************/
    261          void RTC_ClearFlag(u16 RTC_FLAG)
    262          {
    263            /* Check the parameters */
    264            assert_param(IS_RTC_CLEAR_FLAG(RTC_FLAG)); 
    265              
    266            /* Clear the coressponding RTC flag */
    267            RTC->CRL &= (u16)~RTC_FLAG;
    268          }
    269          
    270          /*******************************************************************************
    271          * Function Name  : RTC_GetITStatus
    272          * Description    : Checks whether the specified RTC interrupt has occured or not.
    273          * Input          : - RTC_IT: specifies the RTC interrupts sources to check.
    274          *                    This parameter can be one of the following values:
    275          *                       - RTC_IT_OW: Overflow interrupt
    276          *                       - RTC_IT_ALR: Alarm interrupt
    277          *                       - RTC_IT_SEC: Second interrupt
    278          * Output         : None
    279          * Return         : The new state of the RTC_IT (SET or RESET).
    280          *******************************************************************************/
    281          ITStatus RTC_GetITStatus(u16 RTC_IT)
    282          {
    283            ITStatus bitstatus = RESET;
    284          
    285            /* Check the parameters */
    286            assert_param(IS_RTC_GET_IT(RTC_IT)); 
    287            
    288            bitstatus = (ITStatus)((RTC->CRL & RTC_IT) != (u16)RESET);
    289          
    290            if (((RTC->CRH & RTC_IT) != (u16)RESET) && bitstatus)
    291            {
    292              bitstatus = SET;
    293            }
    294            else
    295            {
    296              bitstatus = RESET;
    297            }
    298            return bitstatus;
    299          }
    300          
    301          /*******************************************************************************
    302          * Function Name  : RTC_ClearITPendingBit
    303          * Description    : Clears the RTC抯 interrupt pending bits.
    304          * Input          : - RTC_IT: specifies the interrupt pending bit to clear.
    305          *                    This parameter can be any combination of the following values:
    306          *                       - RTC_IT_OW: Overflow interrupt
    307          *                       - RTC_IT_ALR: Alarm interrupt
    308          *                       - RTC_IT_SEC: Second interrupt
    309          * Output         : None
    310          * Return         : None
    311          *******************************************************************************/
    312          void RTC_ClearITPendingBit(u16 RTC_IT)
    313          {
    314            /* Check the parameters */
    315            assert_param(IS_RTC_IT(RTC_IT));  
    316            
    317            /* Clear the coressponding RTC pending bit */
    318            RTC->CRL &= (u16)~RTC_IT;
    319          }
    320          
    321          /******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/

   Maximum stack usage in bytes:

     Function              .cstack
     --------              -------
     RTC_ClearFlag              0
     RTC_ClearITPendingBit      0
     RTC_EnterConfigMode        0
     RTC_ExitConfigMode         0
     RTC_GetCounter             0
     RTC_GetDivider             0
     RTC_GetFlagStatus          0
     RTC_GetITStatus            8
     RTC_ITConfig               0
     RTC_SetAlarm               8
     RTC_SetCounter             8
     RTC_SetPrescaler           8
     RTC_WaitForLastTask        0
     RTC_WaitForSynchro         0


   Section sizes:

     Function/Label          Bytes
     --------------          -----
     RTC_ITConfig              30
     RTC_EnterConfigMode       14
     RTC_ExitConfigMode        20
     RTC_GetCounter            22
     RTC_SetCounter            26
     RTC_SetPrescaler          40
     RTC_SetAlarm              36
     RTC_GetDivider            36
     ??RTC_WaitForLastTask_0   10
     RTC_WaitForSynchro        28
     RTC_GetFlagStatus         30
     RTC_ClearFlag             12
     RTC_GetITStatus           62
     RTC_ClearITPendingBit     12
     ??DataTable10              4
     ??DataTable11              4
     ??DataTable20              4
     ??DataTable22              4

 
 394 bytes in section .text
 
 394 bytes of CODE memory

Errors: none
Warnings: none

⌨️ 快捷键说明

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