当前位置: 首页>>代码示例>>C++>>正文


C++ MEMSET函数代码示例

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


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

示例1: win_tplist_tuner_frontend

static void win_tplist_tuner_frontend(void)
{
	S_NODE s_node;
	T_NODE t_node;
#ifdef NEW_DEMO_FRAME
	struct ft_antenna antenna;
	union ft_xpond	xpond_info;
	struct nim_device *nim = NULL;
#else
	struct cc_antenna_info antenna;
	struct cc_xpond_info	xpond_info;
#endif

	OBJLIST* ol;
	UINT32 tp_idx;
    UINT16 pre_sat_id,cur_sat_id;
	UINT8 back_saved;
    BOOL old_get_key;

    nim_io_control(g_nim_dev, NIM_DRIVER_STOP_CHANSCAN, 0);
    ap_set_key_notify_proc(win_tplist_key_notify_proc);
    old_get_key = ap_enable_key_task_get_key(TRUE);

    win_signal_set_level_quality(0, 0, 0);
    win_signal_update();
	OSD_UpdateVscr(OSD_GetTaskVscr(osal_task_get_current_id()));

	ol = &tplst_olist;

	tp_idx = OSD_GetObjListCurPoint(ol);
	
	get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx,&s_node);
	get_tp_at(s_node.sat_id,tp_idx,&t_node);

#ifdef SUPPORT_TWO_TUNER
#ifdef SUPPORT_SELECT_SAME_SAT
	cur_tuner_idx = s_node.reserve_1; //antset_cur_tuner;//s_node.tuner1_valid? 0 : 1;
#else
	cur_tuner_idx = s_node.tuner1_valid? 0 : 1;
#endif
#endif

#ifndef NEW_DEMO_FRAME
	struct cc_antenna_info antenna;
	struct cc_xpond_info	xpond_info;

	sat2antenna_ext(&s_node, &antenna,cur_tuner_idx);
	xpond_info.frq = t_node.frq;
	xpond_info.sym = t_node.sym;
	xpond_info.pol = t_node.pol;

	set_antenna(&antenna);
	set_xpond(&xpond_info);
#else
	MEMSET(&antenna, 0, sizeof(struct ft_antenna));
	MEMSET(&xpond_info, 0, sizeof(union ft_xpond));
	sat2antenna(&s_node, &antenna);	
	xpond_info.s_info.type = FRONTEND_TYPE_S;
	xpond_info.s_info.frq = t_node.frq;
	xpond_info.s_info.sym = t_node.sym;
	xpond_info.s_info.pol = t_node.pol;
	xpond_info.s_info.tp_id = t_node.tp_id;
#ifdef SUPPORT_SELECT_SAME_SAT
	nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, ((s_node.reserve_1 == 0)? 0 : ((s_node.reserve_1 == 1) ? 1 : 0)));
#else
	nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, (s_node.tuner1_valid ? 0 : (s_node.tuner2_valid ? 1 : 0)));
#endif
	
	frontend_tuning(nim, &antenna, &xpond_info, 1);
	
#endif
    
    if(pre_tp_sat_idx != cur_tp_sat_idx)
    {
		get_tuner_sat(TUNER_EITHER, pre_tp_sat_idx, &s_node);			
		pre_sat_id = s_node.sat_id;

		get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node);			
		cur_sat_id = s_node.sat_id;
    
		wincom_dish_move_popup_open(/*pre_sat_id*/0xFFFF,cur_sat_id,cur_tuner_idx,&back_saved);
        pre_tp_sat_idx = cur_tp_sat_idx;
    }

    ap_enable_key_task_get_key(old_get_key);
    ap_set_key_notify_proc(NULL);
    nim_io_control(g_nim_dev, NIM_DRIVER_STOP_CHANSCAN, 0);
}
开发者ID:alkap007,项目名称:ali3606,代码行数:88,代码来源:win_tp_list.c

示例2: bm_initialize

acpi_status
bm_initialize (void)
{
	acpi_status             status = AE_OK;
	u32                     start = 0;
	u32                     stop = 0;
	u32                     elapsed = 0;

	FUNCTION_TRACE("bm_initialize");

	MEMSET(&node_list, 0, sizeof(BM_NODE_LIST));

	status = acpi_get_timer(&start);
	if (ACPI_FAILURE(status)) {
		return_ACPI_STATUS(status);
	}

	ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Building device hierarchy.\n"));

	/*
	 * Enumerate ACPI fixed-feature devices.
	 */
	status = bm_enumerate_fixed_features();
	if (ACPI_FAILURE(status)) {
		return_ACPI_STATUS(status);
	}

	/*
	 * Enumerate the ACPI namespace.
	 */
	status = bm_enumerate_namespace();
	if (ACPI_FAILURE(status)) {
		return_ACPI_STATUS(status);
	}

	acpi_get_timer(&stop);
	acpi_get_timer_duration(start, stop, &elapsed);

	ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Building device hierarchy took [%d] microseconds.\n", elapsed));

	/*
	 * Display hierarchy.
	 */
	bm_print_hierarchy();

	/*
	 * Register for all standard and device-specific notifications.
	 */
	ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Registering for all device notifications.\n"));

	status = acpi_install_notify_handler(ACPI_ROOT_OBJECT,
		ACPI_SYSTEM_NOTIFY, &bm_notify, NULL);
	if (ACPI_FAILURE(status)) {
		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unable to register for standard notifications.\n"));
		return_ACPI_STATUS(status);
	}

	status = acpi_install_notify_handler(ACPI_ROOT_OBJECT,
		ACPI_DEVICE_NOTIFY, &bm_notify, NULL);
	if (ACPI_FAILURE(status)) {
		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unable to register for device-specific notifications.\n"));
		return_ACPI_STATUS(status);
	}

	ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "ACPI Bus Manager enabled.\n"));

	/*
	 * Initialize built-in power resource driver.
	 */
	bm_pr_initialize();

	return_ACPI_STATUS(status);
}
开发者ID:GunioRobot,项目名称:MI424WR_GEN2_Rev_E-F,代码行数:73,代码来源:bm.c

示例3: title

