led.c
来自「DDS9851的PDF大家有需要就下载 还有中文文档」· C语言 代码 · 共 33 行
C
33 行
#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 + =
减小字号Ctrl + -
显示快捷键?