main.c
来自「Freescale MCF5445evb 参考测试代码」· C语言 代码 · 共 50 行
C
50 行
#include "common.h"/********************************************************************/void main (void){ int i, hashi; char hash[5]; hash[0]=8; /* Backspace */ hash[1]=124;/* "|" */ hash[2]=47; /* "/" */ hash[3]=45; /* "-" */ hash[4]=92; /* "\" */ /* Turn on I-cache and B-cache */ mcf5xxx_wr_cacr(0 | MCF5XXX_CACR_BEC | MCF5XXX_CACR_BCINVA | MCF5XXX_CACR_IEC | MCF5XXX_CACR_IDCM | MCF5XXX_CACR_ICINVA); /* Cache Flexbus and SDRAM regions */ mcf5xxx_wr_acr2(0 | MCF5XXX_ACR_AB(0x00000000) | MCF5XXX_ACR_AM_2G | MCF5XXX_ACR_EN | MCF5XXX_ACR_SM_IGNORE); printf("\nKRAM Dual-Access Tests\n"); i = 0; while(1) { /* Twirlies on the UART/USB output */ if (i++ == 1000) { i = 0; CPLD_LEDS = 1<<hashi; out_char(hash[0]); out_char(hash[hashi]); hashi = (hashi + 1) % 5; } burst_writes(FLASH1_ADDRESS, 10); kram_dual_access(); //kram_sized_access(); }}/********************************************************************/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?