microcam.c

来自「cam ui application for linux」· C语言 代码 · 共 74 行

C
74
字号
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/types.h>
#include <sys/timeb.h>

#include "microcam_ui.h"
//#include "../common/nvram_linux.h"

//time_t TimeNow;
//struct tm tmTimeNow, tmTimePrev;

//int iHalfSec=0;
//int iKey = KEY_NO_KEY;
//time_t *tTimetoMemCam;   // KCHong test
//int iErrCode = ERR_NO_ERR;
/*
int iVIOSD;
int iMAGE;
int iMD;
int iFileType;
int iBitRate;
int Year_Chg;
int Month_Chg;
int Day_Chg;
int Hour_Chg;
int Min_Chg;
int Sec_Chg;
int iFrameRate;
*/

//static char wkDir[] = "/mnt";
unsigned long *TotalCapturedBytes; //Rober

int main(int argc, char *argv[])
{ 
	/*
	struct _timeb 
{ 
time_t time; 
unsigned short millitm; 
short timezone, dstflag; 
}; 
*/ 
	

	struct timeb tt ;
	int retv ;  
	
	ftime(&tt) ;
	
  //砞﹚蛤陪ボ戈癟ノ
  if( argc > 1 )
  {    	
    	if( strcmp( argv[1] , "logo" ) == 0 ) printf( "ESD Design\n") ;
    	//if( strcmp( argv[1] , 
    	return 0 ;
  }   
   
	retv = UI_Init() ;
	
	if( retv > UI_INITOK )
	{
	  switch( retv )
	  {
	    case UI_GPIOINITFAIL : printf("Open GPIO Fail \n") ; break ;      
		}
		return 0 ;
	}	
		
	UI_SetLed( UI_LEDON , UI_LEDOFF ) ; //┮Τ

⌨️ 快捷键说明

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