📄 hd.c
字号:
#include "chip.h"
unsigned char oscflg;
void InitClock()
{
unsigned int oscdly;
DCOCTL=DCO2+DCO1+DCO0; //Definition the Highest frequency for DCO
BCSCTL1=RSEL2+RSEL1+RSEL0;//+XTS //X2T Disable; LFXT1 operation at high speed mode; Highest nominal DCO
oscdly=500;
while((IFG1 & OFIFG) && oscdly--);
if(IFG1 & OFIFG) oscflg=1;
else oscflg=0;
BCSCTL2=SELM1+SELS; //xt2 is used by both SMCLK and MCLK
}
void InitP1()
{
P1SEL=0x0;//P1.6 input from I2C interrupt
P1DIR=0X0;
P1IES=0x10;
P1IE=0x10;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -