📄 sanosentry.c
字号:
// file: SanOSentry.c
// by : Sanicle
// ver : 2005.03.16
// from: http://3mn.net
// This file is used to test SanOSlib on Samsung2410
#include <stdlib.h>
#include <string.h>
#include "def.h"
#include "2410lib.h"
#include "Drivers\SanDriverMouse.h"
int TickSpeed=1;
/////////// Interrupt Processes ////////////
void __irq WDTInterrupt()
{
ClearPending(BIT_WDT);
//Uart_SendString("\n WatchDog.\n");
//
}
void __irq EINT0Interrupt()
{
ClearPending(BIT_EINT0);
Uart_SendString("I'am EINT0.\n");
}
/////////// C Entry Point ////////////
void Starting()
{
// Fill the ISR table
pISR_WDT = (U32)WDTInterrupt;
pISR_UART1 = (U32)MouseInterrupt;
pISR_EINT0 = (U32)EINT0Interrupt;
// Enable EINT0
BIT_CLR(rINTMSK, BIT_EINT0); // Enable interrupt
ClearPending(BIT_EINT0); // Clear any pending int
// Initialize Uart
Uart_Init();
Uart_SendString("OS Get Ready.\n");
mouseInit();
// Enable Watchdog
rWTDAT = rWTCNT = PCLK / 16 / TickSpeed; // Setup the WDT for TickSpeed
rWTCON = (0x80<<8)|(1<<5)|(0<<3)|(1<<2)|(0<<0); // Enable: WD, WD interrupts
BIT_CLR(rINTMSK, BIT_WDT);
ClearPending(BIT_WDT);
while(1);
//Finish Starting will goto 0x0
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -