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

C++ osal_task_sleep函数代码示例

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

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



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

示例1: test_step_get_desc

void test_step_get_desc(UINT32 base_addr)
{
	UINT8 cmd_get_dev_desc[]={0x80,0x06,0x00,0x01,0x00,0x00,0x12,0x00 };

	unsigned long i;
	volatile unsigned long j;
			
	//delay 15s
	USB_LOGO_PRINTF("delay 15s!\n");
	osal_task_sleep(5000);
	osal_task_sleep(5000);
	osal_task_sleep(5000);

	if(ep0_setup(base_addr,cmd_get_dev_desc,8) != RET_SUCCESS)
		goto err;
	USB_LOGO_PRINTF("control SETUP phase OK!\n");
			
	USB_LOGO_PRINTF("delay 5s!\n");
	osal_task_sleep(5000);
	if(ep0_in_data(base_addr,((UINT8*)&test_device_descriptor),18) != RET_SUCCESS)
		goto err;		
	USB_LOGO_PRINTF("control DATA phase OK!\n");
	usb_test_show_hex("dev_desc:",((UINT8*)&test_device_descriptor),18);
	
	if(ep0_status(base_addr, B_TOKEN_OUT) != RET_SUCCESS)
		goto err;
	USB_LOGO_PRINTF("control STATUS phase OK!\n");

err:	
	return;
}
开发者ID:alkap007,项目名称:ali3606,代码行数:31,代码来源:usb_if_test.c


示例2: send_upgrade_param

static BOOL send_upgrade_param(UINT32 offset)
{
    UINT32 data_check, data_send;
    int retry_times = 3;

    data_send = *((UINT32 *)&m_UpgradeParam + offset/sizeof(UINT32));
    while(retry_times--)
    {
        erom_wm(UPGRADE_PARAM_ADDR+offset, &data_send, sizeof(UINT32), 0);
        P2PUPG_DBG("data_send=0x%x\n",data_send);
        osal_task_sleep(10);
        if(UPGRADE_SINGLE == upgrade_mode)
        {
            data_check = ~data_send;
            erom_rm(UPGRADE_PARAM_ADDR+offset, &data_check, sizeof(UINT32), 0);
            P2PUPG_DBG("data_check=0x%x\n",data_check);
            if(data_check == data_send)
                return TRUE;
            osal_task_sleep(10);
        }
    }

    if(UPGRADE_SINGLE == upgrade_mode)
        return FALSE;
    return TRUE;
}
开发者ID:alkap007,项目名称:ali3606,代码行数:26,代码来源:p2p_upgrade.c


示例3: win_an_set_unkown_act_proc

static PRESULT win_an_set_unkown_act_proc(VACTION act)   //guop edit 20101014
{

    switch(act)
	{

           case VACT_SINGLE_SEARCH:
		   	single_multi_srch_flag = 0;
		  	//if(check_node_modified(TYPE_SAT_NODE) )
		   {
			UINT8	back_saved;
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA);
			win_compopup_open_ext(&back_saved);
			update_data(TYPE_SAT_NODE);
			osal_task_sleep(200);
			win_compopup_smsg_restoreback();
		   }
			if(OSD_ObjOpen((POBJECT_HEAD)&g_win_sat_srchset, 0xFFFFFFFF) != PROC_LEAVE)
				menu_stack_push((POBJECT_HEAD)&g_win_sat_srchset);
			wincom_close_help();
	             break;
	      case VACT_MULTI_SEARCH:
		   	single_multi_srch_flag = 1;
		  //	if(check_node_modified(TYPE_SAT_NODE) )
		   {
			UINT8	back_saved;
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA);
			win_compopup_open_ext(&back_saved);
			update_data(TYPE_SAT_NODE);
			osal_task_sleep(200);
			win_compopup_smsg_restoreback();
		   }
			if(OSD_ObjOpen((POBJECT_HEAD)&g_win_sat_srchset, 0xFFFFFFFF) != PROC_LEAVE)
				menu_stack_push((POBJECT_HEAD)&g_win_sat_srchset);
			wincom_close_help();
	             break;
				 
	      case VACT_TP_SEARCH:
		 // 	if(check_node_modified(TYPE_SAT_NODE) )
		   {
			UINT8	back_saved;
			win_compopup_init(WIN_POPUP_TYPE_SMSG);
			win_compopup_set_msg(NULL, NULL, RS_MSG_SAVING_DATA);
			win_compopup_open_ext(&back_saved);
			update_data(TYPE_SAT_NODE);
			osal_task_sleep(200);
			win_compopup_smsg_restoreback();
		   }

			if(OSD_ObjOpen((POBJECT_HEAD)&g_win_tplist, 0xFFFFFFFF) != PROC_LEAVE)
				menu_stack_push((POBJECT_HEAD)&g_win_tplist);
	             break;
		

    }
}
开发者ID:alkap007,项目名称:ali3606,代码行数:58,代码来源:win_antenna_set_motor.c


示例4: restart_netupdate_process

unsigned char restart_netupdate_process()
{
    UINT8 test;
    UINT8 ipadd[200];
    osal_task_sleep(41000);
    libc_printf("RUN in updata process!!!\n");
    //check first time  
    if(check_updata_feasibility())
    {
//        get_service_ipadd(ipadd);
//        if(1 == libnet_ping_servicer(ipadd)) //zhouxp 2012-02-01
        {
            if(1 == check_version())
            {
            #ifdef AUTO_NETUPDATE
                ap_send_msg(CTRL_MSG_SUBTYPE_STATUS_NET_UPDATA_NEED_MSG,1,TRUE);
            #endif
                return 1;
            }
            else
            {
                return 0;
            }
        }   
    }
    //check again after one minute in case the system not get IP address in 
    // time
    osal_task_sleep(60000); 
     while(1)
    {  
       if(check_updata_feasibility())
       {
//            get_service_ipadd(ipadd);
//            if(1 == libnet_ping_servicer(ipadd)) //zhouxp 2012-02-01
            {
                if(1 == check_version())
                {
                #ifdef AUTO_NETUPDATE
                    ap_send_msg(CTRL_MSG_SUBTYPE_STATUS_NET_UPDATA_NEED_MSG,1,TRUE);
                #endif
                    return 1;
                }
                else
                {
                    return 0;
                }
            }
         }
         osal_task_sleep(1800000);
    }
    //libc_printf("end updata process!!!\n");
    libc_printf("RUN out updata process!!!\n");
    return 0;
}
开发者ID:alkap007,项目名称:ali3606,代码行数:54,代码来源:restart_netupdate.c


示例5: cti_PPID_detail_info_display

static void cti_PPID_detail_info_display()
{
	POBJECT_HEAD submenu;
	UINT8 PPID_id[3];
	char pin[9];
	cas_pin_t casPIN;
	int ret=0;
	UINT32 PPID=0;
	UINT8 back_saved;

	//check PIN
	if(!win_pin_open(NULL,0))
	{
		return;
	}

	win_compopup_init(WIN_POPUP_TYPE_SMSG);
	//win_compopup_set_msg("Reading PPID detail info.",NULL, 0);
	win_compopup_set_msg(NULL,NULL, RS_CTI_READING_PPID_DETAIL);
	win_compopup_open_ext(&back_saved);
	
	memcpy(PPID_id,cti_PPID_list.info[g_PPID_itemIdx-1].id,3);
	win_pin_get_input(pin, sizeof(pin));
	memcpy(casPIN.pin_code,pin,8);
	casPIN.pin_len = STRLEN(casPIN.pin_code);

	memset(&cti_PPID_detInfo,0,sizeof(cas_PPID_detailed_info_t));
	ret=cas_get_sc_PPID_detailed(PPID_id, &casPIN, &cti_PPID_detInfo);
	//osal_task_sleep(1000);
	win_compopup_smsg_restoreback();
	//soc_printf("qjzheng---PPID.id = %02x%02x%02x,pin=%s,len=%d\n",PPID_id[0],PPID_id[1],PPID_id[2],casPIN.pin_code,casPIN.pin_len);
	if(ret!=0)
	{

		//soc_printf("qjzheng--to get PPID detail info error =%d\n",ret);
		
		osal_task_sleep(500);
		win_compopup_init(WIN_POPUP_TYPE_SMSG);
		//win_compopup_set_msg("Read PPID detail info error!",NULL, 0);
		win_compopup_set_msg(NULL,NULL, RS_CTI_READ_PPID_DETAIL_ERROR);
		win_compopup_open_ext(&back_saved);
		osal_task_sleep(1000);
		win_compopup_smsg_restoreback();
		return;
	}
	
	//to enter PPID_info detail
	submenu = (POBJECT_HEAD)&g_win_cti_PPID_info;

	if(OSD_ObjOpen(submenu, MENU_OPEN_TYPE_MENU|g_PPID_curID) != PROC_LEAVE)
	{
		menu_stack_push(submenu);					
	}
}
开发者ID:alkap007,项目名称:ali3606,代码行数:54,代码来源:win_cti_ppid.c


