• 大小: 15.43MB
    文件类型: .zip
    金币: 2
    下载: 0 次
    发布日期: 2024-01-31
  • 语言: 其他
  • 标签: DE0  驱动  

资源简介

在Control_panel文件夹下有驱动程序连接板子后直接运行就可以啦

资源截图

代码片段和文件信息

// --------------------------------------------------------------------
// Copyright (c) 2009 by Terasic Technologies Inc. 
// --------------------------------------------------------------------
//
// Permission:
//
//   Terasic grants permission to use and modify this code for use
//   in synthesis for all Terasic Development Boards and Altera Development 
//   Kits made by Terasic.  Other use of this code including the selling 
//   duplication or modification of any portion is strictly prohibited.
//
// Disclaimer:
//
//   This VHDL/Verilog or C/C++ source code is intended as a design reference
//   which illustrates how these types of functions can be implemented.
//   It is the user‘s responsibility to verify their design for
//   consistency and functionality through the use of formal
//   verification methods.  Terasic provides no warranty regarding the use 
//   or functionality of this code.
//
// --------------------------------------------------------------------
//           
//                     Terasic Technologies Inc
//                     356 Fu-Shin E. Rd Sec. 1. JhuBei City
//                     HsinChu County Taiwan
//                     302
//
//                     web: http://www.terasic.com/
//                     email: support@terasic.com
//
// --------------------------------------------------------------------


#include “terasic_includes.h“
#include “FatFileSystem.h“
#include “SDCardDriver.h“



bool Fat_Test(FAT_HANDLE hFat char *pDumpFile){
    bool bSuccess;
    int nCount = 0;
    FAT_BROWSE_HANDLE hBrowse;
    FILE_CONTEXT FileContext;
    
    bSuccess = Fat_FileBrowseBegin(hFat &hBrowse);
    if (bSuccess){
        while(Fat_FileBrowseNext(&hBrowse &FileContext)){
            if (FileContext.bLongFilename){
                alt_u16 *pData16;
                alt_u8 *pData8;
                pData16 = (alt_u16 *)FileContext.szName;
                pData8 = FileContext.szName;
                printf(“[%d]“ nCount);
                while(*pData16){
                    if (*pData8)
                        printf(“%c“ *pData8);
                    pData8++;
                    if (*pData8)
                        printf(“%c“ *pData8);
                    pData8++;                    
                    //    
                    pData16++;
                }
                printf(“\n“);
                  
            }else{
                printf(“[%d]%s\n“ nCount FileContext.szName);
            }                
            nCount++;
        }    
    }
    if (bSuccess && pDumpFile && strlen(pDumpFile)){
        FAT_FILE_HANDLE hFile;
        hFile =  Fat_FileOpen(hFat pDumpFile);
        if (hFile){
            char szRead[256];
            int nReadSize nFileSize nTotalReadSize=0;
            nFileSize = Fat_FileSize(hFile);
            if (nReadSize > sizeof(szRead))
                nReadSize = sizeof(szRead);
 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-07-23 00:13  DE0_SYSYEM_CD_V_1_0\
     目录           0  2013-07-23 00:12  DE0_SYSYEM_CD_V_1_0\Control_panel\
     文件     1422848  2009-05-12 20:05  DE0_SYSYEM_CD_V_1_0\Control_panel\DE0_ControlPanel.exe
     文件      496549  2009-05-12 20:06  DE0_SYSYEM_CD_V_1_0\Control_panel\DE0_ControlPanel.sof
     文件      515072  2009-03-25 14:49  DE0_SYSYEM_CD_V_1_0\Control_panel\TERASIC_DOWNLOAD.dll
     文件       52736  2008-04-03 20:27  DE0_SYSYEM_CD_V_1_0\Control_panel\TERASIC_JTAG.dll
     文件       40960  2006-05-09 09:55  DE0_SYSYEM_CD_V_1_0\Control_panel\TERASIC_JTAG_DRIVE.dll
     目录           0  2013-07-23 00:12  DE0_SYSYEM_CD_V_1_0\Datasheet\
     目录           0  2013-07-23 00:12  DE0_SYSYEM_CD_V_1_0\Datasheet\Altera Cyclone III FPGA\
     文件     5367086  2009-06-06 10:09  DE0_SYSYEM_CD_V_1_0\Datasheet\Altera Cyclone III FPGA\cyclone3_handbook.pdf
     目录           0  2013-07-23 00:12  DE0_SYSYEM_CD_V_1_0\Datasheet\LCD\
     文件      243501  2005-07-05 09:33  DE0_SYSYEM_CD_V_1_0\Datasheet\LCD\CFAH1602BTMCJP.pdf
     目录           0  2013-07-23 00:12  DE0_SYSYEM_CD_V_1_0\Datasheet\Memory\
     目录           0  2013-07-23 00:12  DE0_SYSYEM_CD_V_1_0\Datasheet\Memory\FLASH\
     文件     1642132  2005-11-16 23:20  DE0_SYSYEM_CD_V_1_0\Datasheet\Memory\FLASH\S29AL032D_00_A5_E.pdf
     目录           0  2013-07-23 00:12  DE0_SYSYEM_CD_V_1_0\Datasheet\Memory\SDRAM\
     文件     1539072  2005-08-25 11:21  DE0_SYSYEM_CD_V_1_0\Datasheet\Memory\SDRAM\IS42S16400.pdf
     目录           0  2013-07-23 00:12  DE0_SYSYEM_CD_V_1_0\Datasheet\RS232\
     文件      428788  2005-08-25 13:32  DE0_SYSYEM_CD_V_1_0\Datasheet\RS232\max232.pdf
     目录           0  2013-07-23 00:13  DE0_SYSYEM_CD_V_1_0\Demonstrations\
     目录           0  2013-07-23 00:12  DE0_SYSYEM_CD_V_1_0\Demonstrations\DE0_Default\
     文件       58470  2009-06-02 15:16  DE0_SYSYEM_CD_V_1_0\Demonstrations\DE0_Default\DE0_Default.pin
     文件      524498  2009-06-02 15:16  DE0_SYSYEM_CD_V_1_0\Demonstrations\DE0_Default\DE0_Default.pof
     文件         912  2009-03-06 15:56  DE0_SYSYEM_CD_V_1_0\Demonstrations\DE0_Default\DE0_Default.qpf
     文件       33188  2011-03-19 10:49  DE0_SYSYEM_CD_V_1_0\Demonstrations\DE0_Default\DE0_Default.qsf
     文件          90  2011-03-19 10:49  DE0_SYSYEM_CD_V_1_0\Demonstrations\DE0_Default\DE0_Default.qws
     文件      496546  2009-06-02 15:16  DE0_SYSYEM_CD_V_1_0\Demonstrations\DE0_Default\DE0_Default.sof
     文件       12237  2009-05-23 15:44  DE0_SYSYEM_CD_V_1_0\Demonstrations\DE0_Default\DE0_Default.v
     文件       42588  2009-04-27 14:47  DE0_SYSYEM_CD_V_1_0\Demonstrations\DE0_Default\DE0_Default_assignment_defaults.qdf
     目录           0  2013-07-23 00:12  DE0_SYSYEM_CD_V_1_0\Demonstrations\DE0_Default\V\
     文件        5126  2009-05-13 13:15  DE0_SYSYEM_CD_V_1_0\Demonstrations\DE0_Default\V\IMG_RAM.bsf
............此处省略476个文件信息

评论

共有 条评论