⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resetprg.c

📁 FAT16很有参考价值的文件系统
💻 C
字号:
/***********************************************************************/
/*                                                                     */
/*  FILE        :resetprg.c                                            */
/*  DATE        :Tue, Apr 04, 2006                                     */
/*  DESCRIPTION :Reset Program                                         */
/*  CPU TYPE    :H8/3694F                                              */
/*                                                                     */
/*  This file is generated by Renesas Project Generator (Ver.3.0).     */
/*                                                                     */
/***********************************************************************/
                  


#include	<machine.h>
#include	<_h_c_lib.h>
//#include	<stddef.h>					// Remove the comment when you use errno
//#include 	<stdlib.h>					// Remove the comment when you use rand()
#include	"stacksct.h"
#include	"iodefine.h"
#include	"monitor.h"

extern void main(void);



void HardwareSetup()
{
	TW.TCRW.BYTE = 0xB0;	// Start Timer W with 100Hz OCA
	TW.GRA = 25000;
	TW.TIERW.BYTE = 0x01;
	TW.TIOR0.BYTE = 0x03;
	TW.TMRW.BYTE = 0x80;

	TA.TMA.BYTE = 0x08;
	IENR1.BIT.IENTA = 1;

	sci3_init();
}


//#ifdef __cplusplus				// Remove the comment when you use SIM I/O
//extern "C" {
//#endif
//extern void _INIT_IOLIB(void);
//extern void _CLOSEALL(void);
//#ifdef __cplusplus
//}
//#endif

//extern void srand(unsigned int);	// Remove the comment when you use rand()
//extern char *_s1ptr;				// Remove the comment when you use strtok()
		
//#ifdef __cplusplus				// Remove the comment when you use Hardware Setup
//extern "C" {
//#endif
//extern void HardwareSetup(void);
//#ifdef __cplusplus
//}
//#endif

//#ifdef __cplusplus			// Remove the comment when you use global class object
//extern "C" {					// Sections C$INIT and C$END will be generated
//#endif
//extern void _CALL_INIT(void);
//extern void _CALL_END(void);
//#ifdef __cplusplus
//}
//#endif
	
#pragma section ResetPRG

__entry(vect=0) void PowerON_Reset(void)
{ 
	 set_imask_ccr(1);
	_INITSCT();

//	_CALL_INIT();					// Remove the comment when you use global class object

//	_INIT_IOLIB();					// Remove the comment when you use SIM I/O

//	errno=0;						// Remove the comment when you use errno
//	srand(1);						// Remove the comment when you use rand()
//	_s1ptr=NULL;					// Remove the comment when you use strtok()
		
	HardwareSetup();				// Remove the comment when you use Hardware Setup
	set_imask_ccr(0);

	main();

//	_CLOSEALL();					// Remove the comment when you use SIM I/O

//	_CALL_END();					// Remove the comment when you use global class object
	
	sleep();
}

//__interrupt(vect=1) void Manual_Reset(void)	// Remove the comment when you use Manual Reset
//{
//} 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -