本文整理汇总了C++中dev_get_by_id函数的典型用法代码示例。如果您正苦于以下问题:C++ dev_get_by_id函数的具体用法?C++ dev_get_by_id怎么用?C++ dev_get_by_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dev_get_by_id函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: as_select_nim
static INT32 as_select_nim(S_NODE *snode)
{
INT32 res = SUCCESS;
UINT8 nim_id = 0; //0 or 1
if(snode->tuner1_valid == 1)
{
nim_id = 0;
tsi_select(TSI_DMX_0, ts_route_get_nim_tsiid(nim_id));
as_info->nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, nim_id);
}
else if(snode->tuner2_valid == 1)
{
nim_id = 1;
tsi_select(TSI_DMX_0, ts_route_get_nim_tsiid(nim_id));
as_info->nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, nim_id);
}
else
{
nim_id = 0;
as_info->nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, nim_id);
return res;
}
return res;
}
开发者ID:jinfeng-geeya,项目名称:3202C,代码行数:26,代码来源:lib_as.c
示例2: pcm_play_demo
static void pcm_play_demo(void)
{
struct deca_feature_config deca_config;
struct snd_feature_config snd_config;
UINT32 i, j;
struct pcm_output pcm;
INT32 *p_pcm_sp;
g_decv_dev = dev_get_by_id(HLD_DEV_TYPE_DECV, 0);
g_deca_dev = dev_get_by_id(HLD_DEV_TYPE_DECA, 0);
if (RET_SUCCESS != deca_open(g_deca_dev, 0, 0, 0, 0, 0))
{
PRINTF("deca_open failed!!\n");
ASSERT(0);
}
if (RET_SUCCESS != snd_open(g_snd_dev))
{
PRINTF("snd_open failed!!\n");
ASSERT(0);
}
MEMSET(&pcm, 0, sizeof(struct pcm_output));
pcm.ch_num = 2;
pcm.ch_mod = DUAL_CHANNEL;
pcm.ch_left = pcm_left_ch;
pcm.ch_right = pcm_right_ch;
pcm.samp_num = 1152;
snd_set_spdif_type(g_snd_dev, SND_OUT_SPDIF_PCM);
snd_set_volume(g_snd_dev, SND_SUB_OUT, 100);
snd_set_duplicate(g_snd_dev, SND_DUP_NONE);
/*assumes PCM data is in address __MM_AUDIO_PATTERN_ADDR, 400*4608 samples,
Preset PCM sample rate is 48000, each sample occupy 1 double word (32 bits)*/
while (1)
{
p_pcm_sp = (INT32 *)__MM_AUDIO_PATTERN_ADDR;
for (i = 0;i < PCM_FRM_NUM;i++)
{
for (j = 0;j < pcm.samp_num;j++)
{
/*for dual channel mode, 2 channels should have different samples,
herel fills the same samples to 2 channels for demo.
If only have 1 channel PCM, you can only fill 1 channel (left or right), but you should call
snd_set_duplicate(g_snd_dev, SND_DUP_L); or snd_set_duplicate(g_snd_dev, SND_DUP_R);
before play.*/
pcm_left_ch[j] = (*p_pcm_sp) << 5;
pcm_right_ch[j] = (*p_pcm_sp) << 5;
p_pcm_sp++;
}
libc_demo_pcm_output(&pcm);
}
}
}
开发者ID:alkap007,项目名称:ali3606,代码行数:60,代码来源:ivorbisfile_example.c
示例3: lib_subt_atsc_get_osd_handle
struct osd_device* lib_subt_atsc_get_osd_handle(void)
{
#ifdef SHOW_BY_CPU
struct osd_device* ret = (struct osd_device *)dev_get_by_id(HLD_DEV_TYPE_OSD, 1);
#else
struct osd_device* ret = (struct osd_device *)dev_get_by_id(HLD_DEV_TYPE_OSD, g_subt_config_par.osd_layer_id);
#endif
//struct osd_device* ret = (struct osd_device *)dev_get_by_id(HLD_DEV_TYPE_OSD, 0);
return ret;
}
开发者ID:alkap007,项目名称:ali3606,代码行数:10,代码来源:lib_subt_atsc_osd.c
示例4: pic_gif_draw
static INT32 pic_gif_draw(gif_file fh, struct OSDRect *rect, BOOL animation)
{
struct gif_dec_par par;
struct ge_device* ge_dev;
ge_dev = (struct ge_device *)dev_get_by_id(HLD_DEV_TYPE_GE, 0);
if (ge_dev == NULL)
{
AD_GIF_PRINTF("%s() ge device find failed!\n", __FUNCTION__);
return !SUCCESS;
}
#ifdef DUAL_ENABLE
struct osd_device* osd_dev;
osd_dev = (struct ge_device *)dev_get_by_id(HLD_DEV_TYPE_OSD, 0);
if (osd_dev == NULL)
{
AD_GIF_PRINTF("%s() osd device find failed!\n", __FUNCTION__);
return !SUCCESS;
}
#endif
//if (SUCCESS != ad_gif_file_add(fh))
// return !SUCCESS;
//gif_file_init(fh, file, file_len);
if (animation)
gif_io_ctrl(gif, GIF_IO_CMD_DEC_FIRST_PIC, GIF_FALSE);
else
gif_io_ctrl(gif, GIF_IO_CMD_DEC_FIRST_PIC, GIF_TRUE);
MEMSET((void *)&par, 0, sizeof(struct gif_dec_par));
par.in_par.file = fh;
par.in_par.fread_callback = gif_read_data;
par.in_par.fseek_callback = gif_seek_data;
par.in_par.ftell_callback = gif_tell_pos;
par.out_par.dev = (gif_ge_dev)ge_dev;
#ifdef DUAL_ENABLE
par.out_par.dev = (gif_ge_dev)osd_dev;
#endif
par.out_par.handle = 0;//(gif_surface_handle)ad_get_ge_surface(AD_DST_SURFACE);
par.out_par.region = 0;
par.out_par.pos.x = rect->uLeft;
par.out_par.pos.y = rect->uTop;
par.out_par.area.x = par.out_par.area.y = 0;
par.out_par.area.w = rect->uWidth;
par.out_par.area.h = rect->uHeight;
gif_dec(gif, &par);
return SUCCESS;
}
开发者ID:alkap007,项目名称:ali3606,代码行数:55,代码来源:plugin_gif.c
示例5: sys_data_set_display_mode
void sys_data_set_display_mode(AV_Set *av_set)
{
enum TVMode eTVAspect;
enum DisplayMode e169DisplayMode;
if (av_set->tv_ratio == TV_ASPECT_RATIO_169)
eTVAspect = TV_16_9;
else
// if(av_set->tv_ratio==TV_ASPECT_RATIO_43)
eTVAspect = TV_4_3;
if (av_set->tv_ratio == TV_ASPECT_RATIO_AUTO)
e169DisplayMode = NORMAL_SCALE;
else if (av_set->display_mode == DISPLAY_MODE_LETTERBOX)
e169DisplayMode = LETTERBOX;
else if (av_set->display_mode == DISPLAY_MODE_PANSCAN)
e169DisplayMode = PANSCAN;
else
e169DisplayMode = NORMAL_SCALE;
//if(eTVAspect == TV_16_9)
if (av_set->tv_ratio == TV_ASPECT_RATIO_169)
e169DisplayMode = PILLBOX;
vpo_aspect_mode((struct vpo_device*)dev_get_by_id(HLD_DEV_TYPE_DIS, 0), \
eTVAspect, e169DisplayMode);
}
开发者ID:jinfeng-geeya,项目名称:3202C,代码行数:29,代码来源:system_data.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: win_otaset_turn_frntend
void win_otaset_turn_frntend(void)
{
UINT8 back_saved;
S_NODE s_node;
T_NODE t_node;
struct nim_device *nim;
union ft_xpond xpond;
nim = dev_get_by_id(HLD_DEV_TYPE_NIM, 0);
t_node.frq = ota_freq;
t_node.sym = ota_symb;
t_node.pol = ota_pol;
t_node.FEC_inner = ota_modulation;
MEMCPY(&m_ota_cfg.t_node, &t_node, sizeof(t_node));
m_ota_cfg.pid = ota_pid;
win_otaset_get_FreqSymbPid_display();
if(NULL != nim)
{
MEMSET(&xpond, 0, sizeof(xpond));
xpond.c_info.type = FRONTEND_TYPE_C;
xpond.c_info.frq = ota_freq;
xpond.c_info.sym = ota_symb;
xpond.c_info.modulation = ota_modulation;
//frontend_set_nim(nim, NULL, &xpond, 1);
frontend_tuning(nim, NULL, &xpond, 1);
}
开发者ID:alkap007,项目名称:ali3606,代码行数:30,代码来源:win_ota_set.c
示例8: sys_get_host_key
RET_CODE sys_get_host_key(UINT8 *key, UINT32 *len, UINT32 type)
{
unsigned long addr;
CIPLUS_KEY_HDR hdr;
UINT8 aes_key[16];
UINT8 *encryped_data;
struct sto_device *dev = (struct sto_device *)dev_get_by_id(HLD_DEV_TYPE_STO, 0);
libc_printf("%s - type %d\n",__FUNCTION__,type);
if(RET_SUCCESS != find_key(CIPLUS_KEY_AES_KEY, &addr, &hdr))
return RET_FAILURE;
sto_get_data(dev, aes_key, addr, 16);
if(RET_SUCCESS != find_key(type, &addr, &hdr))
return RET_FAILURE;
encryped_data = (UINT8 *)MALLOC(hdr.size);
//encryped_data = g_ci_tmp_buff;
sto_get_data(dev, encryped_data, addr, hdr.size);
decrypt_key(encryped_data, key, aes_key, hdr.size);
if(len)
*len = hdr.size;
FREE(encryped_data);
return RET_SUCCESS;
}
开发者ID:alkap007,项目名称:ali3606,代码行数:32,代码来源:rsa_verify.c
示例9: pic_gif_init
static void pic_gif_init(void)
{
struct osd_device *osd_layer2_dev;
struct gif_cfg init;
osd_layer2_dev =(struct osd_device*)dev_get_by_id(HLD_DEV_TYPE_OSD, 0);
if (osd_layer2_dev == NULL)
{
AD_GIF_PRINTF("%s() OSD_layer2 is not be opened!\n", __FUNCTION__);
}
else
{
OSDDrv_Close((HANDLE)osd_layer2_dev);
AD_GIF_PRINTF("%s() OSD_layer2 is closed!\n", __FUNCTION__);
}
#ifdef DUAL_ENABLE
osd_output_init();
#endif
MEMSET((void *)&init,0,sizeof(struct gif_cfg));
init.bit_buf_start = (UINT8 *)((__MM_MP_BUFFER_ADDR +0x800000)& ~(7<<28));//(UINT8 *)(GIF_BIT_BUF& ~(7<<28));//
init.bit_buf_size = 0x200000;//GIF_BIT_SIZE;//
init.dec_buf_start = (UINT8 *)((__MM_MP_BUFFER_ADDR +0xa00000)& ~(7<<28));//(UINT8 *)(GIF_DEC_BUF& ~(7<<28));//
init.dec_buf_size = (__MM_PVR_VOB_BUFFER_LEN -0xa00000 );//GIF_DEC_SIZE;//__MM_PVR_VOB_BUFFER_ADDR
init.fread_callback = gif_read_data;
init.fseek_callback = gif_seek_data;
init.ftell_callback = gif_tell_pos;
init.max_width = 800; //400;
init.max_height = 600; //300;
gif_init(&init);
//gif_list_init();
gif = gif_open();
}
开发者ID:alkap007,项目名称:ali3606,代码行数:35,代码来源:plugin_gif.c
示例10: ca_info_displayinfo
static void ca_info_displayinfo(unsigned char CardSlot)
{
UINT8 i=0;
//mcas_card_t stcard_info;
#if 1
McasDisplayStrByCardSlot(CardSlot);/*---added by vachel--*/
#else
mcas_card_get_info((struct smc_device *)dev_get_by_id(HLD_DEV_TYPE_SMC, 0),&stcard_info);
switch(stcard_info.ca_system_id)
{
case CAS_SYS_CONAX:
{
Conax_Info_t *pstConax_info;
pstConax_info = &conax;
ca_info_text_display("Conax card",pstConax_info->iCardNumber,pstConax_info->stParam.MatRat,\
NULL,NULL);
}
break;
case CAS_SYS_SECA:
case CAS_SYS_VIACCESS:
case CAS_SYS_IRDETO:
case CAS_SYS_BISS:
break;
default://Unknown card
break;
}
#endif
}
开发者ID:Janesak1977,项目名称:ali3602,代码行数:28,代码来源:win_mcas_info.c
示例11: stb_hwinfo_load
static INT8 stb_hwinfo_load(STB_HWINFO *hwinfo)
{
INT8 ret = 0, i;
UINT32 check_data;
UINT8 data[STB_HWINFO_LEN];
BOOL old2new = FALSE;
struct sto_device *sto = (struct sto_device *)dev_get_by_id(HLD_DEV_TYPE_STO, 0);
if(NULL == sto)
{
ret = -1;
goto RETURN;
}
MEMSET(data,0,STB_HWINFO_LEN);
sto_get_data(sto, data, STB_HWINFO_BASE_ADDR, sizeof(STB_HWINFO));
#if 0
check_data = ((data[0]<<24) |(data[1]<<16) |(data[2]<<8) |(data[3]));
if(check_data == 0xffffffff)
{
ret = -1;
goto RETURN;
}
#endif
MEMCPY(hwinfo, data, sizeof(STB_HWINFO));
//libc_printf("load oui = %d, hwmode = %d, hwversion = %d\n", hwinfo->stb_oui, hwinfo->stb_hw_model, hwinfo->stb_hw_version);
RETURN:
return ret;
}
开发者ID:jinfeng-geeya,项目名称:3202C,代码行数:32,代码来源:stb_hwinfo.c
示例12: gyca_writemaill_all_to_flash
static UINT8 gyca_writemaill_all_to_flash(UINT32 addr, UINT32 mail_head_size)
{
struct sto_device *flash_dev = NULL;
UINT32 mailaddr;
mailaddr=addr + mail_head_size;
//flash_dev = (struct sto_device *)dev_get_by_type(NULL, HLD_DEV_TYPE_STO);
flash_dev = (struct sto_device *)dev_get_by_id(HLD_DEV_TYPE_STO, 0);
if(NULL == flash_dev)
{
GYCAS_PRINTF("gyca_writemaill_all_to_flash: dev_get_by_name failed!\n");
return 1;
}
if(gyca_delmail_all_from_flash(addr)!= 0)
return 2;
gyca_write_flash_mail_head(addr);
gyca_mutex_lock();
if(sizeof(gycamail)*GYCA_EMAIL_MAX_CNT != sto_put_data(flash_dev, mailaddr, flashbuf, sizeof(gycamail)*GYCA_EMAIL_MAX_CNT))
{
gyca_mutex_unlock();
GYCAS_PRINTF("%s: sto_put_data failed!\n", __FUNCTION__);
return 3;
}
gyca_mutex_unlock();
return 0;
}
开发者ID:jinfeng-geeya,项目名称:3202C,代码行数:27,代码来源:cas_gy.c
示例13: config_deo_frm_buf
static void config_deo_frm_buf(void)
{
struct vpo_device *gpvpo_sd;
Imagedec_frm deo_frm_buf[4];
gpvpo_sd = gpvpo_sd = (struct vpo_device *)dev_get_by_id(HLD_DEV_TYPE_DIS, 1);
if(NULL != gpvpo_sd)
{
deo_frm_buf[0].frm_y_addr = (UINT8 *)__MM_FB3_Y_START_ADDR;
deo_frm_buf[0].frm_y_len = __MM_FB3_Y_LEN;
deo_frm_buf[0].frm_c_addr = (UINT8 *)__MM_FB3_C_START_ADDR;
deo_frm_buf[0].frm_c_len = __MM_FB3_C_LEN;
deo_frm_buf[0].busy = 0;
deo_frm_buf[1].frm_y_addr = (UINT8 *)__MM_FB4_Y_START_ADDR;
deo_frm_buf[1].frm_y_len = __MM_FB4_Y_LEN;
deo_frm_buf[1].frm_c_addr = (UINT8 *)__MM_FB4_C_START_ADDR;
deo_frm_buf[1].frm_c_len = __MM_FB4_C_LEN;
deo_frm_buf[1].busy = 0;
deo_frm_buf[2].frm_y_addr = (UINT8 *)__MM_FB5_Y_START_ADDR;
deo_frm_buf[2].frm_y_len = __MM_FB5_Y_LEN;
deo_frm_buf[2].frm_c_addr = (UINT8 *)__MM_FB5_C_START_ADDR;
deo_frm_buf[2].frm_c_len = __MM_FB5_C_LEN;
deo_frm_buf[2].busy = 0;
deo_frm_buf[3].frm_y_addr = (UINT8 *)__MM_FB6_Y_START_ADDR;
deo_frm_buf[3].frm_y_len = __MM_FB6_Y_LEN;
deo_frm_buf[3].frm_c_addr = (UINT8 *)__MM_FB6_C_START_ADDR;
deo_frm_buf[3].frm_c_len = __MM_FB6_C_LEN;
deo_frm_buf[3].busy = 0;
imagedec_ioctl(1, IMAGEDEC_IO_CMD_CFG_DEO_FRM, (UINT32)(&deo_frm_buf));
}
}
开发者ID:Janesak1977,项目名称:ali3602,代码行数:30,代码来源:media_control.c
示例14: gyca_check_flash_mail_head
static UINT8 gyca_check_flash_mail_head(UINT32 addr)
{
struct sto_device *flash_dev = NULL;
UINT32 mailaddr = addr;
UINT8 mail_head[GYCA_MAIL_HEAD_SIZE];
//flash_dev = (struct sto_device *)dev_get_by_type(NULL, HLD_DEV_TYPE_STO);
flash_dev = (struct sto_device *)dev_get_by_id(HLD_DEV_TYPE_STO, 0);
if(NULL == flash_dev)
{
GYCAS_PRINTF("%s: dev_get_by_name failed!\n", __FUNCTION__);
return 1;
}
//if (SUCCESS != flash_dev->get_data(flash_dev, mail_head, mailaddr, GYCA_MAIL_HEAD_SIZE))
if (GYCA_MAIL_HEAD_SIZE != sto_get_data(flash_dev, mail_head, mailaddr, GYCA_MAIL_HEAD_SIZE))
{
GYCAS_PRINTF("%s: sto_get_data failed!\n", __FUNCTION__);
return 2;
}
gyca_mutex_lock();
if(MEMCMP(mail_head,gyca_mail_head, GYCA_MAIL_HEAD_SIZE))
{
gyca_mutex_unlock();
return 3;
}
gyca_mutex_unlock();
return 0;
}
开发者ID:jinfeng-geeya,项目名称:3202C,代码行数:29,代码来源:cas_gy.c
示例15: GetLock
static int GetLock(unsigned int argc, unsigned char *argv[])
{
INT32 ret;
UINT8 lock;
if (argc != 1)
{
SH_PRINTF("Usage: GetLock\n");
return -1;
}
struct nim_device *nim_dev = dev_get_by_id(HLD_DEV_TYPE_NIM, nim_id);
if ((ret = nim_get_lock(nim_dev, &lock)) != SUCCESS)
{
SH_PRINTF("api_nim_get_lock: operation error! %d\n", ret);
return -1;
}
//LIB_ASH_OC('\r');
//LIB_ASH_OC('\n');
if(!lock)
{
LIB_ASH_OC('U');
LIB_ASH_OC('N');
}
LIB_ASH_OC('L');
LIB_ASH_OC('O');
LIB_ASH_OC('C');
LIB_ASH_OC('K');
LIB_ASH_OC('\r');
LIB_ASH_OC('\n');
}
开发者ID:alkap007,项目名称:ali3606,代码行数:35,代码来源:sfu_test.c
示例16: 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, ®ion_rect, NULL);
//p_pallette = OSD_GetRscPallette(0x4080 | 0);
//OSD_SetPallette(p_pallette,256);
//OSDDrv_RegionFill((HANDLE)osd_dev,region_id,®ion_rect,0xff);
//OSDDrv_ShowOnOff((HANDLE)osd_dev, TRUE);
}
开发者ID:alkap007,项目名称:ali3606,代码行数:30,代码来源:plugin_gif.c
示例17: LOGD
/*
* Class: com_dvb_DvbSystemSetting
* Method: setAspect
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL Java_DvbSystemSetting_setAspect
(JNIEnv *env, jclass cls, jint value) {
LOGD("%s,%d value = %d ",__FUNCTION__,__LINE__, value);
enum TVMode eTVAspect;
enum DisplayMode e169DisplayMode;
if (value == 2) {
eTVAspect = TV_16_9;
e169DisplayMode = NORMAL_SCALE;
}
else if( value == 1 ) {
e169DisplayMode = VERTICALCUT;
eTVAspect = TV_4_3;
}
else {
e169DisplayMode = PILLBOX;
eTVAspect = TV_4_3;
}
if(vpo_aspect_mode( (struct vpo_device *)dev_get_by_id(HLD_DEV_TYPE_DIS, 0), eTVAspect, e169DisplayMode) == 0)
return 1;
else
return 0;
}
开发者ID:jetlive,项目名称:TVActivity-ocas-dvbc,代码行数:32,代码来源:com_dvb_DvbSystemSetting.c
示例18: GetPER
static int GetPER(unsigned int argc, unsigned char *argv[])
{
INT32 ret;
UINT32 per;
if (argc != 1)
{
SH_PRINTF("Usage: GetPER\n");
return -1;
}
struct nim_device *nim_dev = dev_get_by_id(HLD_DEV_TYPE_NIM, nim_id);
if ((ret = nim_io_control(nim_dev, NIM_DRIVER_READ_RSUB, &per)) != SUCCESS)
{
if(ret != ERR_TIME_OUT)
{
SH_PRINTF("api_nim_get_PER: operation error! %d\n", ret);
return -1;
}
else
{
per = 0;
}
}
//LIB_ASH_OC('\r');
//LIB_ASH_OC('\n');
IntPrintf(per);
LIB_ASH_OC('\r');
LIB_ASH_OC('\n');
}
开发者ID:alkap007,项目名称:ali3606,代码行数:33,代码来源:sfu_test.c
示例19: GetBER
static int GetBER(unsigned int argc, unsigned char *argv[])
{
INT32 ret;
UINT32 ber;
if (argc != 1)
{
SH_PRINTF("Usage: GetBER\n");
return -1;
}
struct nim_device *nim_dev = dev_get_by_id(HLD_DEV_TYPE_NIM, nim_id);
if ((ret = nim_get_BER(nim_dev, &ber)) != SUCCESS)
{
SH_PRINTF("api_nim_get_BER: operation error! %d\n", ret);
return -1;
}
//LIB_ASH_OC('\r');
//LIB_ASH_OC('\n');
IntPrintf(ber);
LIB_ASH_OC('\r');
LIB_ASH_OC('\n');
}
开发者ID:alkap007,项目名称:ali3606,代码行数:27,代码来源:sfu_test.c
示例20: 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, ®ion2, 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
注:本文中的dev_get_by_id函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论