URL
https://opencores.org/ocsvn/csa/csa/trunk
[/] [csa/] [trunk/] [pc/] [csa_test.c] - Diff between revs 38 and 39
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 38 |
Rev 39 |
/*
|
/*
|
* =====================================================================================
|
* =====================================================================================
|
*
|
*
|
* Filename: csa_test.c
|
* Filename: csa_test.c
|
*
|
*
|
* Description: the csa test file
|
* Description: the csa test file
|
*
|
*
|
* Version: 1.0
|
* Version: 1.0
|
* Created: 04/16/2009 08:06:34 PM
|
* Created: 04/16/2009 08:06:34 PM
|
* Revision: none
|
* Revision: none
|
* Compiler: gcc
|
* Compiler: gcc
|
*
|
*
|
* Author: mengxipeng@gmail.com
|
* Author: mengxipeng@gmail.com
|
*
|
*
|
* =====================================================================================
|
* =====================================================================================
|
*/
|
*/
|
|
|
|
|
|
|
#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;
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.