📄 tkdev_init.c
字号:
/* *---------------------------------------------------------------------- * micro T-Kernel * * Copyright (C) 2006-2007 by Ken Sakamura. All rights reserved. * micro T-Kernel is distributed under the micro T-License. *---------------------------------------------------------------------- * * Version: 1.00.00 * Released by T-Engine Forum(http://www.t-engine.org) at 2007/03/26. * *---------------------------------------------------------------------- *//* * tkdev_init.c (AT91) * micro T-Kernel Device-Dependent Initialization/Finalization */#include "kernel.h"#include <tk/sysdef.h>#include <tk/syslib.h>#include <tm/tmonitor.h>EXPORT UW knl_TimerClkDiv; /* Dividing rate of timer clock *//* * Target system-dependent initialization */EXPORT ER knl_tkdev_initialize( void ){ out_w(AIC_BASE | AIC_IDCR, 0xffffffff); /* disable */ out_w(AIC_BASE | AIC_ICCR, 0xffffffff); /* clear */ return E_OK;}#if USE_CLEANUP/* * Target system-dependent finalization * No return from this function. */EXPORT void knl_tkdev_exit( void ){ disint(); tm_exit(0); /* Turn off power and exit */ /* Not suppose to return from 'tm_exit,' but just in case */ for ( ;; ) { tm_monitor(); /* To T-Monitor equivalent function */ }}#endif /* USE_CLEANUP */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -