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

📄 resetprg.c

📁 Data logger Power transision function switch among different power modes based on new Renesus microc
💻 C
字号:
/***********************************************************************************
FILE NAME  		resetprg.c
DESCRIPTION		Reset Initialisation Function.
				The user's program will start in this file.

Copyright   : 2006 Renesas Technology Europe Ltd.
Copyright   : 2006 Renesas Technology Corporation.
All Rights Reserved
***********************************************************************************/

/***********************************************************************************
Revision History
DD.MM.YYYY OSO-UID Description
24.05.2006 RTE-VNA First Release
***********************************************************************************/

/***********************************************************************************
System Includes
***********************************************************************************/
/*	Following header file provides prototype for _INITSCT() function.	*/
#include <_h_c_lib.h>
/*	Following header file provides access to intrinsic functions to control interrupt
	levels.	*/
#include <machine.h>

/*	Following header file is used by __entry directive to set the initial stack
pointer. The value in this file should only be changed if relocating and / or
changing the size of the stack.	*/
#include "stacksct.h"

/***********************************************************************************
User Includes
***********************************************************************************/
/*	Following header file provides a structure to access on-chip I/O registers. */
#include "iodefine.h"

extern void main(void);
extern void HardwareSetup(void);

void PowerON_Reset(void);

/***********************************************************************************
Compiler Directives
***********************************************************************************/
/* '#pragma section' instructs the linker to place all subsequent code in the named
section. This can be used to relocate code in the memory map. This directive should
be used when debugging code in RAM to provide a section name that can be referenced
in the build | toolchain | linker | section settings. Use of the directive without
the section name will reset the section to default. */

/***********************************************************************************
Function Name : PowerON_Reset
Description	  : Power on reset function. 
		This function executes following to power on reset.
		It first calls hardware initialisation function & then 'main()' function.
Parameters	  : none
Return value  : none
***********************************************************************************/
#pragma section ResetPRG
__entry(vect=0) void PowerON_Reset(void)
{ 
	 /*	Mask all interrupts.	*/
	 set_imask_ccr((unsigned char)1);
	
	/*	Renesas H8/SH Compiler Intrinsic function to copy initialised data to RAM */
	/*	This function references the structure in the 'dbsct.c' source file */
	_INITSCT();
		
	/*	Setup the hardware	*/
	HardwareSetup();				

	/*	Call user main funtion.	*/
	main();

	/*	This function must never exit.	*/
	while(1);
}
/***********************************************************************************
End of function PowerON_Reset
***********************************************************************************/

⌨️ 快捷键说明

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