nedhal_entry.c

来自「NXP LPC uCOS-II port for ARM」· C语言 代码 · 共 56 行

C
56
字号
/* ARM/NedHAL_Entry.c
Entry point of NedHAL into UCOS

2nd November 1999 ned
*/

#include "NedHAL.h"

#ifdef __cplusplus
extern "C" {
#endif

#ifdef AT91
extern HALError *AT91Timer_AddHandler(int (*isr)(int), int, int);

extern int SystemStarted=0;

extern int NedHAL_ISR(int param)
{
	if(SystemStarted)
	{
		OSIntEnter();

		// DbgIO_WriteC('I');

		OSTimeTick();

		OSIntExit();
	}

	/* Indicate we claimed the interrupt */
	return 1;	
}
#endif

extern void NedHAL_Entry(void)
{
	HALError *ret;
	DbgIO_Write0("NedHAL_Entry called\n\n");

#ifdef AT91
	// Install tick Handler for UCOS
	ret=AT91Timer_AddHandler(NedHAL_ISR, 5, 0);
#endif

	// Call main()
	{
		int ret;
		ret=main();
	}
}

#ifdef __cplusplus
}
#endif

⌨️ 快捷键说明

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