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

Subversion Repositories csa

[/] [csa/] [trunk/] [pc/] [csa_test.c] - Diff between revs 38 and 39

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 38 Rev 39
Line 20... Line 20...
#include <memory.h>
#include <memory.h>
#include <stdlib.h>
#include <stdlib.h>
#include "misc.h"
#include "misc.h"
#include "imgdev.h"
#include "imgdev.h"
 
 
 
unsigned char buf[512];
 
 
int main()
int main()
{
{
        int i;
        int i;
        unsigned char buf[256];
 
        if(img_dev_open()<0)
        if(img_dev_open()<0)
        {
        {
                DEBUG_LINE("can not open image device");
                DEBUG_LINE("can not open image device");
                return -1;
                return -1;
        }
        }
 
 
        for(i=0;i<100;i++)
        for(i=0;i<100;i++)
        {
        {
 
                int n;
                DEBUG_LINE("i=%d",i);
                DEBUG_LINE("i=%d",i);
                memset(buf,i,sizeof buf);
                n=256-i;
                //img_write_data((unsigned char*)buf,sizeof buf,0x08);
                img_read_img((unsigned char*)buf,sizeof buf);
                img_write_data((unsigned char*)&i,2,0x08);
 
                sleep(1);
                sleep(1);
        }
        }
        img_dev_close();
        img_dev_close();
        return 0;
        return 0;
}
}

powered by: WebSVN 2.1.0

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