?? cpu.c
字號:
/* * File : cpu.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://openlab.rt-thread.com/license/LICENSE * * Change Logs: * Date Author Notes * 2006-03-13 Bernard first version */#include <rtthread.h>#include "s3c4510.h"/** * @addtogroup S3C4510 *//*@{*//** * This function will enable I-Cache of CPU * */void rt_hw_cpu_icache_enable(){ rt_base_t reg; volatile int i; /* flush cache before enable */ rt_uint32_t *tagram = (rt_uint32_t *)S3C4510_SRAM_ADDR; SYSCFG &= ~(1<<1); /* Disable cache */ for(i=0; i < 256; i++) { *tagram = 0x00000000; tagram += 1; } /* Enable chache */ reg = SYSCFG; reg |= (1 << 1); SYSCFG = reg;}/** * This function will disable I-Cache of CPU * */void rt_hw_cpu_icache_disable(){ rt_base_t reg; reg = SYSCFG; reg &= ~(1<<1); SYSCFG = reg;}/** * this function will get the status of I-Cache * */rt_base_t rt_hw_cpu_icache_status(){ return 0;}/** * this function will enable D-Cache of CPU * */void rt_hw_cpu_dcache_enable(){ rt_hw_cpu_icache_enable();}/** * this function will disable D-Cache of CPU * */void rt_hw_cpu_dcache_disable(){ rt_hw_cpu_icache_disable();}/** * this function will get the status of D-Cache * */rt_base_t rt_hw_cpu_dcache_status(){ return rt_hw_cpu_icache_status();}/** * this function will reset CPU * */void rt_hw_cpu_reset(){}/** * this function will shutdown CPU * */void rt_hw_cpu_shutdown(){ rt_kprintf("shutdown...\n"); while (1);}/*@}*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -