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

Subversion Repositories csa

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

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

Rev 32 Rev 38
Line 15... Line 15...
 * =====================================================================================
 * =====================================================================================
 */
 */
 
 
 
 
 
 
 
#include <memory.h>
 
#include <stdlib.h>
#include "misc.h"
#include "misc.h"
#include "imgdev.h"
#include "imgdev.h"
 
 
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++)
        {
        {
                //DEBUG_LINE("i=%d",i);
                DEBUG_LINE("i=%d",i);
                img_write_data((unsigned char*)&i,sizeof i,0x08);
                memset(buf,i,sizeof buf);
 
                //img_write_data((unsigned char*)buf,sizeof buf,0x08);
 
                img_write_data((unsigned char*)&i,2,0x08);
 
                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.