Ai
1 Star 0 Fork 1

forest_555/skyeye_rawos

forked from hehe/skyeye_rawos 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
boot.c 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
嵌入式-老费 提交于 2014-06-30 00:17 +08:00 . add all rawos files
#include "raw_api.h"
typedef void (*init_func)(void);
#define UFCON0 ((volatile unsigned int *)(0x50000020))
void helloworld(void){
const char *p="helloworld\n";
while(*p){
*UFCON0=*p++;
};
}
void test_mmu(void){
const char *p="test_mmu\n";
while(*p){
*(volatile unsigned int *)0xd0000020=*p++;
};
}
static init_func init[]={
helloworld,
0,
};
void timer_init(void){
#define TIMER_BASE (0xd1000000)
#define TCFG0 ((volatile unsigned int *)(TIMER_BASE+0x0))
#define TCFG1 ((volatile unsigned int *)(TIMER_BASE+0x4))
#define TCON ((volatile unsigned int *)(TIMER_BASE+0x8))
#define TCONB4 ((volatile unsigned int *)(TIMER_BASE+0x3c))
*TCFG0|=0x800;
*TCON&=(~(7<<20));
*TCON|=(1<<22);
*TCON|=(1<<21);
*TCONB4=10000;
*TCON|=(1<<20);
*TCON&=~(1<<21);
umask_int(14);
disable_irq();
// enable_irq();
}
int test_switch = 0;
void plat_boot(void){
int i;
for(i=0;init[i];i++){
init[i]();
}
init_sys_mmu();
start_mmu();
test_mmu();
test_printk();
timer_init();
raw_os_init();
test_task();
//test_sem();
//test_mutex();
//test_timer();
//test_block();
//test_byte();
raw_os_start();
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/forest555/skyeye_rawos.git
git@gitee.com:forest555/skyeye_rawos.git
forest555
skyeye_rawos
skyeye_rawos
master

搜索帮助