test.c

来自「fft 2410 linux 部分驱动 报扩 ad da 数码管 led」· C语言 代码 · 共 44 行

C
44
字号
/****************************************Copyright (c)**************************************************
**                                     研    发    部
**                              http://www.FFTChina.com
**-----------------------------------------文件信息-----------------------------------------------------
**文   件   名: slavercv.c
**创   建   人: 徐建宁
**最后修改日期: 2005年6月30日
**描        述: SPI接收模块测试程序
**------------------------------------------------------------------------------------------------------
********************************************************************************************************/
#include "stdio.h"
#include "stdlib.h"
#include "sys/types.h"
#include "sys/stat.h"
#include "fcntl.h"

int main(void)
{
    int fd1;
    int i;
    
    fd1=open("/dev/fftshuma", O_RDWR);            
    if(fd1==-1)
    {
       printf("can not open fftioport!\n");
       exit(1);
    }
   
	
	for(i=0;i<90;i++)
    	{
    		ioctl(fd1,i,0);
		    sleep(1);
    		
	     }
   
    printf("finished FFT shuma test\n");
    return 0;

}



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?