/* 
   XBQuickWindow - Create an X window

   Input parameters:
.  mywindow - A pointer to an XBWindow structure that will be used to hold
              information on the window.  This should be acquired with
	      XBWinCreate.
.  host     - name of the display
.  name     - title (name) of the window
.  x,y      - coordinates of the upper left corner of the window.  If <0,
              use user-positioning (normally, the window manager will
	      ask the user where to put the window)
.  nx,ny    - width and height of the window

   Note:
   This creates a window with various defaults (visual, colormap, etc)

   A small modification to this routine would allow Black and White windows
   to be used on color displays; this would be useful for testing codes.
   */
int XBQuickWindow( XBWindow *mywindow, char *host, char *name, int x, int y, int nx, int ny ){
/* Just to be careful, clear mywindow */
    MEMSET( mywindow, 0, sizeof(XBWindow) );
    return XBiQuickWindow( mywindow, host, name, x, y, nx, ny, 0 );
}
开发者ID:grisuthedragon,项目名称:easygraph,代码行数:25,代码来源:xinit.c

示例4: _log2data_swap_merge

/*!
*
* \par  Description:
*       This function copy valuable data from datablk to logblk,then change datablk to freeblk ,change logblk to datablk.
*
* \param  [in]       LogNum,serial number within log block space
* \return      sucess or failed.
* \note         this function was called when log block is in order,that is to say physical
*             page number is same with logical page number.
**/
__s32  _log2data_swap_merge(__u32 nlogical)
{
    __u16 LastUsedPage,SuperPage;
    struct __SuperPhyBlkType_t DataBlk;
    struct __LogBlkType_t LogBlk;
    struct __PhysicOpPara_t SrcParam,DstParam;

    /* init info of data block and log block*/
    BMM_GetDataBlk(nlogical, &DataBlk);
    BMM_GetLogBlk(nlogical, &LogBlk);
    LastUsedPage = LogBlk.LastUsedPage;

	if((SUPPORT_LOG_BLOCK_MANAGE)&&(LogBlk.LogBlkType == LSB_TYPE))
	{
		 LOGICCTL_ERR("swap merge : LSB type not support swap merge\n");
         return NAND_OP_FALSE;
	}

    /*copy data from data block to log block*/
    for (SuperPage = LastUsedPage + 1; SuperPage < PAGE_CNT_OF_SUPER_BLK; SuperPage++){
        /*set source and destinate address*/
        LML_CalculatePhyOpPar(&SrcParam,CUR_MAP_ZONE, DataBlk.PhyBlkNum, SuperPage);
        LML_CalculatePhyOpPar(&DstParam,CUR_MAP_ZONE, LogBlk.PhyBlk.PhyBlkNum, SuperPage);
        if (NAND_OP_TRUE != PHY_PageCopyback(&SrcParam,&DstParam)){
            LOGICCTL_ERR("swap merge : copy back err\n");
            return NAND_OP_FALSE;
        }
        if (NAND_OP_TRUE !=  PHY_SynchBank(DstParam.BankNum, SYNC_BANK_MODE)){
            struct __SuperPhyBlkType_t SubBlk;
            if (NAND_OP_TRUE != LML_BadBlkManage(&LogBlk.PhyBlk,CUR_MAP_ZONE,SuperPage,&SubBlk)){
                LOGICCTL_ERR("swap merge : bad block manage err after copy back\n");
                return NAND_OP_FALSE;
            }
            LogBlk.PhyBlk = SubBlk;
            SuperPage -= 1;
        }
    }

    /*move log block to data block*/
    BMM_SetDataBlk(nlogical, &LogBlk.PhyBlk);
    /*clear log block item*/
    MEMSET(&LogBlk, 0xff, sizeof(struct __LogBlkType_t));
	LogBlk.LogBlkType = 0;
	LogBlk.WriteBlkIndex = 0;
	LogBlk.ReadBlkIndex = 0;
    BMM_SetLogBlk(nlogical, &LogBlk);

    /*erase data block*/
    if ( NAND_OP_TRUE != LML_VirtualBlkErase(CUR_MAP_ZONE, DataBlk.PhyBlkNum)){
        if (NAND_OP_TRUE != LML_BadBlkManage(&DataBlk,CUR_MAP_ZONE,0,NULL)){
            LOGICCTL_ERR("swap merge : bad block manage err erase data block\n");
            return NAND_OP_FALSE;
        }
    }
    /*move erased data block to free block*/
    if (DataBlk.BlkEraseCnt < 0xffff)
        DataBlk.BlkEraseCnt ++;
    BMM_SetFreeBlk(&DataBlk);

    /*clear page map table*/
    PMM_ClearCurMapTbl();

    return  NAND_OP_TRUE;
}
开发者ID:djytw,项目名称:bootloader,代码行数:74,代码来源:merge.c

示例5: factoryset_sel_callback

static PRESULT factoryset_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT32 sel;
	UINT8 bID;
 	char str[10];
    	UINT16 * Uni_str;
    	UINT8* pstr;
	UINT16 cur_idx;
	COM_POP_LIST_TYPE_T list_type;
	OSD_RECT rect;
	COM_POP_LIST_PARAM_T param;
	UINT16 i,n = 0;
	S_NODE s_node;
	UINT32 flag;

	bID = OSD_GetObjID(pObj);

	switch(event)
	{
	case EVN_PRE_CHANGE:
		sel = *((UINT32*)param1);
		break;
		
	case EVN_POST_CHANGE:
		sel = param1;
		
		
	        if(bID == IDC_CON5)
	        {
			get_sat_at(sel,SET_SELECTED,&s_node);	
			#if 0
			#ifdef SUPPORT_TWO_TUNER  //guop modify
			#ifdef SUPPORT_SELECT_SAME_SAT
			OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, ((s_node.reserve_1 == 0) ? RS_LNB1 : RS_LNB2));
			#else
			OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, (s_node.tuner1_valid ? RS_LNB1 : RS_LNB2));
			#endif			
			OSD_DrawObject((POBJECT_HEAD)&satsrch_txt6_note, C_UPDATE_ALL);
			#endif
			#endif
	        }
		break;
		
	case EVN_REQUEST_STRING:
		sel = param1;
		Uni_str= (UINT16*)param2;
		if(bID == IDC_CON5)
		{
			get_sat_name_factory(2,sel,Uni_str);
			sys_data_set_cur_satidx(sel);
		}	
		break;
#if	 0	
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);		
		if(unact ==  VACT_POP_UP)
		{
			OSD_SetRect2(&rect,&pObj->frame);
			switch(bID)
			{
			case SAT_ID:
				rect.uLeft -= 80;
				rect.uWidth += 80;
				list_type 	= POP_LIST_TYPE_SAT;
				rect.uHeight = 300;
				param.id 	= TUNER_EITHER;
				param.cur 	= SATSRCH_SAT_IDX;
				if(single_multi_srch_flag == 0)
					param.selecttype = POP_LIST_SINGLESELECT;
				else
				{
					MEMSET(sat_select,0,sizeof(sat_select));
					n = get_tuner_sat_cnt(TUNER_EITHER);
					if(n == 0)
					{
						list_type = 0xFF;
						break;
					}

					for(i=0;i<n;i++)
					{
						get_tuner_sat(TUNER_EITHER,i,&s_node);
						if(s_node.selected_flag)
							sat_select[i] = 1;							
					}
#if (defined(SUPPORT_TWO_TUNER) || !defined(SELECT_SAT_ONLY))
					param.selecttype = POP_LIST_MULTISELECT;
#else
					param.selecttype = POP_LIST_SINGLESELECT;
#endif
					param.select_array = sat_select;					
				}
				break;
			default:
				list_type = 0xFF;							
			}
			
			if(list_type == 0xFF)
//.........这里部分代码省略.........
开发者ID:alkap007,项目名称:ali3606,代码行数:101,代码来源:win_factory_set.c

示例6: default_int2char

static int 
default_int2char(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, 
		size_t *tolen, const char **pdst, const char *enc)
{
    size_t i, j;
    int offset = 0;
    char **tostr = (char **)(void *)&cw->bp1;
    size_t  *blen = &cw->blen1;
    mbstate_t mbs;
    size_t n;
    ssize_t  nlen = len + MB_CUR_MAX;
    char *dst;
    size_t buflen;
    char	buffer[CONV_BUFFER_SIZE];
    iconv_t	id = (iconv_t)-1;

/* convert first len bytes of buffer and append it to cw->bp
 * len is adjusted => 0
 * offset contains the offset in cw->bp and is adjusted
 * cw->bp is grown as required
 */
#ifdef USE_ICONV
#define CONVERT2(len, cw, offset)					\
    do {								\
	const char *bp = buffer;					\
	while (len != 0) {						\
	    size_t outleft = cw->blen1 - offset;			\
	    char *obp = (char *)cw->bp1 + offset;		    	\
	    if (cw->blen1 < offset + MB_CUR_MAX) {		    	\
		nlen += 256;						\
		BINC_RETC(NULL, cw->bp1, cw->blen1, nlen);		\
	    }						    		\
	    errno = 0;						    	\
	    if (iconv(id, &bp, &len, &obp, &outleft) == (size_t)-1 &&	\
		errno != E2BIG) 					\
		    HANDLE_ICONV_ERROR(obp, bp, outleft, len);		\
	    offset = cw->blen1 - outleft;			        \
	}							        \
    } while (0)
#else
#define CONVERT2(len, cw, offset)
#endif


    MEMSET(&mbs, 0, 1);
    BINC_RETC(NULL, *tostr, *blen, nlen);
    dst = *tostr; buflen = *blen;

#ifdef USE_ICONV
    if (strcmp(nl_langinfo(CODESET), enc)) {
	id = iconv_open(enc, nl_langinfo(CODESET));
	if (id == (iconv_t)-1)
	    goto err;
	dst = buffer; buflen = CONV_BUFFER_SIZE;
    }
#endif

    for (i = 0, j = 0; i < (size_t)len; ++i) {
	n = wcrtomb(dst+j, str[i], &mbs);
	if (n == (size_t)-1) 
	   HANDLE_MBR_ERROR(n, mbs, dst[j], str[i]);
	j += n;
	if (buflen < j + MB_CUR_MAX) {
	    if (id != (iconv_t)-1) {
		CONVERT2(j, cw, offset);
	    } else {
		nlen += 256;
		BINC_RETC(NULL, *tostr, *blen, nlen);
		dst = *tostr; buflen = *blen;
	    }
	}
    }

    n = wcrtomb(dst+j, L'\0', &mbs);
    j += n - 1;				/* don't count NUL at the end */
    *tolen = j;

    if (id != (iconv_t)-1) {
	CONVERT2(j, cw, offset);
	*tolen = offset;
    }

    *pdst = cw->bp1;

    return 0;
err:
    *tolen = j;

    *pdst = cw->bp1;

    return 1;
}
开发者ID:VargMon,项目名称:netbsd-cvs-mirror,代码行数:92,代码来源:conv.c

示例7: _free2log_move_merge


//.........这里部分代码省略.........
					{
						LOGICCTL_ERR("move merge : dst page cal error\n");
						return NAND_OP_FALSE;
					}

					if(SrcPage&(0x1<<15))
						SrcBlock = LogBlk.PhyBlk1.PhyBlkNum;
					else
						SrcBlock = LogBlk.PhyBlk.PhyBlkNum;
					DstBlock = FreeBlk.PhyBlkNum;
					SrcPage &= 0x7fff;

				}
				else
				{
					SrcBlock = LogBlk.PhyBlk.PhyBlkNum;
					DstBlock = FreeBlk.PhyBlkNum;
				}

    		 	LML_CalculatePhyOpPar(&SrcParam,CUR_MAP_ZONE, SrcBlock, SrcPage);
                LML_CalculatePhyOpPar(&DstParam,CUR_MAP_ZONE, DstBlock, DstPage);
    			if (0 == DstPage)
    			{
    				if ( NAND_OP_FALSE == _copy_page0(SrcBlock,SrcPage,FreeBlk.PhyBlkNum,0))
                    {
                         LOGICCTL_ERR("move merge : copy page 0 err1\n");
                         return NAND_OP_FALSE;
                    }
    			}
    			else
    			{
    				SrcParam.MDataPtr = DstParam.MDataPtr = LML_TEMP_BUF;
    				SrcParam.SDataPtr = DstParam.SDataPtr = (void *)&UserData;
        			MEMSET((void *)&UserData,0xff,sizeof(struct __NandUserData_t) * 2);
    				SrcParam.SectBitmap = DstParam.SectBitmap = FULL_BITMAP_OF_SUPER_PAGE;
    				if (LML_VirtualPageRead(&SrcParam) < 0){
           				 LOGICCTL_ERR("move merge : read main data err\n");
            			 return NAND_OP_FALSE;
        			}

       				if (NAND_OP_TRUE != LML_VirtualPageWrite(&DstParam)){
            			LOGICCTL_ERR("move merge : write err\n");
            			return NAND_OP_FALSE;
        			}
    			}
    			if (NAND_OP_TRUE !=  PHY_SynchBank(DstParam.BankNum, SYNC_BANK_MODE))
                {
                	struct __SuperPhyBlkType_t SubBlk;
                    if (NAND_OP_TRUE != LML_BadBlkManage(&FreeBlk,CUR_MAP_ZONE,LastUsedPage,&SubBlk))
                    {
                        LOGICCTL_ERR("move merge : bad block manage err after copy back\n");
                    	return NAND_OP_FALSE;
    				}
    				FreeBlk = SubBlk;
    				SuperPage -= 1;
    			}
    			PMM_SetCurMapPage(SuperPage,DstPage);
    			LastUsedPage = DstPage;
    			DstPage++;
    		}
    	}

    }

    /*erase log block*/
    if(NAND_OP_TRUE != LML_VirtualBlkErase(CUR_MAP_ZONE, LogBlk.PhyBlk.PhyBlkNum))
开发者ID:djytw,项目名称:bootloader,代码行数:67,代码来源:merge.c

示例8: init_slave

static BOOL init_slave()
{
    UINT8 *ptr_data_buf, *ptr_temp_buf;
    UINT32 ptr_zip_pos;
    UINT8 zero_buf[16];
    UINT32 slave_addr;
    UINT32 total_len, len, chid;
    int ret;
    UINT32 i;
    char strTmp[30];
    char strTmp1[30];

	ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_INIT_SLAVER),strTmp);
    callback_fun(2, 0, strTmp);
    P2PUPG_DBG("init_slave\n");

//     init slave sdram
    for(i=0; i<sizeof(m_SlaveConfig)/sizeof(m_SlaveConfig[0]); i++)
    {
        osal_task_sleep(50);
//        if(0xb8000029 == m_SlaveConfig[i].Address)
//        {
//		if(sys_ic_is_M3101())
//			m_SlaveConfig[i].Data = *((volatile UINT8 *)m_SlaveConfig[i].Address) & 0x07;
//		else
//			m_SlaveConfig[i].Data = *((volatile UINT8 *)m_SlaveConfig[i].Address) & 0x1c;
//        }
        erom_wm(m_SlaveConfig[i].Address, &m_SlaveConfig[i].Data, 1, 0);
    }

//     set upgrade param
    init_upgrade_param();
    for(i=0; i<sizeof(EROM_UPGRADE_PARAM); i+=sizeof(UINT32))
    {
        if(!send_upgrade_param(i))
        {
        	ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_SEND_UPGRADE_PARAM_FAILED),strTmp1);
            callback_fun(2, 0,strTmp1);
            return FALSE;
        }
            

    }
    P2PUPG_DBG("send_upgrade_param OK\n");

    unsigned long chunk_id = g_upge_feature_config.chip_flashwr;
    ptr_zip_pos = (UINT8 *)sto_chunk_goto(&chunk_id, 0xFFFFFFFF, 1);
    unsigned long zip_size = sto_fetch_long(ptr_zip_pos + CHUNK_LENGTH);
    ptr_zip_pos += CHUNK_HEADER_SIZE;
    ptr_data_buf = (UINT8 *)bk_buff;   // 48KB for unzip buffer
    ptr_temp_buf = (UINT8 *)(bk_buff + 0xC000);    // 16KB for temp buffer
    P2PUPG_DBG("ptr_zip_pos = 0x%x\n ptr_data_buf = 0x%x\n ptr_temp_buf = 0x%x\n",ptr_zip_pos,ptr_data_buf,ptr_temp_buf);
    if(g_upge_feature_config.enable_lzma_out_read == TRUE)
        ret = un7zip(ptr_zip_pos+SYS_FLASH_BASE_ADDR, zip_size, ptr_temp_buf, 0x4000, ptr_data_buf, 0xC000, NULL);
    else
        ret = un7zip(ptr_zip_pos+SYS_FLASH_BASE_ADDR, ptr_data_buf, ptr_temp_buf);
    P2PUPG_DBG("un7zip ret=%d\n",ret);
    if(ret)
        return FALSE;
    P2PUPG_DBG("un7zip OK");
    MEMCPY(&total_len, ptr_temp_buf, sizeof(unsigned int));
    P2PUPG_DBG("total_len =%d\n",total_len);

    uart_high_speed_config(UART_SPEED_NORMAL);
    // download flashwr
    erom_download(FLASHWR_RUN_ADDR, ptr_data_buf, total_len);
    // init slave config buffer
        P2PUPG_DBG("erom_download1 OK\n");

    MEMSET(zero_buf, 0, sizeof(zero_buf));
    erom_download(FWCFG_START_ADDR, zero_buf, sizeof(zero_buf));
            P2PUPG_DBG("erom_download2 OK\n");

    // download config chunk
    chid = g_upge_feature_config.chip_config;
    if((chid!=0)&&(chid!=0xFFFFFFFF))
    {
        ptr_data_buf = sto_chunk_goto(&chid, 0xFFFFFFFF, 1);
        P2PUPG_DBG("ptr_data_buf=0x%x\n",ptr_data_buf);

        if(ptr_data_buf != NULL)
        {
            total_len = sto_fetch_long((unsigned long)(ptr_data_buf+CHUNK_OFFSET));
            erom_download(FWCFG_START_ADDR, ptr_data_buf, total_len);
        }
    }


    if(UPGRADE_SINGLE == upgrade_mode)
    {
        erom_setpc(FLASHWR_RUN_ADDR);
        osal_task_sleep(50);
        sci_mode_set(p2p_uart_id, 115200, SCI_PARITY_EVEN);
        osal_task_sleep(100);
        config_uart_speed(UART_DOWNLOAD_SPEED);
    }

    return TRUE;
}
开发者ID:alkap007,项目名称:ali3606,代码行数:99,代码来源:p2p_upgrade.c

示例9: GetChunk

UINT32 GetChunk(BYTE *buffer, UINT32 nLen)
{
	UINT8 *p, *pblock;
	UINT32 chunk_pos;
	struct sto_device *sto_dev = NULL;
	UINT8 sVer[16], hVer[16];
	INT32 i = 0;
	char strTmp[30];
#if (defined HDCP_IN_FLASH ||defined DIVX_CERT_ENABLE)
	INT32 temp_slave_blocks_number=0;
	CHUNK_HEADER *temp_pslave_list = NULL;
#endif
	
	switch((unsigned int)buffer[0])
	{
		case 1:
		case 2:
		case 7:
		case 10:
			slave_Flash_type = 0x80000;	//flash size
			break;
		case 3:
		case 4:
		case 8:
		case 9:
		case 11:
		case 13:
			slave_Flash_type = 0x100000;
			break;
		case 5:
		case 6:
		case 12:
		case 14:
		case 15:
		case 16:
		case 25:
		case 28:
		case 30:
			slave_Flash_type = 0x200000;
			break;
		case 17:
		case 18:
		case 19:
		case 33:
			slave_Flash_type = 0x400000;
			break;
		default:
			slave_Flash_type = 0x200000;/*For unkown flash type,default is 2M*/
			//return !SUCCESS;
	}

	slave_status = (unsigned int)buffer[1];
	if(slave_status==0)
		slave_blocks_number = (nLen -2)/CHUNK_HEADER_SIZE;
	else
		slave_blocks_number = 1;

	pslave_list= (CHUNK_HEADER *)MALLOC(sizeof(CHUNK_HEADER)*slave_blocks_number);
	if (pslave_list == NULL)
		return !SUCCESS;
	MEMSET((void *)pslave_list,0,sizeof(CHUNK_HEADER)*slave_blocks_number);

#if (defined HDCP_IN_FLASH ||defined DIVX_CERT_ENABLE)
#ifdef  HDCP_IN_FLASH
	if(m_allcode_include_bootloader==0)
#endif		
		{
			temp_pslave_list= (CHUNK_HEADER *)MALLOC(sizeof(CHUNK_HEADER)*slave_blocks_number);
			if (temp_pslave_list == NULL)
				return !SUCCESS;
			MEMSET((void *)temp_pslave_list,0,sizeof(CHUNK_HEADER)*slave_blocks_number);
		}
#endif

	pblock = &buffer[2];
	for(i=0; i<slave_blocks_number; i++)
	{
		p = pblock + CHUNK_ID;
		pslave_list[i].id = (*p<<24)+(*(p+1)<<16)+(*(p+2)<<8)+(*(p+3)<<0);

		p = pblock + CHUNK_LENGTH;
		pslave_list[i].len = (*p<<24)+(*(p+1)<<16)+(*(p+2)<<8)+(*(p+3)<<0);

		p = pblock + CHUNK_OFFSET;
		pslave_list[i].offset = (*p<<24)+(*(p+1)<<16)+(*(p+2)<<8)+(*(p+3)<<0);

		p = pblock + CHUNK_CRC;
		pslave_list[i].crc = (*p<<24)+(*(p+1)<<16)+(*(p+2)<<8)+(*(p+3)<<0);

		p = pblock + CHUNK_NAME;
		STRCPY((char *)pslave_list[i].name, (char *)p);

		p = pblock + CHUNK_VERSION;
		STRCPY((char *)pslave_list[i].version, (char *)p);

		p = pblock + CHUNK_TIME;
		STRCPY((char *)pslave_list[i].time, (char *)p);

#if (defined HDCP_IN_FLASH ||defined DIVX_CERT_ENABLE)
#ifdef HDCP_IN_FLASH
//.........这里部分代码省略.........
开发者ID:alkap007,项目名称:ali3606,代码行数:101,代码来源:p2p_upgrade.c

示例10: check_interrupts

/*
========================================================================
This routine processes CPU interrupts.
========================================================================
*/
void check_interrupts(void)
{
	static volatile UINT64	last_rst75=0;

	if (((last_rst75 + rst7cycles) < cycles) && !INTDIS)
	{
		IM |= 0x40;
//		if(trace && tracefile != NULL)
//			fprintf(tracefile,"RST 7.5 Issued diff = %d\n", (DWORD) (cycles - last_rst75));
		last_rst75=cycles;
	}

	/* TRAP should be first */

	if(RST75PEND && !INTDIS && !RST75MASK) {
		if(trace && tracefile != NULL)
			fprintf(tracefile,"RST 7.5 CALLed\n");

		if (gDebugInts)
			gIntActive = TRUE;
		gIntSP = SP;
		DECSP2;
		if (gReMem)
		{
			MEMSET(SP, PCL);
			MEMSET(SP+1, PCH);
		}
		else
		{
			gBaseMemory[SP] = PCL;
			gBaseMemory[SP+1] = PCH;
		}
		/* MEM16(SP)=PC; */
		PCL=60;
		PCH=0;
		/* PC=60; */
		cycle_delta += 10;	/* This may not be correct */
		IM=IM&0xBF;
		last_isr_cycle = cycles;

		if (gDelayUpdateKeys == 1)
			update_keys();
	}
	else if(RST65PEND && !INTDIS && !RST65MASK) 
	{
		if(trace && tracefile != NULL)
			fprintf(tracefile,"RST 6.5 CALLed\n");

		if (gDebugInts)
			gIntActive = TRUE;
		gIntSP = SP;
		DECSP2;
		if (gReMem)
		{
			MEMSET(SP, PCL);
			MEMSET(SP+1, PCH);
		}
		else
		{
			gBaseMemory[SP] = PCL;
			gBaseMemory[SP+1] = PCH;
		}

		/* MEM16(SP)=PC; */
		PCL=52;
		PCH=0;
		/* PC=52; */
		cycle_delta += 10;	/* This may not be correct */
//		IM=IM&0xDF;
		last_isr_cycle = cycles;
	}
	return;
}
开发者ID:ProfSteve,项目名称:virtualt,代码行数:78,代码来源:m100emu.c

示例11: IPPVinfo_got_info

INT32 IPPVinfo_got_info()
{
	UINT16 ret;
	UINT16 total_num = CDCA_MAXNUM_IPPVP;
	SCDCAIppvInfo  total_program_info[CDCA_MAXNUM_IPPVP];
	
#if 1	
	MEMSET(total_program_info, 0, sizeof(total_program_info));
	ret = CDCASTB_GetIPPVProgram(current_operator_ID, total_program_info, &total_num);
	if (CDCA_RC_CARD_INVALID== ret)
	{
		win_popup_msg(NULL, NULL, RS_CAERR_NOSMC);
		return 0;
	}
	else if (CDCA_RC_DATA_NOT_FIND == ret)
	{
		win_popup_msg(NULL, NULL, RS_CAERR_DATA_NOT_FOUND);
		return 0;	
	}
	else if (CDCA_RC_DATASPACE_SMALL == ret)
	{
		win_popup_msg(NULL, NULL, RS_CAERR_BUFFER_SMALL);
		return 0;
	}
	else if (CDCA_RC_OK == ret)
	{
		//success, sort the IPPV prog info by Select Sorting Method
		UINT32 i, j, k;
		SCDCAIppvInfo tmp;

		for (i=0; i<total_num; i++)
		{
			k = i;
			for (j=i+1; j<total_num; j++)
			{
				/*if ((total_program_info[j].m_bySlotID < total_program_info[k].m_bySlotID)
					||((total_program_info[j].m_bySlotID == total_program_info[k].m_bySlotID) 
						&&(total_program_info[j].m_dwProductID<total_program_info[k].m_dwProductID)))*/
				if (total_program_info[j].m_dwProductID<total_program_info[k].m_dwProductID)
					k = j;
			}
			if (k != i)
			{
				MEMCPY(&tmp, &total_program_info[i], sizeof(SCDCAIppvInfo));
				MEMCPY(&total_program_info[i], &total_program_info[k], sizeof(SCDCAIppvInfo));
				MEMCPY(&total_program_info[k], &tmp, sizeof(SCDCAIppvInfo));
			}
		}
		//just display the viewed records
		MEMSET(IPPV_program_info, 0, sizeof(IPPV_program_info));
		j= 0;
		for(i=0; i<total_num; i++)
		{
			if (CDCA_IPPVSTATUS_VIEWED == total_program_info[i].m_byBookEdFlag) //viewed
			{
				MEMCPY(&IPPV_program_info[j], &total_program_info[i], sizeof(SCDCAIppvInfo));
				j++;
			}
		}
		total_IPPV_number = j;
	}
	else
	{
		win_popup_msg(NULL, NULL, RS_CAERR_UNKNOWN);
		return 0;
	}
#else // for self -testing 
	UINT32 i, j, k;
	SCDCAIppvInfo tmp;
	total_num = 201;

	MEMSET(total_program_info, 0, sizeof(total_program_info));
	for (k=0;k<total_num;k++)
	{
		i = total_num - k;
		total_program_info[i].m_dwProductID = 1200000290+i;
		total_program_info[i].m_bCanTape = i%2;
		total_program_info[i].m_byBookEdFlag = (i%3) +1;
		total_program_info[i].m_bySlotID = i%5;
		total_program_info[i].m_wPrice = i*3;
	}


		for (i=0; i<total_num; i++)
		{
			k = i;
			for (j=i+1; j<total_num; j++)
			{
				/*if ((total_program_info[j].m_bySlotID < total_program_info[k].m_bySlotID)
					||((total_program_info[j].m_bySlotID == total_program_info[k].m_bySlotID) 
						&&(total_program_info[j].m_dwProductID<total_program_info[k].m_dwProductID)))*/
				if (total_program_info[j].m_dwProductID<total_program_info[k].m_dwProductID)
					k = j;
			}
			if (k != i)
			{
				MEMCPY(&tmp, &total_program_info[i], sizeof(SCDCAIppvInfo));
				MEMCPY(&total_program_info[i], &total_program_info[k], sizeof(SCDCAIppvInfo));
				MEMCPY(&total_program_info[k], &tmp, sizeof(SCDCAIppvInfo));
			}
//.........这里部分代码省略.........
开发者ID:jinfeng-geeya,项目名称:3202C,代码行数:101,代码来源:win_ca_IPPVinfo.c

示例12: ci_info_init

static void ci_info_init()
{
	char * tmp;
	UINT8 *tmp_buf;
	
	// init
	MEMSET(&ci_info, 0, sizeof(ci_info));
	// get menu string
	tmp_buf = (void*)(win_ci_get_tmp_buf());
	
	tmp = api_ci_get_menu_string(tmp_buf, CI_DATA_BUFFER_LEN, ci_slot);

	if(tmp != NULL)
	{
		ci_info_set_string(ci_info.name, CI_MENU_TXT_LENGTH, tmp);
	}
	else
	{
		ci_info.name[0] = '\0';
	}


	//set the window style as the difference show modal
	win_ci_info_set_colorstyle();
	if(win_ci_info_modal == WIN_CI_INFO_SHOW_AS_MODAL)
	{
        OSD_SetColor((POBJECT_HEAD)&g_win_ci_info,WIN_SH_IDX_SD,WIN_HL_IDX_SD,WIN_SL_IDX_SD,WIN_GRY_IDX_SD);
        OSD_MoveObject((POBJECT_HEAD)&g_win_ci_info, W_L_SD,W_T_SD, 0);//62, 55, 0);
		OSD_MoveObject((POBJECT_HEAD)&txt_ci_info_split1, W_L_SD + 10, SPLIT_1_T_SD, 0); //62, SPLIT_1_T, 0);
		OSD_MoveObject((POBJECT_HEAD)&txt_ci_info_split2, W_L_SD + 10, SPLIT_2_T_SD, 0);//62, SPLIT_2_T - 1, 0);
	}
	else
	{
		OSD_SetColor((POBJECT_HEAD)&g_win_ci_info, WIN_SUBMENU_BODY_FRAME, WIN_SUBMENU_BODY_FRAME, WIN_SUBMENU_BODY_FRAME, WIN_SUBMENU_BODY_FRAME);//guop
		OSD_MoveObject((POBJECT_HEAD)&g_win_ci_info, W_L,W_T, 0);
		OSD_MoveObject((POBJECT_HEAD)&txt_ci_info_split1, SPLIT_1_L, SPLIT_1_T, 0);
		OSD_MoveObject((POBJECT_HEAD)&txt_ci_info_split2, SPLIT_1_L, SPLIT_2_T, 0);
	}
	

	/////////////////////////////////////////////////////////////////////////	
	//clear the menu
	//1. CI Title
	OSD_SetTextFieldContent(&txt_ci_info_title, STRING_UNICODE, (UINT32)"");
	//2. sub title
	ci_info_subtitle_content[0].text.pString = NULL;
	
	//3. bottom 
	OSD_SetTextFieldContent(&txt_ci_info_bottom, STRING_UNICODE, (UINT32)"");
	//4. list
	OSD_SetObjListCount(&olst_ci_info, 0);
	
	OSD_SetAttr(&sb_ci_info, C_ATTR_HIDDEN);

	//show the ci enquiry dialog
	OSD_SetObjpNext(&txt_ci_info_bottom, NULL);
	//the the windows focus to the dialog
	g_win_ci_info.FocusObjectID = 1;


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

示例13: win_satsrch_set_scroll_drawselectsats

static UINT8 win_satsrch_set_scroll_drawselectsats(UINT8  start_sat_idx)
{
    struct OSDRect rect;
    UINT16 i,sat_cnt,num;
    UINT16 col,row;
    TEXT_FIELD* txt = &satsrch_multisats_name;
    S_NODE s_node;
    UINT16 top;
    UINT16 str[50];
    UINT16 nStrLen;

    UINT8  disp_total_row,adjust_row,start_disp_id;
    UINT8  next_start_idx=start_sat_idx+2;

    if(single_multi_srch_flag == 0)
        return;

    MEMSET(sat_ids,0,sizeof(sat_ids)/sizeof(sat_ids[0]));

    sat_cnt = num = get_tuner_sat_cnt(TUNER_EITHER_SELECT);//get_selected_sat_num();
    if(num > SELSAT_ROW_CNT *2)
        num = SELSAT_ROW_CNT *2;

    txt->pString = display_strs[0];
    for(i=0; i<sat_cnt; i++)
    {
        get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node);
        sat_ids[i] = s_node.sat_id;
    }

    if(start_sat_idx>=(sat_cnt+SELSAT_ROW_CNT*2-2))
        next_start_idx=0;

    start_disp_id=0;
    if(start_sat_idx==0)
    {
        disp_total_row=1;
        adjust_row=5;
    }
    else if(start_sat_idx==2)
    {
        disp_total_row=2;
        adjust_row=4;
    }
    else if(start_sat_idx==4)
    {
        disp_total_row=3;
        adjust_row=3;
    }
    else if(start_sat_idx==6)
    {
        disp_total_row=4;
        adjust_row=2;
    }
    else
    {
        disp_total_row=SELSAT_ROW_CNT;
        adjust_row=1;
        if(start_sat_idx>=(SELSAT_ROW_CNT*2))
            start_disp_id=start_sat_idx-(SELSAT_ROW_CNT*2)+2;
    }

    /*if(start_sat_idx==0)
    {
    	struct OSDRect r;

    	r.uLeft=SELSAT_L0;//txt.head.frame.uLeft;//200;
    	r.uTop=SELSAT_T-40;//txt.head.frame.uTop;//300;
    	r.uWidth=SELSAT_W*2+40;//txt.head.frame.uWidth;//100;
    	r.uHeight=SELSAT_H*5-30;//txt.head.frame.uHeight;//45;

    	OSD_DrawFrame(&r,RGB24_RGB1555(173,173,173),NULL);
    }*/

    for(i=/*0*//*start_sat_idx*/start_disp_id; i<(/*SELSAT_ROW_CNT*/disp_total_row*2+start_disp_id); i++)
    {
        row = (i-start_disp_id)/2+adjust_row;

        top = SELSAT_T + row * 30/*SELSAT_H*/-40;
        if(i%2 == 0)
            OSD_SetRect(&txt->head.frame, SELSAT_L0, top, SELSAT_W, SELSAT_H-6);
        else
            OSD_SetRect(&txt->head.frame, SELSAT_L1, top, SELSAT_W, SELSAT_H-6);

        get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node);

        if(i<sat_cnt)
        {
            if(s_node.DiSEqC_type !=6)
                ComUniStrCopyChar((UINT8*)txt->pString, s_node.sat_name);
        }
        else
        {
            ComAscStr2Uni("", txt->pString);
            //next_start_idx=0;
        }
        OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL);

        //if(adjust_row && (i%2==1))
        //	adjust_row-=2;
//.........这里部分代码省略.........
开发者ID:alkap007,项目名称:ali3606,代码行数:101,代码来源:win_satsearch_set.c

示例14: win_tplist_list_unkown_act_proc


//.........这里部分代码省略.........
			break;
		
		get_tp_at(s_node.sat_id,sel, &t_node);		
		choice = win_tpe_open(0, s_node.sat_id, t_node.tp_id);
		if( choice)
 		{
			win_tpe_get_setting(&freq, &symb, &pol);
			if(freq != t_node.frq || symb != t_node.sym || pol != t_node.pol)
			{
				t_node.frq = freq;
				t_node.sym = symb;
				t_node.pol = pol;				
				modify_tp(t_node.tp_id,&t_node);
				api_stop_timer(&tpturn_timer_id);
				tpturn_timer_id = api_start_timer(TPTURN_TIMER_NAME, TPTURN_TIMER_TIME, win_tplist_tpturn_handler);
				
			}
		}
		
		//OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		OSD_TrackObject( (POBJECT_HEAD)&g_win_tplist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
		
		break;
	case VACT_TP_ADD:
		if(OSD_GetObjListCount(ol) == MAX_TP_NUM)
			break;
		extern UINT32 edit_tp_exist;
	    edit_tp_exist = 0;
		
		choice = win_tpe_open(1, s_node.sat_id, 0);
		if(choice)
		{
			win_tpe_get_setting(&freq, &symb, &pol);
			MEMSET(&t_node,0,sizeof(t_node) );
			t_node.frq = freq;
			t_node.sym = symb;
			t_node.pol = pol;	
			t_node.sat_id = s_node.sat_id;
			iret = add_node(TYPE_TP_NODE,s_node.sat_id,(void*)&t_node);
			if((iret == DBERR_MAX_LIMIT) || (iret == DBERR_FLASH_FULL))
			{
				OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
				win_compopup_init(WIN_POPUP_TYPE_OK);
				win_compopup_set_msg(NULL,NULL, RS_DISPLAY_TOO_MANY_TP);
				win_compopup_open_ext(&back_saved);
				break;				
			}
			OSD_SetObjListCount(ol, OSD_GetObjListCount(ol) + 1);
			//OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
			OSD_TrackObject( (POBJECT_HEAD)&g_win_tplist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
			OSD_ChangeFocus((POBJECT_HEAD)ol,OSD_GetObjListCount(ol) - 1, C_DRAW_SIGN_EVN_FLG | C_UPDATE_FOCUS);

			api_stop_timer(&tpturn_timer_id);
			tpturn_timer_id = api_start_timer(TPTURN_TIMER_NAME, TPTURN_TIMER_TIME, win_tplist_tpturn_handler);
			
		}
		else
		{
            OSD_TrackObject( (POBJECT_HEAD)&g_win_tplist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
			//OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
             if( edit_tp_exist > 0)
             {
                 OSD_ChangeFocus((POBJECT_HEAD)ol,edit_tp_exist - 1, C_DRAW_SIGN_EVN_FLG | C_UPDATE_FOCUS);
                 edit_tp_exist = 0;
             }
             //OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
开发者ID:alkap007,项目名称:ali3606,代码行数:67,代码来源:win_tp_list.c

示例15: win_signal_update

BOOL win_signal_update(void)
{
	POBJECT_HEAD pObj;
	PROGRESS_BAR* bar;
	TEXT_FIELD*	  txt;

	char str[20];
	INT str_len;


	pObj = (POBJECT_HEAD)&g_win_signal;
	if(pObj->pRoot == NULL)
		return FALSE;


	bar = &sig_bar_level;
	txt = &sig_txt_level_per;
	OSD_SetTextFieldContent(txt, STRING_NUM_PERCENT, OSD_GetProgressBarPos(bar));


	bar = &sig_bar_quality;
	txt = &sig_txt_quality_per;
	OSD_SetTextFieldContent(txt, STRING_NUM_PERCENT, OSD_GetProgressBarPos(bar));

	OSD_DrawObject(pObj, C_UPDATE_ALL);

#if 0
     struct OSDRect rect;
    VSCR vscr;
    int  i,j;
    extern struct osd_s3601_private *gp_osd_s3601_private0;
    UINT8        *pBuf,*pbyte;
    UINT32        *buf;
    //ge_s3601_private_t *osd_s3601_private0 = (ge_s3601_private_t *)(g_ge_dev->priv);
    UINT8 *ge_data_buf = (UINT8 *)(__MM_GE_START_ADDR);
    UINT8 *osd_bg_buf = (UINT8 *)((__MM_OSD_BK_ADDR1 + 31) & 0xFFFFFFE0);
    rect.uLeft = 240;
    rect.uTop  = 162;
    rect.uWidth  = 80;
    rect.uHeight = 160;
    pBuf = (UINT8 *)MALLOC(51200);
    MEMSET(pBuf,0,51200);
    vscr.bBlockID = 0;
    vscr.bColorMode = OSD_HD_ARGB8888;
    vscr.lpbScr = pBuf;
    vscr.updatePending = 1;
    vscr.vR = rect;
    if(color_test_flag)
    {
        libc_printf("\n===============================display buf======================================\n");
        for(i = 0; i < 2; i++)
        {
            pbyte = (UINT8 *)(ge_data_buf) + 5120 * (i+rect.uTop) + rect.uLeft * 4;//
            buf = (UINT32 *)pbyte;  
            for(j = 0;j < rect.uWidth;j++)
            {
                if(j % 8 == 0)
                {
                   libc_printf("\n"); 
                }
                libc_printf("0x%04x,",*buf++);
            }
        }
        libc_printf("\n=================================background buf=================================\n");
        for(i = 0; i < 2; i++)
        {
            pbyte = (UINT8 *)(osd_bg_buf) + 5120 * (i+rect.uTop) + rect.uLeft * 4;//
            buf = (UINT32 *)pbyte;  
            for(j = 0;j < rect.uWidth;j++)
            {
                if(j % 8 == 0)
                {
                   libc_printf("\n"); 
                }
                libc_printf("0x%04x,",*buf++);
            }
        }
        
    }
    while(color_test_flag)
    {
        MEMSET(pBuf,0,51200);
        OSDDrv_RegionRead(g_osd_dev,0,&vscr,&vscr.vR);
        libc_printf("\n----------------------------------------read virtual buf-------------------------------");
        for(i = 0; i < 2; i++)
        {
            pbyte = vscr.lpbScr;
            buf = (UINT32 *)pbyte;  
            for(j = 0;j < rect.uWidth;j++)
            {
                if(j % 8 == 0)
                {
                   libc_printf("\n"); 
                }
                libc_printf("0x%04x,",*buf++);
            }
        }
        libc_printf("\n----------------------------------------read background buf=-------------------------------");
        for(i = 0; i < 2; i++)
        {
//.........这里部分代码省略.........
开发者ID:alkap007,项目名称:ali3606,代码行数:101,代码来源:win_signal.c


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