rtccinitclock.c

来自「基於 c51/8051 的 nand Flash Memory HY27US08」· C语言 代码 · 共 43 行

C
43
字号
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include "Rtcc.h"



#ifdef _TMR_RTCC_V1


/*********************************************************************
 * Function:        void RtccInitClock(void)
 *
 * PreCondition:    None
 * Input:           None
 * Output:          None
 * Side Effects:    None
 * Overview:        The function initializes the RTCC device. It starts the RTCC clock,
 *                  sets the RTCC Off and disables RTCC write. Disables the OE.
 * Note:            None
 ********************************************************************/
void RtccInitClock(void)
{
   // enable the Secondary Oscillator
   __builtin_write_OSCCONL(2);

   RCFGCAL = 0x0;
   if(mRtccIsOn())
   {
      if(!mRtccIsWrEn())
      {
          RtccWrOn();
      }
       mRtccOff();
   }
   
   mRtccWrOff();
}

#else
#warning "Does not build on this target"
#endif

⌨️ 快捷键说明

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