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

📄 board.c.svn-base

📁 RT-Thread是发展中的下一代微内核嵌入式实时操作系统
💻 SVN-BASE
字号:
/* * File      : board.c * This file is part of RT-Thread RTOS * COPYRIGHT (C) 2006, RT-Thread Develop Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://openlab.rt-thread.com/license/LICENSE * * Change Logs: * Date           Author       Notes * 2006-09-06     XuXinming    first version */#include <rtthread.h>#include <rthw.h>#include <s3c44b0.h>#include "board.h"/* #define BOARD_DEBUG */#define DATA_COUNT	1000static void rt_hw_port_init(void){}/** * @addtogroup sgps44b0 *//*@{*/void rt_timer_handler(int vector){#ifdef BOARD_DEBUG	rt_kprintf("rt_timer_handler");#endif	rt_tick_increase();}/** * This function will init sgps44b0 board */void rt_hw_board_init(){	/* setup port */	rt_hw_port_init();		/* set timer0 register */	/* stop timer */	TCON 	&= ~(0x00000001);	/* prescaler setting, prescaler0 = 0x08 */	TCFG0 	&= ~(0x000000ff);	TCFG0 	|= ~(0x00000008);	/* timer configuration register 0, divider = 1/8 */	TCFG1 	&= ~(0x0000000f);	TCFG1 	|= (0x00000002);	TCNTB0 	= DATA_COUNT;	TCMPB0 	= 0;	/* manual update */	TCON	|=0x00000002;	/* auto reload on,output inverter off */	TCON 	&= ~(0x0000000f);	TCON 	|= (0x00000008);	/* clear manual update */	TCON	&= ~(0x00000002);	/* install timer handler */	rt_hw_interrupt_install(INT_TIMER0, rt_timer_handler, RT_NULL);	rt_hw_interrupt_umask(INT_TIMER0);	/* start timer */	TCON 	|=(0x00000001);}void rt_hw_led_set(rt_uint32 led){}/**  * flash the leds of board */void rt_hw_led_flash(void){}#ifdef RT_USING_FINSHextern void finsh_notify(void);void rt_serial_isr(int vector){	finsh_notify();}/**  * init the hardware related with finsh shell */void rt_hw_finsh_init(){	/* install UART isr */	rt_hw_interrupt_install(INT_URXD0, rt_serial_isr, RT_NULL);	rt_hw_interrupt_umask(INT_URXD0);}#endif/*@}*/

⌨️ 快捷键说明

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