?? 44b_main.c.bak
字號:
/******************************************************************************
Copyright (c) 2006 by RockOS.
All rights reserved.
This software is supported by Rock Software Workroom.
Any bugs please contact the author with e-mail or QQ:
E-mail : baobaoba520@yahoo.com.cn
QQ : 59681888
*******************************************************************************
File name : main.c
Description : This is the C entry for ARM board.
:
Auther : sunxinqiu
History :
2006-3-15 first release.
******************************************************************************/
#include "bsp.h"
/******************************************************************************
Function : void Main()
Params : N/A
:
:
:
Return : never return.
Description : this is the main entry of the C code, all hardware devices should
: should be initialized before starting the OS.
******************************************************************************/
void Main ()
{
/* Init GPIO. */
init_gpio();
/* interrupt controller. */
init_irq();
/* RTC and Tick. */
init_rtc();
/* PWM Timer. */
init_pwm();
/* start pwm timer5. */
pwm_start(PWM_TIMER5, 100, 1);
/* UART. */
init_uart();
set_uart_mode(UART_CH0, 57600, PARITY_NONE);
/* display the copyright informations. */
UART_sendString(UART_CH0, "*******************************************************************************\n");
UART_sendString(UART_CH0, "* Copyright (c) 2006 by RockOS. *\n");
UART_sendString(UART_CH0, "* All rights reserved. *\n");
UART_sendString(UART_CH0, "* *\n");
UART_sendString(UART_CH0, "* This software is issued by Rock Software Workroom. *\n");
UART_sendString(UART_CH0, "* *\n");
UART_sendString(UART_CH0, "* Any bugs please contact the author with e-mail or QQ: *\n");
UART_sendString(UART_CH0, "* E-mail : baobaoba520@yahoo.com.cn *\n");
UART_sendString(UART_CH0, "* QQ : 59681888 *\n");
UART_sendString(UART_CH0, "*******************************************************************************\n");
g_exception = NONE_EXCEPTION;
/* install main ISRs. */
pISR_TICK = (unsigned)TickHandler;
pISR_URXD0 = (unsigned)RxD0Handler;
pISR_UERR01 = (unsigned)Uerr01Handler;
// pISR_TIMER5 = (unsigned)Timer5Handler;
add_irq(IRQ_TICK);
add_irq(IRQ_URXD0);
add_irq(IRQ_UERR01);
// add_irq(IRQ_TIMER5);
/* then start the os. */
root();
enable_watchdog();
while(1);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -