• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ OSA_ERROR函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中OSA_ERROR函数的典型用法代码示例。如果您正苦于以下问题:C++ OSA_ERROR函数的具体用法?C++ OSA_ERROR怎么用?C++ OSA_ERROR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了OSA_ERROR函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: OSA_queCreate

int OSA_queCreate(OSA_QueHndl *hndl, Uint32 maxLen)
{
  pthread_mutexattr_t mutex_attr;
  pthread_condattr_t cond_attr;
  int status=OSA_SOK;

  hndl->curRd = hndl->curWr = 0;
  hndl->count = 0;
  hndl->len   = maxLen;
  hndl->queue = OSA_memAlloc(sizeof(Int32)*hndl->len);
  
  if(hndl->queue==NULL) {
    OSA_ERROR("OSA_queCreate() = %d \r\n", status);
    return OSA_EFAIL;
  }
 
  status |= pthread_mutexattr_init(&mutex_attr);
  status |= pthread_condattr_init(&cond_attr);  
  
  status |= pthread_mutex_init(&hndl->lock, &mutex_attr);
  status |= pthread_cond_init(&hndl->condRd, &cond_attr);    
  status |= pthread_cond_init(&hndl->condWr, &cond_attr);  

  if(status!=OSA_SOK)
    OSA_ERROR("OSA_queCreate() = %d \r\n", status);
    
  pthread_condattr_destroy(&cond_attr);
  pthread_mutexattr_destroy(&mutex_attr);
    
  return status;
}
开发者ID:119,项目名称:ipnc,代码行数:31,代码来源:osa_que.c


示例2: AVSERVER_bufGetNextTskInfo

OSA_BufInfo *AVSERVER_bufPutFull(int tskId, int streamId, int bufId)
{
  OSA_BufHndl *pBufHndl;
  OSA_TskHndl *pTskHndl;
  int status;

  status = AVSERVER_bufGetNextTskInfo(tskId, streamId, &pBufHndl, &pTskHndl);
  if(status!=OSA_SOK) {
    OSA_ERROR("AVSERVER_bufGetNextTskInfo(%d, %d)\n", tskId, streamId);
    return NULL;
  }

  status = OSA_bufPutFull(pBufHndl, bufId);
  if(status!=OSA_SOK) {
    OSA_ERROR("OSA_bufPutFull(%d, %d, %d)\n", tskId, streamId, bufId);
    return NULL;
  }

  status = OSA_tskSendMsg(pTskHndl, NULL, AVSERVER_CMD_NEW_DATA, (void*)streamId, 0);
  if(status!=OSA_SOK) {
    OSA_ERROR("OSA_tskSendMsg(AVSERVER_CMD_NEW_DATA, %d, %d)\n", tskId, streamId);
    return NULL;
  }

  return OSA_bufGetBufInfo(pBufHndl, bufId);
}
开发者ID:119,项目名称:ipnc,代码行数:26,代码来源:avServer.c


示例3: AVSERVER_init

int AVSERVER_init()
{
  int status;

  #ifdef AVSERVER_DEBUG_API
  OSA_printf(" AVSERVER API: Creating TSKs.\n");
  #endif

  status = DRV_init();
  if(status!=OSA_SOK) {
    OSA_ERROR("DRV_init()\n");
    return status;
  }

  status = ALG_sysInit();
  if(status!=OSA_SOK) {
    OSA_ERROR("ALG_sysInit()\n");
    DRV_exit();
    return status;
  }

  memset(&gAVSERVER_config, 0, sizeof(gAVSERVER_config));
  memset(&gVIDEO_ctrl, 0, sizeof(gVIDEO_ctrl));
  memset(&gAVSERVER_ctrl, 0, sizeof(gAVSERVER_ctrl));

  status |= OSA_mutexCreate(&gAVSERVER_ctrl.lockMutex);

  status |= VIDEO_captureCreate();
  //status |= VIDEO_resizeCreate();
  status |= VIDEO_streamCreate();
  status |= VIDEO_displayCreate();
  //status |= VIDEO_ldcCreate();
  //status |= VIDEO_vnfCreate();
  //status |= VIDEO_vsCreate();
  status |= VIDEO_aewbCreate();
  //status |= VIDEO_fdCreate();
  status |= VIDEO_encodeCreate();
  status |= VIDEO_swosdCreate();
  //status |= VIDEO_encryptCreate();
  status |= VIDEO_motionCreate();
  //status |= AUDIO_audioCreate();
  //status |= AUDIOPLAY_audioCreate();
  status |= AVSERVER_mainCreate();

  if(status!=OSA_SOK) {
    OSA_ERROR("AVSERVER_init()\n");
    ALG_sysExit();
    DRV_exit();
    return status;
  }

  #ifdef AVSERVER_DEBUG_API
  OSA_printf(" AVSERVER API: Creating TSKs...DONE\n");
  #endif

  return status;
}
开发者ID:JammyWei,项目名称:ipc_dm36x,代码行数:57,代码来源:avServerApi.c


示例4: ALG_jpgEncSetQvalue

int ALG_jpgEncSetQvalue(void *hndl, int qValue)
{
  ALG_JpgEncObj  *pObj = (ALG_JpgEncObj*)hndl;
  XDAS_Int32 status;

  if(pObj==NULL)
    return OSA_EFAIL;

  pObj->dynamicParams.size = sizeof(IMGENC1_DynamicParams);
  pObj->dynamicParams.numAU = XDM_DEFAULT;

  if(pObj->createPrm.dataFormat==ALG_VID_DATA_FORMAT_YUV422)
    pObj->dynamicParams.inputChromaFormat  = XDM_YUV_422ILE;
  else
    pObj->dynamicParams.inputChromaFormat  = XDM_YUV_420SP;

  if(qValue < ALG_JPG_ENC_Q_VALUE_MIN)
    qValue = ALG_JPG_ENC_Q_VALUE_MIN;
  if(qValue > ALG_JPG_ENC_Q_VALUE_MAX)
    qValue = ALG_JPG_ENC_Q_VALUE_MAX;

  pObj->dynamicParams.inputWidth      = pObj->createPrm.width;
  pObj->dynamicParams.inputHeight     = pObj->createPrm.height;
  pObj->dynamicParams.captureWidth    = (pObj->createPrm.offsetH>pObj->createPrm.width)?pObj->createPrm.offsetH:pObj->createPrm.width;
  pObj->dynamicParams.generateHeader  = XDM_ENCODE_AU;
  pObj->dynamicParams.qValue          = qValue;

  /* Set video encoder dynamic parameters */
  pObj->encStatus.size = sizeof(pObj->encStatus);
  pObj->encStatus.data.buf = NULL;

  status = IMGENC1_control(pObj->hEncode, XDM_SETPARAMS, &pObj->dynamicParams, &pObj->encStatus);

  if (status != IMGENC1_EOK) {
    OSA_ERROR("XDM_SETPARAMS failed, status=%ld\n", status);
    return OSA_EFAIL;
  }

  pObj->encStatus.data.buf = NULL;

  status = IMGENC1_control(pObj->hEncode, XDM_GETBUFINFO, &pObj->dynamicParams, &pObj->encStatus);

  if (status != IMGENC1_EOK) {
      OSA_ERROR("XDM_GETBUFINFO failed, status=%ld\n", status);
      return OSA_EFAIL;
  }

  #ifdef ALG_DEBUG
  OSA_printf(" ALG: ImgEnc: XDM_GETBUFINFO: min in bufs:%ld buf(0):%ld buf(1):%ld\n",pObj->encStatus.bufInfo.minNumInBufs,pObj->encStatus.bufInfo.minInBufSize[0], pObj->encStatus.bufInfo.minInBufSize[1]);
  #endif

  return OSA_SOK;
}
开发者ID:JammyWei,项目名称:ipc_dm36x,代码行数:53,代码来源:alg_jpgEnc.c


示例5: AVSERVER_bufGetCurTskInfo

int AVSERVER_bufGetCurTskInfo(int tskId, int streamId, OSA_BufHndl **pBufHndl)
{
  VIDEO_CaptureStream *pCaptureStream=NULL;
  VIDEO_EncodeStream  *pEncodeStream=NULL;

  *pBufHndl=NULL;

  if(streamId<0 || streamId >= AVSERVER_MAX_STREAMS) {
    OSA_ERROR("Incorrect streamId (%d)\n", streamId);
    return OSA_EFAIL;
  }

  if(tskId <= VIDEO_TSK_CAPTURE || tskId > VIDEO_TSK_STREAM) {
    OSA_ERROR("Incorrect tskId (%d)\n", tskId);
    return OSA_EFAIL;
  }

  if(tskId <= VIDEO_TSK_ENCODE) {
    pCaptureStream = &gVIDEO_ctrl.captureStream[streamId];

    if(tskId==VIDEO_TSK_LDC) {
      *pBufHndl = &pCaptureStream->bufLdcIn;
    } else
    if(tskId==VIDEO_TSK_VNF) {
      *pBufHndl = &pCaptureStream->bufVnfIn;
    } else
    if(tskId==VIDEO_TSK_RESIZE) {
      *pBufHndl = &pCaptureStream->bufResizeIn;
    } else
    if(tskId==VIDEO_TSK_ENCODE) {
      *pBufHndl = &pCaptureStream->bufEncodeIn;
    } else {
      OSA_ERROR("Incorrect tskId (%d)\n", tskId);
      return OSA_EFAIL;
    }

  } else {

    pEncodeStream  = &gVIDEO_ctrl.encodeStream[streamId];

    if(tskId==VIDEO_TSK_ENCRYPT) {
      *pBufHndl = &pEncodeStream->bufEncryptIn;
    } else
    if(tskId==VIDEO_TSK_STREAM) {
      *pBufHndl = &pEncodeStream->bufStreamIn;
    } else {
      OSA_ERROR("Incorrect tskId (%d)\n", tskId);
      return OSA_EFAIL;
    }
  }

  return OSA_SOK;
}
开发者ID:119,项目名称:ipnc,代码行数:53,代码来源:avServer.c


示例6: AdjustApertureLevel

int AdjustApertureLevel(Uint8 level)
{
#define IRIS_I2C_ADDR     (0x0898U)
    DRV_I2cHndl i2cHnd2;
    int status = OSA_EFAIL;
    Uint16 regAddr16=0;
    Uint16 regValue = 0;

    level = (level >= 100) ? 100 : level;

    Uint8 da_value = 255 * (100 - level) / 100;
    static Uint8 da_value_bak = 50;

    if (da_value == da_value_bak)
    {
        return OSA_SOK;
    }
    da_value_bak = da_value;

    memset(&i2cHnd2, 0, sizeof(i2cHnd2));
    status = DRV_i2cOpen(&i2cHnd2, IRIS_I2C_ADDR);

    if (status == OSA_SOK)
    {
        regValue = (Uint16)da_value << 4;//Please refer to the manual DAC5571
        status = DRV_i2c16Write16(&i2cHnd2, &regAddr16, &regValue, 1);

        if (status != OSA_SOK)
        {
            OSA_ERROR("AdjustApertureLevel error!\n");
        }
        else
        {
            OSA_printf("AdjustApertureLevel level= %d\n", level);
        }
    }

    DRV_i2cClose(&i2cHnd2);
    if (status != OSA_SOK)
    {
        OSA_ERROR("DRV_i2cClose() error!\n");
        return OSA_EFAIL;
    }

    OSA_waitMsecs(10);

    return OSA_SOK;
}
开发者ID:JammyWei,项目名称:ipc_dm36x,代码行数:48,代码来源:drv_imgs.c


示例7: TVP5158_softReset

int TVP5158_softReset(DRV_I2cHndl *i2cHndl)
  {
  	int status=OSA_SOK;
	Uint8 regAddr[64];
	Uint8 regVal[64];
  Uint32 k;
  Uint8 vbusStatus;  

    status = TVP5158_selectWrite(i2cHndl, 0xF);
  if(status!=OSA_SOK)
    goto error_exit;

  k=0;

  vbusStatus = 0x1;

  status = TVP5158_vbusWrite(i2cHndl, 0xB00060, vbusStatus, 1);
  if(status!=OSA_SOK)
    goto error_exit;

  vbusStatus = 0x0;

  status = TVP5158_vbusWrite(i2cHndl, 0xB00060, vbusStatus, 1);
  if(status!=OSA_SOK)
    goto error_exit;

  OSA_waitMsecs(300);
  
error_exit:
  if(status!=OSA_SOK)
    OSA_ERROR("I2C");

  return status;  
}
开发者ID:119,项目名称:ipnc,代码行数:34,代码来源:mcvip_tvp5158_i2c.c


示例8: OSA_msgqCreate

int OSA_msgqCreate(OSA_MsgqHndl *hndl)
{
  pthread_mutexattr_t mutex_attr;
  pthread_condattr_t cond_attr;
  int status=OSA_SOK;
 
  status |= pthread_mutexattr_init(&mutex_attr);
  status |= pthread_condattr_init(&cond_attr);  
  
  status |= pthread_mutex_init(&hndl->lock, &mutex_attr);
  status |= pthread_cond_init(&hndl->condRd, &cond_attr);    
  status |= pthread_cond_init(&hndl->condWr, &cond_attr);  

  hndl->curRd = hndl->curWr = 0;
  hndl->count = 0;
  hndl->len   = OSA_MSGQ_LEN_MAX;

  if(status!=OSA_SOK)
    OSA_ERROR("OSA_msgqCreate() = %d \r\n", status);
    
  pthread_condattr_destroy(&cond_attr);
  pthread_mutexattr_destroy(&mutex_attr);
    
  return status;
}
开发者ID:JammyWei,项目名称:dm8168,代码行数:25,代码来源:osa_msgq.c


示例9: DRV_faceDetectOpen

int DRV_faceDetectOpen()
{
  memset(&gDRV_faceDetectObj, 0, sizeof(gDRV_faceDetectObj));
  
  gDRV_faceDetectObj.workAreaVirtAddr = OSA_cmemAlloc(DRV_FACE_DETECT_WORK_AREA_SIZE, 32);
  gDRV_faceDetectObj.workAreaPhysAddr = OSA_cmemGetPhysAddr(gDRV_faceDetectObj.workAreaVirtAddr);
    
  if(  gDRV_faceDetectObj.workAreaVirtAddr==NULL
   ||  gDRV_faceDetectObj.workAreaPhysAddr==NULL
    ) {
    OSA_ERROR("Insufficient memory\n");
    goto error_exit;
  }
  
  CSL_faceDetectIntClear(&gCSL_faceDetectHndl);  
  CSL_faceDetectIntEnable(&gCSL_faceDetectHndl, TRUE);
  
  return OSA_SOK;
  
error_exit:
  if(gDRV_faceDetectObj.workAreaVirtAddr)
    OSA_cmemFree(gDRV_faceDetectObj.workAreaVirtAddr);

  return OSA_EFAIL;  
}
开发者ID:119,项目名称:ipnc,代码行数:25,代码来源:drv_faceDetect.c


示例10: DRV_isifGetBayerPhase

int DRV_isifGetBayerPhase(int sensorMode)
{
	DRV_ImgsIsifConfig  *isifConfig;
	CSL_CcdcColPatConfig *colPat;

	isifConfig= DRV_imgsGetIsifConfig(sensorMode);
	colPat= &isifConfig->ccdcParams.colPat;

	switch(colPat->colPat0[0][0])
	{
		case CSL_CCDC_COL_PAT_Gr:
			return 0;
			break;
		case CSL_CCDC_COL_PAT_R:
			return 1;
			break;
		case CSL_CCDC_COL_PAT_Gb:
			return 2;
			break;
		case CSL_CCDC_COL_PAT_B:
			return 3;
			break;
		default:
			OSA_ERROR("Undefined Bayer format\n");
			return 0;
			break;
	}
}
开发者ID:119,项目名称:ipnc,代码行数:28,代码来源:drv_isif.c


示例11: OSA_semCreate

int OSA_semCreate(OSA_SemHndl *hndl, Uint32 maxCount, Uint32 initVal)
{
  pthread_mutexattr_t mutex_attr;
  pthread_condattr_t cond_attr;
  int status=OSA_SOK;
 
  status |= pthread_mutexattr_init(&mutex_attr);
  status |= pthread_condattr_init(&cond_attr);  
  
  status |= pthread_mutex_init(&hndl->lock, &mutex_attr);
  status |= pthread_cond_init(&hndl->cond, &cond_attr);  

  hndl->count = initVal;
  hndl->maxCount = maxCount;

  if(hndl->maxCount==0)  
    hndl->maxCount=1;
    
  if(hndl->count>hndl->maxCount)
    hndl->count = hndl->maxCount;

  if(status!=OSA_SOK)
    OSA_ERROR("OSA_semCreate() = %d \r\n", status);
    
  pthread_condattr_destroy(&cond_attr);
  pthread_mutexattr_destroy(&mutex_attr);
  
  return status;
}
开发者ID:119,项目名称:ipnc,代码行数:29,代码来源:osa_sem.c


示例12: TVP5158_setNoiseReduction

int TVP5158_setNoiseReduction(DRV_I2cHndl *i2cHndl, int enable, int channel)
{
	int status=OSA_SOK;
	Uint8 regAddr[2];
	Uint8 regVal[2];
	Uint32 k;
	Uint8 chVal=1;	

	chVal = chVal << channel;

	status = TVP5158_selectWrite(i2cHndl, chVal);

	if(status!=OSA_SOK)
    	goto error_exit;  
    
	k=0;	
	regAddr[k] = 0x5D;
	regVal[k]  = (Uint8)enable;
	k++;

  OSA_printf(" TVP5158: NoiseReduction [Ch=%d value=%x]\n", chVal, enable);

 	status = DRV_i2cWrite8(i2cHndl, regAddr, regVal, k);
 	if(status!=OSA_SOK)
   	goto error_exit;	

	OSA_waitMsecs(20); 

error_exit:
 	if(status!=OSA_SOK)
   	OSA_ERROR("I2C-NoiseReduction");	

 	return status;
}
开发者ID:119,项目名称:ipnc,代码行数:34,代码来源:mcvip_tvp5158_i2c.c


示例13: TVP5158_setStdStatus

int TVP5158_setStdStatus(DRV_I2cHndl *i2cHndl)
{
	int status;
	Uint8 regAddr[2];
	Uint8 regVal[2];
  Uint32 k;
  
  status = TVP5158_selectWrite(i2cHndl, 0xF);
  if(status!=OSA_SOK)
    goto error_exit;	
    
	k=0;
	regAddr[k] = 0xD;
	regVal[k] = 0x01;
	k++;
	    
  status = DRV_i2cWrite8(i2cHndl, regAddr, regVal, k);
  if(status!=OSA_SOK)
    goto error_exit;
    	    
error_exit:
  if(status!=OSA_SOK)
    OSA_ERROR("I2C");

  return status;    
}
开发者ID:119,项目名称:ipnc,代码行数:26,代码来源:mcvip_tvp5158_i2c.c


示例14: TVP5158_setHybridChSelect

int TVP5158_setHybridChSelect(DRV_I2cHndl *i2cHndl, int channel)
{
	int status=OSA_SOK;
	Uint8 regAddr[64];
	Uint8 regVal[64];
	Uint32 k;
	
	status = TVP5158_selectWrite(i2cHndl, 0xF);
	if(status!=OSA_SOK)
		goto error_exit;  	
		
	k=0;
	
	regAddr[k] = 0xB5;
	regVal[k]  = (Uint8)channel;
	k++;			
	
	#ifdef TVP5158_DEBUG
	OSA_printf(" TVP5158: HybridChannel [Ch=%d]\n", channel);
	#endif

	status = DRV_i2cWrite8(i2cHndl, regAddr, regVal, k);
	if(status!=OSA_SOK)
		goto error_exit;  
    
	OSA_waitMsecs(20); 

error_exit:
	if(status!=OSA_SOK)
		OSA_ERROR("I2C-HybirdChannel");

	return status;    		
}
开发者ID:119,项目名称:ipnc,代码行数:33,代码来源:mcvip_tvp5158_i2c.c


示例15: DRV_captureTestLscRun

int DRV_captureTestLscRun(int count)
{
  int status;
  int bufId;  
  OSA_BufInfo *pBufInfo;
  
  status = DRV_isifLscGetBuf(&bufId, OSA_TIMEOUT_FOREVER);
  if(status!=OSA_SOK) {
    OSA_ERROR("DRV_isifLscGetBuf()\n");
    return status;
  }
  
  pBufInfo =   DRV_isifLscGetBufInfo(bufId);  
  if(pBufInfo) {
  
    #ifdef DRV_CAPTURE_TEST_SAVE_LSC_DATA
    if(count>1) {
      static char filename[80];    
      
      if(count%(30*10)==0) {
        sprintf(filename, "LSC_%04d_%dx%d.BIN", count, gDRV_testCtrl.captureInfo.isifInfo.lscDataOffsetH, gDRV_testCtrl.captureInfo.isifInfo.lscDataHeight);
        OSA_fileWriteFile(filename, pBufInfo->virtAddr, pBufInfo->size);      
      }
    }
    #endif  
    
    if(count%(30*5)==0) {        

    }
  }
  
  DRV_isifLscPutBuf(bufId);
  
  return status;  
}
开发者ID:119,项目名称:ipnc,代码行数:35,代码来源:drv_captureTest.c


示例16: DRV_imgsTestMain

int DRV_imgsTestMain(int argc, char **argv)
{
    DRV_ImgsConfig imgsConfig;

    int status = DRV_init();
    if (status != OSA_SOK)
    {
        return status;
    }

    imgsConfig.sensorMode = DRV_IMGS_SENSOR_MODE_640x480;
    imgsConfig.fps        = 30;
    imgsConfig.binEnable  = TRUE;

    OSA_printf(" IMGS: Imager %s is selected\n", drvImgsFunc->imgsGetImagerName());

    status = drvImgsFunc->imgsOpen(&imgsConfig);
    if (status != OSA_SOK)
    {
        OSA_ERROR("DRV_imgsOpen(%d)\n", imgsConfig.sensorMode);
    }

    if (status == OSA_SOK)
    {
        drvImgsFunc->imgsEnable(TRUE);
        OSA_DEBUG_WAIT;
        drvImgsFunc->imgsEnable(FALSE);
        drvImgsFunc->imgsClose();
    }

    DRV_exit();

    return status;
}
开发者ID:JammyWei,项目名称:ipc_dm36x,代码行数:34,代码来源:drv_imgs.c


示例17: OSA_thrCreate

//static int g_create_i = 0;
int OSA_thrCreate(OSA_ThrHndl *hndl, OSA_ThrEntryFunc entryFunc, Uint32 pri, Uint32 stackSize, void *prm)
{
  int status=OSA_SOK;
  pthread_attr_t thread_attr;
  struct sched_param schedprm;

  // initialize thread attributes structure
  status = pthread_attr_init(&thread_attr);
  
  if(status!=OSA_SOK) {
    OSA_ERROR("OSA_thrCreate() - Could not initialize thread attributes\n");
    return status;
  }
  
  if(stackSize!=OSA_THR_STACK_SIZE_DEFAULT)
    pthread_attr_setstacksize(&thread_attr, stackSize);

  status |= pthread_attr_setinheritsched(&thread_attr, PTHREAD_EXPLICIT_SCHED);
  status |= pthread_attr_setschedpolicy(&thread_attr, SCHED_FIFO);
    
  if(pri>OSA_THR_PRI_MAX)   
    pri=OSA_THR_PRI_MAX;
  else 
  if(pri<OSA_THR_PRI_MIN)   
    pri=OSA_THR_PRI_MIN;
    
  schedprm.sched_priority = pri;
  status |= pthread_attr_setschedparam(&thread_attr, &schedprm);

  if(status!=OSA_SOK) {
    OSA_ERROR("OSA_thrCreate() - Could not initialize thread attributes\n");
    goto error_exit;
  }

  status = pthread_create(&hndl->hndl, &thread_attr, entryFunc, prm);

  if(status!=OSA_SOK) {
    OSA_ERROR("OSA_thrCreate() - Could not create thread [%d]\n", status);
  }

//  printf("OSA_thrcreate %d thr ,and hndl = %d==func=%p\n",g_create_i++,hndl->hndl,entryFunc);
	
error_exit:  
  pthread_attr_destroy(&thread_attr);

  return status;
}
开发者ID:Lichanglu,项目名称:Edukit-MW,代码行数:48,代码来源:osa_thr.c


示例18: DRV_regTestMain

int DRV_regTestMain(int argc, char **argv)
{
  int status;
  Uint32 regAddr;
  Uint32 regValue;
  Uint32 numRegs=8;
  Uint32 numCols=0;
  Bool   regDump;
  
  if(argc<2) {
    DRV_regTestShowUsage(argv[0]);
    return OSA_EFAIL;  
  }
  
  if(strcmp(argv[1], "-w")==0) {
    regDump=FALSE;
    if(argc < 4) {
      DRV_regTestShowUsage(argv[0]);
      return OSA_EFAIL;  
    }
    regAddr = xstrtoi(argv[2]);
    regValue = xstrtoi(argv[3]);      
  }
  else {
    regDump=TRUE;  

    if(argc<2) {
      DRV_regTestShowUsage(argv[0]);
      return OSA_EFAIL;  
    }
    
    regAddr = xstrtoi(argv[1]);
    if(argc>2) 
      numRegs = atoi(argv[2]);
    
    if(argc==5) {
      if(strcmp(argv[3], "-c")==0) 
        numCols = atoi(argv[4]);
    }
  
  }

  status = CSL_vpssOpen(&gCSL_vpssHndl);
  if(status!=OSA_SOK) {
    OSA_ERROR("CSL_sysInit()\n");
    return status;
  }

  if(regDump) {
    DRV_regDump(regAddr, numRegs, numCols);
  } else {
    DRV_regWrite(regAddr, regValue);
  }

  status = CSL_vpssClose(&gCSL_vpssHndl);
  
  return status;
}
开发者ID:119,项目名称:ipnc,代码行数:58,代码来源:drv_regrw.c


示例19: VIDEO_fdCreate

int VIDEO_fdCreate()
{
  int status;

  status = OSA_mutexCreate(&gVIDEO_ctrl.faceDetectStream.statusLock);
  if(status!=OSA_SOK) {
    OSA_ERROR("OSA_mutexCreate()\n");
    return status;
  }

  status = OSA_tskCreate( &gVIDEO_ctrl.fdTsk, VIDEO_fdTskMain, VIDEO_FD_THR_PRI, VIDEO_FD_STACK_SIZE, 0);
  if(status!=OSA_SOK) {
    OSA_ERROR("OSA_tskCreate()\n");
    return status;
  }

  return status;
}
开发者ID:119,项目名称:ipnc,代码行数:18,代码来源:videoFaceDetectThr.c


示例20: DRV_frameCopyInit

int DRV_frameCopyInit()
{
  int status;
  
  status = OSA_mutexCreate(&gDRV_frameCopyObj.lock);
  if(status!=OSA_SOK) {
    OSA_ERROR("OSA_mutexCreate()\n");
    return OSA_SOK;
  }
  
  status = DRV_dmaOpen(&gDRV_frameCopyObj.dmaHndl, DRV_DMA_MODE_NORMAL, 2);
  if(status!=OSA_SOK) {
    OSA_ERROR("DRV_dmaOpen()\n");  
    OSA_mutexDelete(&gDRV_frameCopyObj.lock);
    return status;
  }

  return status;
}
开发者ID:119,项目名称:ipnc,代码行数:19,代码来源:drv_frameCopy.c



注:本文中的OSA_ERROR函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ OSA_printf函数代码示例发布时间:2022-05-30
下一篇:
C++ OSAL_CCMU_MclkReset函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap