📄 led.c
字号:
#define ALLOCATE_EXTERN
#include "FS7805.h"
#include "FS7805Regs.h"
#include "user_main.h"
#define STANDARD
void main(void)
{
SYS_CFG=0x00; //00:15M,01:20M,02:30M,03:60M
SYS_CFG=SYS_CFG|bmPM_AVBLE;
WDTRST=0x2D; //stop WDT
MEMCON=0x08; //configure 8k xdata
/* As standard 8051, PortX is input when E8051D need output"1".
PortX is output when E8051D need output"0".but in FS7805,we can set PortX always
in output or input with configure this two register :PDCTL, PXOE
design by jeffery chen
*/
#ifndef STANDARD
PDCTL = 0x02; //The direct of P1 is decide by P1OE register
P1OE = 0xFE;
#endif
/* User Application */
usermain();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -