OpenCores
URL https://opencores.org/ocsvn/csa/csa/trunk

Subversion Repositories csa

[/] [csa/] [trunk/] [pc/] [csa_test.c] - Blame information for rev 51

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 simon111
/*
2
 * =====================================================================================
3
 *
4
 *       Filename:  csa_test.c
5
 *
6
 *    Description:  the csa test file
7
 *
8
 *        Version:  1.0
9
 *        Created:  04/16/2009 08:06:34 PM
10
 *       Revision:  none
11
 *       Compiler:  gcc
12
 *
13
 *         Author:  mengxipeng@gmail.com
14
 *
15
 * =====================================================================================
16
 */
17
 
18
 
19
 
20 38 simon111
#include <memory.h>
21
#include <stdlib.h>
22 30 simon111
#include "misc.h"
23
#include "imgdev.h"
24
 
25 39 simon111
unsigned char buf[512];
26
 
27 30 simon111
int main()
28
{
29
        int i;
30
        if(img_dev_open()<0)
31
        {
32
                DEBUG_LINE("can not open image device");
33
                return -1;
34
        }
35
 
36 32 simon111
        for(i=0;i<100;i++)
37 30 simon111
        {
38 39 simon111
                int n;
39 38 simon111
                DEBUG_LINE("i=%d",i);
40 39 simon111
                n=256-i;
41
                img_read_img((unsigned char*)buf,sizeof buf);
42 38 simon111
                sleep(1);
43 30 simon111
        }
44
        img_dev_close();
45
        return 0;
46 32 simon111
}
47 30 simon111
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.