?? setuptimer01.c
字號:
/*******************************************************************************************************
* *
* ********** *
* ************ *
* *** *** *
* *** +++ *** *
* *** + + *** This file implements a function for setting up *
* *** + timer 0 or timer 1. *
* *** + + *** *
* *** +++ *** SetupTimer01.c *
* *** *** *
* ************ *
* ********** *
* *
*******************************************************************************************************
* Compiler: Keil C51 V7.50 *
* Target platform: Chipcon CCxxx0 (Silabs F320 *
* Author: SNA *
*******************************************************************************************************
* Revision history: See end of file *
******************************************************************************************************/
#include <Chipcon\srf04\regssrf04.h>
#include <Chipcon\srf04\halsrf04.h>
//-------------------------------------------------------------------------------------------------------
#define TIMER0_SYSCLK() (CKCON |= 0x04)
#define TIMER0_PRESCALER() (CKCON &= (~0x04))
#define TIMER1_SYSCLK() (CKCON |= 0x08)
#define TIMER1_PRESCALER() (CKCON &= (~0x08))
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
// void halSetupTimer01(UINT8 timer01, UINT8 clkSource, UINT8 mode, BOOL timerInt)
//
// DESCRIPTION:
// Function used to set up timer 0 or timer 1. Be aware that Timer 0 and Timer 1 share the same
// prescaler. The function enables the given timer. Allowing the timer to be controlled by the
// external input signal can be done manually by setting GATE0 or GATE1 to
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -