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

📄 sma_mem_test.h

📁 在sharp 404开发板的串口测试代码
💻 H
字号:
/*********************************************************************** 
 * $Workfile:   SMA_mem_test.h  $ 
 * $Revision:   1.2  $ 
 * $Author:   KovitzP  $ 
 * $Date:   Jun 18 2002 08:02:32  $ 
 * 
 * Project: 
 * 
 * Description: 
 *     This file contains data, function and macro definitions for
 *     testing memory. These functions may be used with any chip
 *     that addresses memory sequentially.
 * 
 * 
 * Revision History: 
 * $Log:   //smaicnt2/pvcs/VM/CHIPS/archives/SOC/Include/SMA_mem_test.h-arc  $ 
 * 
 *    Rev 1.2   Jun 18 2002 08:02:32   KovitzP
 * Changed extern "C" { to meet coding standard.
 * 
 *    Rev 1.1   May 30 2002 17:36:22   KovitzP
 * Added random address testing.
 * 
 *    Rev 1.0   May 28 2002 13:15:16   KovitzP
 * Initial revision.
 * 
 * 
 *********************************************************************** 
 * 
 *  Copyright (c) 2002 Sharp Microelectronics of the Americas 
 * 
 *  All rights reserved 
 * 
 *  SHARP MICROELECTRONICS OF THE AMERICAS MAKES NO REPRESENTATION 
 *  OR WARRANTIES WITH RESPECT TO THE PERFORMANCE OF THIS SOFTWARE, 
 *  AND SPECIFICALLY DISCLAIMS ANY RESPONSIBILITY FOR ANY DAMAGES, 
 *  SPECIAL OR CONSEQUENTIAL, CONNECTED WITH THE USE OF THIS SOFTWARE. 
 * 
 *  SHARP MICROELECTRONICS OF THE AMERICAS PROVIDES THIS SOFTWARE SOLELY 
 *  FOR THE PURPOSE OF SOFTWARE DEVELOPMENT INCORPORATING THE USE OF A 
 *  SHARP MICROCONTROLLER OR SYSTEM-ON-CHIP PRODUCT. USE OF THIS SOURCE 
 *  FILE IMPLIES ACCEPTANCE OF THESE CONDITIONS. 
 * 
 **********************************************************************/ 
#ifndef SMA_MEM_TEST_H
#define SMA_MEM_TEST_H

#include "SMA_types.h"


typedef struct
{
    const CHAR * test_name;  // the name of the test;
    volatile void * addr;    // the address of the failure
    volatile UNS_32 written; // the data written to memory
    volatile UNS_32 read;    // the data read back (in error)
} MEM_ERROR_T;

/*********************************************************************** 
 *                      F U N C T I O N S
 **********************************************************************/ 

#if defined(__cplusplus) 
extern "C" 
{
#endif

void mem_fill8(UNS_8 * start, UNS_8 * end, UNS_8 pattern);
void mem_fill16(UNS_16 * start, UNS_16 * end, UNS_16 pattern);
void mem_fill32(UNS_32 * start, UNS_32 * end, UNS_32 pattern);
void mem_fill_modify8(UNS_8 * start, UNS_8 * end, UNS_8 pattern);
void mem_fill_modify16(UNS_16 * start, UNS_16 * end, UNS_16 pattern);
void mem_fill_modify32(UNS_32 * start, UNS_32 * end, UNS_32 pattern);
UNS_32 mem_verify8(UNS_8 * start, UNS_8 * end, UNS_8 pattern,
                           MEM_ERROR_T * log, UNS_32 max_err,
                           const CHAR * test_name);
UNS_32 mem_verify16(UNS_16 * start, UNS_16 * end, UNS_16 pattern,
                           MEM_ERROR_T * log, UNS_32 max_err,
                           const CHAR * test_name);
UNS_32 mem_verify32(UNS_32 * start, UNS_32 * end, UNS_32 pattern,
                           MEM_ERROR_T * log, UNS_32 max_err,
                           const CHAR * test_name);
UNS_32 mem_verify_modify8(UNS_8 * start, UNS_8 * end, UNS_8 pattern,
                           MEM_ERROR_T * log, UNS_32 max_err,
                           const CHAR * test_name);
UNS_32 mem_verify_modify16(UNS_16 * start, UNS_16 * end, UNS_16 pattern,
                           MEM_ERROR_T * log, UNS_32 max_err,
                           const CHAR * test_name);
 
UNS_32 mem_verify_modify32(UNS_32 * start, UNS_32 * end, UNS_32 pattern,
                           MEM_ERROR_T * log, UNS_32 max_err,
                           const CHAR * test_name);
UNS_32 mem_test8(UNS_8 * start, UNS_8 * end, 
                 MEM_ERROR_T * log, UNS_32 max_err);
UNS_32 mem_test16(UNS_16 * start, UNS_16 * end, 
                 MEM_ERROR_T * log, UNS_32 max_err);
UNS_32 mem_test32(UNS_32 * start, UNS_32 * end, 
                 MEM_ERROR_T * log, UNS_32 max_err);

UNS_8 mem_test_data_bus8(UNS_8 * addr);
UNS_16 mem_test_data_bus16(UNS_16 * addr);
UNS_32 mem_test_data_bus32(UNS_32 * addr);
UNS_8 * mem_test_addr_bus8(UNS_8 * addr, UNS_32 nbytes);
UNS_16 * mem_test_addr_bus16(UNS_16 * addr, UNS_32 nbytes);
UNS_32 * mem_test_addr_bus32(UNS_32 * addr, UNS_32 nbytes);
INT_32 mem_test_random8(UNS_8 * start, UNS_32 length,
                           MEM_ERROR_T * log, UNS_32 max_err,
                           const CHAR * test_name);
INT_32 mem_test_random16(UNS_16 * start, UNS_32 length,
                           MEM_ERROR_T * log, UNS_32 max_err,
                           const CHAR * test_name);
INT_32 mem_test_random32(UNS_32 * start, UNS_32 length,
                           MEM_ERROR_T * log, UNS_32 max_err,
                           const CHAR * test_name);


#if defined(__cplusplus) 
}
#endif
#endif //SMA_MEM_TEST_H

⌨️ 快捷键说明

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