1 Star 0 Fork 14

yondwell/BXT-OS Development

forked from 百晓通客栈/BXT-OS 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
space_mod.c 822 Bytes
一键复制 编辑 原始数据 按行查看 历史
KK 提交于 2014-09-01 16:04 . Update space_mod.c
#include "comment_def.h"
int space_main(int start_mm_pos)
{
SPACEMM *space_start = (SPACEMM *)start_mm_pos;
int i;
//给结构进行内存分配
KEYBUF *keybuf = (KEYBUF *)(space_start -> char_driver);
MEMORYCTRL *memctrl = (MEMORYCTRL *)(space_start -> mm);
TIMER *timer = (TIMER *)(space_start -> block_driver);
//初始化按键缓冲区结构体
keybuf -> use = 0;
keybuf -> position = 19;
//初始化内存管理相关结构体
memctrl -> mem_base = 0x180000 + 8 * 8 * 1024 + 512;
for(i = 0;i < 8;i++)
{
memctrl -> mem_use[i] = 0;
memctrl -> mem_offset[i] = memctrl -> mem_base + i * 1024 * 1024;
}
//初始化时钟结构体
timer -> time_10mm = 0;
timer -> time_s = 0;
timer -> time_m = 0;
timer -> time_h = 0;
timer -> time_view = 0;
return 0;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yond/BXT-OS-Development.git
git@gitee.com:yond/BXT-OS-Development.git
yond
BXT-OS-Development
BXT-OS Development
src

搜索帮助