示例6: usb_test_enter

/**********************************************
* enter usb logo test from here by ui
*
*********************************************/
RET_CODE  usb_test_enter()
{
	struct usb_hc_device *hc_dev = (struct usb_hc_device *)dev_get_by_type(NULL,HLD_DEV_TYPE_USB_HOST);


	if (hc_dev->usbd_flg_id != NULL)
	{
		usbd_notify_dynamic_removerd(hc_dev);
		enable_usb_intf_int(hc_dev->base_addr,0);
		en_host_int_flag1(hc_dev->base_addr,0);
		en_host_int_flag2(hc_dev->base_addr,0);
		en_host_int_flag3(hc_dev->base_addr,0);
//		hc_dev->bdev_callback(0);
//		hc_dev->usb_dev->release(hc_dev->usb_dev);
//		hc_dev->usb_dev = NULL;
	}
	if(sys_ic_get_chip_id() == ALI_S3602F)
	{
      	 	 if(0!=(hc_dev= (pUSBD_BUS)dev_get_by_id(HLD_DEV_TYPE_USB_HOST, 1)))
      	 	 {
				usbd_notify_dynamic_removerd(hc_dev);
				enable_usb_intf_int(hc_dev->base_addr,0);
				en_host_int_flag1(hc_dev->base_addr,0);
				en_host_int_flag2(hc_dev->base_addr,0);
				en_host_int_flag3(hc_dev->base_addr,0);
      	 	 }
	}
	osal_task_sleep(1);
	usb_if_test_flag = IF_TEST_ENTER;
	return RET_SUCCESS ;
}
开发者ID:alkap007,项目名称:ali3606,代码行数:35,代码来源:usb_if_test.c


示例7: cti_mat_modify

static int cti_mat_modify()
{
	cas_pin_t pin;
	UINT8 level;
	int ret=0;

	memcpy(pin.pin_code,input_pin_chars,sizeof(input_pin_chars));
	pin.pin_len = STRLEN(pin.pin_code);

	level = OSD_GetMultiselSel(&cti_mat_item_select);

	ret=cas_set_parental_rating(&pin,level);

	//soc_printf("modify pin ,statues=%d\n", ret);
	//if(ret==0)
	{
		UINT8 back_saved;
		
		win_compopup_init(WIN_POPUP_TYPE_SMSG);
		if(ret==0)
			win_compopup_set_msg(/*"Reset maturity success!"*/NULL,NULL, RS_CTI_MATURITY_SETTING_SUCCESS);
		else
			win_compopup_set_msg(/*"Reset maturity faild!"*/NULL,NULL, RS_CTI_MATURITY_SETTING_FAIL);
		win_compopup_open_ext(&back_saved);
		osal_task_sleep(1000);
		win_compopup_smsg_restoreback();
	}

	return ret;
	
}
开发者ID:alkap007,项目名称:ali3606,代码行数:31,代码来源:win_cti_set_maturity.c


示例8: cmd_process_monitor

UINT32 cmd_process_monitor(unsigned int argc, unsigned char *argv[])
{
	UINT32 data[6 * 2];
	UINT32 i, j = 0x00000003;
	UINT32 ptm = osal_get_tick();

	MEMSET(data, 0, sizeof(data));
	pan_display(g_pan_dev, "Pdon", 4); // done, all ok!

	for(i = 0; i<6; i++)
	{
		UINT32 pm_finish = 0;
		UINT32 pm2_finish = 0;
		*((volatile UINT32 *)0xb8000300) = (j|i<<16);
		while(1)
		{
			pm_finish = *((volatile UINT32 *)0xb8000304);
			pm2_finish = *((volatile UINT32 *)0xb800030c);
			if(1==(pm_finish&0x1)&&1==(pm2_finish&0x1))
				break;
//			if((osal_get_tick()-ptm) > 2000)
				break;
			osal_task_sleep(1);
		}
		data[2  * i] = pm_finish>>16;
		data[2  * i + 1] = pm2_finish>>16;
		//libc_printf("PM_COUNT:  \t=\t 0x%04x,  \tPM_SEL =  \t%d\n", pm_finish>>16, i);
		//libc_printf("PM_COUNT2: \t=\t 0x%04x,  \tPM_SEL2 =  \t%d\n", pm2_finish>>16, i);
		*((volatile UINT32 *)0xb8000300) = 0;
	}
	
	SendDataPacket(0, (unsigned char *)data, sizeof(data));	
	return 0;
}
开发者ID:jinfeng-geeya,项目名称:3202C,代码行数:34,代码来源:stb_hwinfo.c


示例9: osd_output_init

static void osd_output_init(void)
{
    struct osd_device *osd_dev;
    UINT32 region_id =0;
    UINT32 trans_color;
    struct OSDRect region_rect;
    struct OSDPara OpenPara;
    UINT8 *p_pallette;
    
    region_rect.uLeft = 0;
	region_rect.uTop = 0;
	region_rect.uWidth = 800;//OSD_MAX_WIDTH;//608;
	region_rect.uHeight = 500;//OSD_MAX_HEIGHT;//430;	
    
    OpenPara.eMode = OSD_256_COLOR;
    OpenPara.uGAlpha = 0x0f;
    OpenPara.uGAlphaEnable = 0;
    OpenPara.uPalletteSel = 0;
    osd_dev = (struct osd_device *)dev_get_by_id(HLD_DEV_TYPE_OSD, 0);
    OSDDrv_Open((HANDLE)osd_dev, &OpenPara);
    osal_task_sleep(20);
    //trans_color = OSD_GetTransColor(OpenPara.eMode,FALSE);
	OSDDrv_IoCtl((HANDLE)osd_dev, OSD_IO_SET_TRANS_COLOR, 0x00);
	OSDDrv_CreateRegion((HANDLE)osd_dev, region_id, &region_rect, NULL);
    //p_pallette = OSD_GetRscPallette(0x4080 | 0);
	//OSD_SetPallette(p_pallette,256);
    
    //OSDDrv_RegionFill((HANDLE)osd_dev,region_id,&region_rect,0xff);   
    //OSDDrv_ShowOnOff((HANDLE)osd_dev, TRUE); 
}
开发者ID:alkap007,项目名称:ali3606,代码行数:30,代码来源:plugin_gif.c


示例10: pin_mux_config

/* pin mux */
void pin_mux_config(UINT32 param1, UINT32 param2)
{
#if 0
	*((volatile UINT32*)0xb8000100) |= ((1 << 2)|(1 << 3)|(1 << 6)|(1 << 12)|(1 << 13)|(1 << 14)|(1 << 18) ); /* RF_AGC_PDM[b17&b18],GPIO2[b1],GPIO7[b16] */
	*((volatile UINT32*)0xb8000104) = 0; 

	//enable gpio
	*((volatile UINT32*)0xb8000040) = ((1 << 0) | (1 << 26) | (1 << 27) | (1 << 28));
	*((volatile UINT32*)0xb80000A0) = ((1 << 1) | (1 << 17)); 
	*((volatile UINT32*)0xb80000D0) = 0; 
#else
	*((volatile UINT32*)0xb8000100) |= ((1 << 2)|(1 << 3)|(1 << 6)|(1 << 12)|(1 << 13)|(1 << 14)|(1 << 18) ); /* RF_AGC_PDM[b17&b18],GPIO2[b1],GPIO7[b16] */
	*((volatile UINT32*)0xb8000104) = 0; 

	//enable gpio
	*((volatile UINT32*)0xb8000040) = ((1 << 0) | (1 << 26) | (1 << 27) | (1 << 28));
	*((volatile UINT32*)0xb80000A0) = ((1 << 1) | (1 << 17)); 
	*((volatile UINT32*)0xb80000D0) = 0; 
	//enable GPIO[1] power	
	*((volatile UINT32*)0xb8000100) |= (1 << 12);	//pinmux spdif gpio[1]
	*((volatile UINT32*)0xb8000040) |= (1<<0);	// gpio enable
	*((volatile UINT32*)0xb8000058) |= (1<<0);	// output enable
	*((volatile UINT32*)0xb8000054) |= (1<<0);	// output 1
    //*((volatile UINT32*)0xb8000074) |= ((1<<4 )| (1<<25));//154M MEMERY
#if 1//i2c reset 
    *((volatile UINT32*)0xb8000060) |= (1<<7); //reset scb1
    osal_task_sleep(100);
    *((volatile UINT32*)0xb8000060) &= (~((UINT32)1<<7)); //clear reset scb1
#endif
#endif
}
开发者ID:jinfeng-geeya,项目名称:3202C,代码行数:32,代码来源:board_config.c


示例11: aud_desc_show_hint

void aud_desc_show_hint(UINT32 ad_msg)
{
    char str[32];
    char lang[5];
    UINT8 back_saved;
    int ad_status = AD_MSG_STATUS(ad_msg);
    int ad_type = AD_MSG_TYPE(ad_msg);
    UINT16 ad_lang = AD_MSG_LANG(ad_msg);

    MEMSET(lang, 0, sizeof(lang));
    get_audio_lang3b((UINT8 *)&ad_lang,(UINT8 *)lang);

    if (ad_status == 0) // AD invalid
        sprintf(str, "%s AD not available", lang);
    else
    {
        if (ad_type == AD_MSG_TYPE_BOARDCASTER_MIX)
            sprintf(str, "AD Enable", lang);
        else if (ad_type == AD_MSG_TYPE_RECEIVER_MIX)
            sprintf(str, "%s AD Enable", lang);
    }

    win_compopup_init(WIN_POPUP_TYPE_SMSG);
    win_compopup_set_msg_ext(str, NULL, 0);

    win_compopup_open_ext(&back_saved);
    osal_task_sleep(1000);
    win_compopup_smsg_restoreback();
}
开发者ID:alkap007,项目名称:ali3606,代码行数:29,代码来源:win_audio_description.c


示例12: as_service_stop

/* API for Stop Auto Scan */
INT32 as_service_stop()
{
    	struct nim_device *nim = NULL;
    
    	osal_task_dispatch_off();
    	if (as_info != NULL)
    	{
        	as_info->stop_scan_signal = 1;
		if(as_info->nim!=NULL)
		{
			nim = as_info->nim;
       	 	nim_io_control(nim, NIM_DRIVER_STOP_ATUOSCAN, 1);
		}
    	}
    	osal_task_dispatch_on();

    	if (as_info != NULL)
    	{
        	psi_search_stop();//stop getting psi section
    	}

    	while (as_info)
        	osal_task_sleep(AS_MODULE_SLEEP_SLICE);

#ifndef __MM_VBV_START_ADDR
		if(NULL != as_buf)
		{
			FREE(as_buf);
			as_buf = NULL;
		}		
#endif

    	return SUCCESS;
}
开发者ID:Janesak1977,项目名称:ali3602,代码行数:35,代码来源:lib_as.c


示例13: osdmsg_display_stop

//clear local disp buff flag
BOOL osdmsg_display_stop()
{
    //OSDMSG_PRINT("@@@@stop message on the Bottom!\n");
    osdmsg_bottom_disp_flag = FALSE;
    osal_task_sleep(50);
    return TRUE;
}
开发者ID:alkap007,项目名称:ali3606,代码行数:8,代码来源:win_cti_osdmsg.c


示例14: ap_osd_layer2_init

void ap_osd_layer2_init()
{
    UINT8 *p_pallette;
    struct OSDPara tOpenPara;
    struct OSDRect region1, region2, rc1, rc2;

    cas_osd_dev = (struct osd_device*)dev_get_by_id(HLD_DEV_TYPE_OSD, 0);

    tOpenPara.eMode = OSD_256_COLOR;
    tOpenPara.uGAlphaEnable = 0;
    tOpenPara.uGAlpha = 0x0F;
    tOpenPara.uPalletteSel = 0;
    OSDDrv_Open((HANDLE)cas_osd_dev, &tOpenPara);
    osal_task_sleep(20);
    OSDDrv_IoCtl((HANDLE)cas_osd_dev, OSD_IO_SET_TRANS_COLOR, OSD_TRANSPARENT_COLOR);

    //create region  for bottom osd msg
    region2.uLeft = 0;
    region2.uTop = 530;
    region2.uWidth = 720;
    region2.uHeight = 28;
    rc2.uLeft = 0;
    rc2.uTop = 0;
    rc2.uWidth = region2.uWidth;
    rc2.uHeight = region2.uHeight;
    OSDDrv_CreateRegion((HANDLE)cas_osd_dev, OSDMSG_REGION_BTM, &region2, NULL);

    p_pallette = OSD_GetRscPallette(0x4080 | 0);
    OSDDrv_SetPallette((HANDLE)cas_osd_dev, p_pallette, COLOR_N, OSDDRV_YCBCR);
    OSDDrv_RegionFill((HANDLE)cas_osd_dev,OSDMSG_REGION_BTM,&rc2,OSD_TRANSPARENT_COLOR);
    OSDDrv_ShowOnOff((HANDLE)cas_osd_dev,OSDDRV_ON);

}
开发者ID:alkap007,项目名称:ali3606,代码行数:33,代码来源:win_cti_osdmsg.c


示例15: config_uart_speed

static void config_uart_speed(UINT8 mode)
{
    if(mode != 1 && mode != 2)
        return;

	*((volatile UINT32 *)(0xB8001308)) = 0;
	osal_task_sleep(100);

    if(1 == mode)
    	*((volatile UINT32 *)(0xB8000074)) = 0x40000000;    // 2M mode
    else
    	*((volatile UINT32 *)(0xB8000074)) = 0x40008000;    // 6M mode
	osal_task_sleep(100); // must delay here

	*((volatile UINT32 *)(0xB8001308)) = 0x08;	
	osal_task_sleep(100);
}
开发者ID:alkap007,项目名称:ali3606,代码行数:17,代码来源:p2p_upgrade.c


示例16: ad_pic_gif_stop

void ad_pic_gif_stop(gif_file file)
{
	if (gif == NULL)
		return;
	
	gif_stop(gif, file);
	osal_task_sleep(100);
	ad_pic_gif_file_remove(file);
}
开发者ID:jinfeng-geeya,项目名称:3202C,代码行数:9,代码来源:ad_pic_gif.c


示例17: url_read

//size_t url_read(void* ptr,size_t size)
size_t url_read(void *ptr, size_t size, size_t nmemb, FILE *stream)
{
	int bytes_read   = 0;
	char *buf = NULL;
	char *buf_handle = NULL;
	//int i=0;
	int total_bytes_read   = 0;

	buf = MALLOC(size);
	buf_handle = buf;
	//libc_printf("url_read  %d!\n",size);
	while(size >0)
	{
		if(libnet_get_wait_flag())
		{
			bytes_read = S_READ(g_sock, buf, size);
			if(bytes_read>0)
			{
				MEMCPY(ptr, buf, bytes_read);
				size-=bytes_read;
				buf+=bytes_read;
				ptr+=bytes_read;
				total_bytes_read+=bytes_read;
				libnet_cb(NET_MSG_DOWNLOAD_PROGRESS, total_bytes_read);
			}
			/*
			This time out should start from video decoder stop, but now we just estimate
			around 60 sec (but can depend on video quality), even video can play over 60sec in buffer !!!
				*/
			if(bytes_read==0 || abort_url_read)
			//if(bytes_read==0)
			{
				if(abort_url_read) total_bytes_read =-1;
				if(bytes_read==0) LIBNET_DEBUG("bytes_read==0!\n");
				else LIBNET_DEBUG("url_timeout");
				FREE(buf_handle);
				libnet_set_wait_flag(FALSE);
				abort_url_read = FALSE;
			    	//progress_destroy(p);
				return total_bytes_read;
			}
			if(bytes_read<0) osal_task_sleep(1);
		}
		else // wait flag = FALSE mean net work terminate
		{
				LIBNET_DEBUG("Url Read terminate!\n");
				abort_url_read = FALSE;
				FREE(buf_handle);
				return total_bytes_read;
		}
	}
	//LIBNET_DEBUG("url_read Finish!\n");
	abort_url_read = FALSE;
	FREE(buf_handle);
	return total_bytes_read;
}
开发者ID:Janesak1977,项目名称:ali3602,代码行数:57,代码来源:libnet.c


示例18: sync_twinkle

void sync_twinkle()
{
#if((_DVB_T_TARGET_BOARD==HW_ALiG00_BOARD_M3101) ||(_DVB_T_TARGET_BOARD==HW_ALiA00_3101_BOARD))
#if ((UPGRADE_FORMAT & BOOT_UPG) == BOOT_UPG)
	toggle_flag = (toggle_flag ? 0:1);
	Upgrade_Twinkle(toggle_flag);
	osal_task_sleep(1);
#endif
#endif
}
开发者ID:alkap007,项目名称:ali3606,代码行数:10,代码来源:p2p_upgrade.c


示例19: libc_demo_pcm_output

static void libc_demo_pcm_output(struct pcm_output * pcm)
{
	UINT8 pcm_frm_header[16];
	UINT32 temp;
	static UINT32 avoid_under_run = 0;

	//config pcm frame header
	MEMSET(pcm_frm_header, 0, 16);
	if (pcm->samp_num&0x00000003)
	{
		//PRINTF("err sample num = %d \n",pcm->samp_num);
		return;
	}
	temp = pcm->samp_num;
	if (DAC_PRECISION == 16)
		temp = temp >> 1 ;

	pcm_frm_header[12] = ((UINT8*)(&temp))[0];
	pcm_frm_header[13] = ((UINT8*)(&temp))[1];

	if (SND_STATE_PLAY != g_snd_dev->flags && 0 == avoid_under_run)
	{

		if (RET_SUCCESS != snd_config(g_snd_dev, snd_samplerate, pcm->samp_num, DAC_PRECISION))
			return;

		snd_write_pcm_data(g_snd_dev, pcm, (UINT32*)pcm_frm_header);
		avoid_under_run = 5;
		return;
	}

	if (0 != avoid_under_run)
	{
		snd_write_pcm_data(g_snd_dev, pcm, (UINT32*)pcm_frm_header);
		avoid_under_run--;
		if (0 == avoid_under_run)
			snd_start(g_snd_dev);
		return;
	}

	while (RET_SUCCESS != snd_request_pcm_buff(g_snd_dev, pcm->samp_num))
	{
		//PRINTF("snd dev not enough PCM buffer.\n");
		osal_task_sleep(10);
	}

	snd_write_pcm_data(g_snd_dev, pcm, (UINT32*)pcm_frm_header);
	if (RET_SUCCESS != snd_data_enough(g_snd_dev))
	{
		snd_write_pcm_data(g_snd_dev, pcm, (UINT32*)pcm_frm_header);
		snd_write_pcm_data(g_snd_dev, pcm, (UINT32*)pcm_frm_header);
	}
	return ;
}
开发者ID:alkap007,项目名称:ali3606,代码行数:54,代码来源:ivorbisfile_example.c


示例20: dispSpiderCamdMsg

void dispSpiderCamdMsg(char *msgDisp)
{

	UINT8 back_saved;
	
	win_compopup_init(WIN_POPUP_TYPE_SMSG);
	win_compopup_set_msg_ext(msgDisp, NULL, 0);
	win_compopup_open_ext(&back_saved);	
	osal_task_sleep(3000);
	win_compopup_smsg_restoreback();
}
开发者ID:alkap007,项目名称:ali3606,代码行数:11,代码来源:win_spielercam.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ oscap_free函数代码示例发布时间:2022-05-30
下一篇:
C++ osal_strlen函数代码示例发布时间: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