• 大小: 143KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-06-17
  • 语言: 其他
  • 标签: 7441  linux  驱动  

资源简介

ADV7441 linux驱动,完整源码,make直接生成初始化应用程序。 本代码为完整驱动,并且结构分明,并非只是简单的配置几个寄存器。 阅读本代码可以完整了解7441 或7842的芯片初始化流程,简单易懂,条理性强。推荐下载。

资源截图

代码片段和文件信息

/*
 * memtester version 4
 *
 * Very simple but very effective user-space memory tester.
 * Originally by Simon Kirby  
 * Version 2 by Charles Cazabon 
 * Version 3 not publicly released.
 * Version 4 rewrite:
 * Copyright (C) 2004-2012 Charles Cazabon 
 * Licensed under the terms of the GNU General Public License version 2 (only).
 * See the file COPYING for details.
 *
 */

#define __version__ “4.3.0“

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include “types.h“
#include “sizes.h“
#include “tests.h“

#define EXIT_FAIL_NonstartER    0x01
#define EXIT_FAIL_ADDRESSLINES  0x02
#define EXIT_FAIL_OTHERTEST     0x04

struct test tests[] = {
    { “Random Value“ test_random_value }
    { “Compare XOR“ test_xor_comparison }
    { “Compare SUB“ test_sub_comparison }
    { “Compare MUL“ test_mul_comparison }
    { “Compare DIV“test_div_comparison }
    { “Compare OR“ test_or_comparison }
    { “Compare AND“ test_and_comparison }
    { “Sequential Increment“ test_seqinc_comparison }
    { “Solid Bits“ test_solidbits_comparison }
    { “Block Sequential“ test_blockseq_comparison }
    { “Checkerboard“ test_checkerboard_comparison }
    { “Bit Spread“ test_bitspread_comparison }
    { “Bit Flip“ test_bitflip_comparison }
    { “Walking Ones“ test_walkbits1_comparison }
    { “Walking Zeroes“ test_walkbits0_comparison }
#ifdef TEST_NARROW_WRITES    
    { “8-bit Writes“ test_8bit_wide_random }
    { “16-bit Writes“ test_16bit_wide_random }
#endif
    { NULL NULL }
};

/* Sanity checks and portability helper macros. */
#ifdef _SC_VERSION
void check_posix_system(void) {
    if (sysconf(_SC_VERSION) < 198808L) {
        fprintf(stderr “A POSIX system is required.  Don‘t be surprised if “
            “this craps out.\n“);
        fprintf(stderr “_SC_VERSION is %lu\n“ sysconf(_SC_VERSION));
    }
}
#else
#define check_posix_system()
#endif

#ifdef _SC_PAGE_SIZE
int memtester_pagesize(void) {
    int pagesize = sysconf(_SC_PAGE_SIZE);
    if (pagesize == -1) {
        perror(“get page size failed“);
        exit(EXIT_FAIL_NonstartER);
    }
    printf(“pagesize is %ld\n“ (long) pagesize);
    return pagesize;
}
#else
int memtester_pagesize(void) {
    printf(“sysconf(_SC_PAGE_SIZE) not supported; using pagesize of 8192\n“);
    return 8192;
}
#endif

/* Some systems don‘t define MAP_LOCKED.  Define it to 0 here
   so it‘s just a no-op when ORed with other constants. */
#ifndef MAP_LOCKED
  #define MAP_LOCKED 0
#endif

/* Function declarations */
void usage(char *me);

/* Global vars - so tests have access to this information */
int use_phys = 0;
off_t physaddrbase = 0;

/* Function definitions */
void usage(char *me) {
    fprintf(stderr “\n“
            “Usage: %s [-p phy

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        399  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\BUGS

     文件       4772  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\CHANGELOG

     文件        128  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\conf-cc

     文件         62  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\conf-ld

     文件      18007  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\COPYING

     文件        197  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\extra-libs.sh

     文件       3395  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\find-systype.sh

     文件         31  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\make-compile.sh

     文件         73  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\make-load.sh

     文件        210  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\make-makelib.sh

     文件       2132  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\Makefile

     文件       4721  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\memtester.8

     文件      13517  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\memtester.c

     文件        679  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\memtester.h

     文件       5726  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\README

     文件       1311  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\README.tests

     文件       1357  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\sizes.h

     文件      23282  2016-11-08 11:08  video_subsys_7441\memtester-4.3.0\testddr

     文件      14093  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\tests.c

     文件       2489  2016-11-08 11:07  video_subsys_7441\memtester-4.3.0\tests.h

     文件        890  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\types.h

     文件         64  2012-06-10 05:45  video_subsys_7441\memtester-4.3.0\warn-auto.sh

     文件      22113  2016-11-07 23:01  video_subsys_7441\memtester-4.3.0.tar.gz

     文件      66166  2016-11-13 13:23  video_subsys_7441\video_subsys\7441_hdmiInit

     文件      66166  2016-11-13 13:20  video_subsys_7441\video_subsys\7441_vgaInit

     文件        148  2016-11-07 17:07  video_subsys_7441\video_subsys\build.sh

     文件        340  2016-05-11 09:53  video_subsys_7441\video_subsys\inc\adv7441a.h

     文件        965  2016-05-11 09:53  video_subsys_7441\video_subsys\inc\i2c_dev.h

     文件      11910  2016-05-11 09:53  video_subsys_7441\video_subsys\inc\video_const.h

     文件       3272  2016-11-10 18:51  video_subsys_7441\video_subsys\inc\video_subdev.h

............此处省略36个文件信息

评论

共有 条评论