wcompare.c

来自「详细介绍了一篇关于pci开发的接口芯片」· C语言 代码 · 共 34 行

C
34
字号
/* wcompare.c */


#include <stdtypes.h>
#include <clib1.h>

int write_compare( LONG length, VOID *source, VOID *destination, \
    CHAR *err_string, WORD max_err_length, WORD flags)

/*
   "source" is copied to "destination", then read back and compared.

   Assumes that source and destination can be accessed the same way (size-wise).
   For example, this allows WORD source <-> LONG destination as long as
   dynamic bus sizing is supported.

   "length" not currently supported.
   "flags" is defined in c_sub1.h.

   Entry:
   Exit:    <> if OK.
*/
{
   if ( !length ) return(1);


   /* copy data from SOURCE to DEST */
   copy( length, source, destination, flags);

   return compare( length, source, destination, err_string,
      max_err_length, flags);
}

⌨️ 快捷键说明

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