📄 resetprg.c
字号:
/*****************************************************************************************
** FILE : ResetPrg.C **
** DESCRIPTION : Reset Program. User must include this MODIFIED file in their **
** applictions. **
**-------------------------------------------------------------------------------------**
** **
** Copyright (c) 2001-2002 Hitachi Micro Systems Europe Ltd UK. **
** **
** This program is distributed in the hope that it will be useful, **
** but WITHOUT ANY WARRANTY; without even the implied warranty of **
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. **
** **
*****************************************************************************************/
#include <machine.h>
#include <_h_c_lib.h>
#include "stacksct.h"
#include "iodefine.h"
void PowerON_Reset(void)
{
unsigned char dummy;
set_imask_ccr(1);
*((volatile unsigned char *)0xffc3)= 0x9e;
dummy = *((volatile unsigned char *)0xffc3);
*((volatile unsigned char *)0xffc3)= 0xf1;
*((volatile unsigned char *)0xfffa)= 0xbf;
_INITSCT();
P_IENR1.BYTE = 0;
P_IENR2.BYTE = 0;
set_imask_ccr(0);
main();
sleep();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -