⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 emiftest.c

📁 CHP 2 - Real-Time Digital Signal Processing: Implementations and Applications, Second Edition by Sen
💻 C
字号:
// 
//  Project: Experiment 2.10.4 Configure EMIF - Chapter 2 
//  File name: emifTest.c   
//  Function(s): main()        
//
//  Description: This funciton initializes the C55x DSK EMIF registers
//               and writes data to SDRAM
//
//  For the book "Real Time Digital Signal Processing: 
//                Implementation and Application, 2nd Ed"
//                By Sen M. Kuo, Bob H. Lee, and Wenshun Tian
//                Publisher: John Wiley and Sons, Ltd
//
//  Tools used: CCS v.2.12.07
//              TMS320VC5510 DSK Rev-C
//

#include "emif.h"

#pragma CODE_SECTION(main,    ".text:example:main");

void main()
{      
  // Initialize the EMIF     
  emifInit();
    
  // Draw the background 
  drawBox(0,   0, 0x00000000, 0x00000000, 0x00000000); 

  // Draw 24 color boxes 
  drawBox(4,   4, 0x4A4A4A4A, 0x20202020, 0x15151515);
  drawBox(4,  30, 0xC1C1C1C1, 0x7D7D7D7D, 0x6D6D6D6D);
  drawBox(4,  56, 0x37373737, 0x50505050, 0x77777777);
  drawBox(4,  82, 0x24242424, 0x33333333, 0x15151515);
  drawBox(4, 108, 0x6D6D6D6D, 0x65656565, 0x98989898);
  drawBox(4, 134, 0x69696969, 0xB9B9B9B9, 0xB4B4B4B4);

  drawBox(33,  4, 0xC6C6C6C6, 0x56565656, 0x0D0D0D0D);
  drawBox(33, 30, 0x25252525, 0x30303030, 0x81818181);
  drawBox(33, 56, 0xB8B8B8B8, 0x29292929, 0x2E2E2E2E);
  drawBox(33, 82, 0x25252525, 0x12121212, 0x24242424);
  drawBox(33,108, 0x85858585, 0xA3A3A3A3, 0x2A2A2A2A);
  drawBox(33,134, 0xCFCFCFCF, 0x86868686, 0x11111111);

  drawBox(62,  4, 0x11111111, 0x18181818, 0x6B6B6B6B);
  drawBox(62, 30, 0x27272727, 0x6C6C6C6C, 0x26262626);
  drawBox(62, 56, 0xA1A1A1A1, 0x0F0F0F0F, 0x11111111);
  drawBox(62, 82, 0xE2E2E2E2, 0xB8B8B8B8, 0x27272727);
  drawBox(62,108, 0xAAAAAAAA, 0x2E2E2E2E, 0x61616161);
  drawBox(62,134, 0x1D1D1D1D, 0x65656565, 0x9A9A9A9A);

  drawBox(91,  4, 0xF8F8F8F8, 0xF8F8F8F8, 0xF8F8F8F8);
  drawBox(91, 30, 0xC2C2C2C2, 0xC2C2C2C2, 0xC2C2C2C2);
  drawBox(91, 56, 0x82828282, 0x82828282, 0x82828282);
  drawBox(91, 82, 0x40404040, 0x40404040, 0x40404040);
  drawBox(91,108, 0x16161616, 0x16161616, 0x16161616);
  drawBox(91,134, 0x09090909, 0x09090909, 0x09090909);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -