board.c
来自「RT-Thread是发展中的下一代微内核嵌入式实时操作系统」· C语言 代码 · 共 54 行
C
54 行
/* * 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://www.fayfayspace.org/license/LICENSE. * * Change Logs: * Date Author Notes * 2006-03-24 Bernard first implementation * 2006-05-05 Bernard add DATA_COUNT definition */#include <rtthread.h>#include <rthw.h>#include <s3c4510.h>#define DATA_COUNT 0x7a120/*! * @addtogroup lumit4510 *//*@{*/void rt_timer_handler(int vector){ /* reset TDATA0 */ TDATA0 = DATA_COUNT; rt_tick_increase();}/** * @brief init lumit4510 board * * This function will init lumit4510 board */void rt_hw_board_init(){ /* set timer0 register */ TDATA0 = DATA_COUNT; TCNT0 = 0x0; TMOD = 0x3; /* install interrupt handler */ rt_hw_interrupt_install(INTTIMER0, rt_timer_handler, RT_NULL); rt_hw_interrupt_umask(INTTIMER0);}/*@}*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?