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


C++ HANDLE::hcontrol方法代码示例

本文整理汇总了C++中HANDLE::hcontrol方法的典型用法代码示例。如果您正苦于以下问题:C++ HANDLE::hcontrol方法的具体用法?C++ HANDLE::hcontrol怎么用?C++ HANDLE::hcontrol使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HANDLE的用法示例。


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

示例1: usb_svc_configendpoint

/**
 * Sets the current device configuration
*/
void usb_svc_configendpoint(HANDLE hnd, const USBGenericDescriptor* ds)
{
	// note: Stall will be performed for the last endpoint used by this handle!!
	hnd->dst.as_voidptr = (void*)usb_svc_configendpoints_hook;
	hnd->src.as_cvoidptr = ds;
	hnd->hcontrol(DCR_HANDLE);
}
开发者ID:bratkov,项目名称:tmos,代码行数:10,代码来源:usb_svc.cpp

示例2: usb_svc_setconfiguration

/**
 * Sets the current device configuration
*/
void usb_svc_setconfiguration(HANDLE hnd, unsigned int cfg)
{
	// note: Stall will be performed for the last endpoint used by this handle!!
	hnd->dst.as_voidptr = (void*)usb_svc_setconfiguration_hook;
	hnd->src.as_int = cfg;
	hnd->hcontrol(DCR_HANDLE);
}
开发者ID:bratkov,项目名称:tmos,代码行数:10,代码来源:usb_svc.cpp

示例3: usb_svc_unhalt

/**
 * Sets the current device configuration
*/
void usb_svc_unhalt(HANDLE hnd, unsigned int eptnum)
{
	// note: Stall will be performed for the last endpoint used by this handle!!
	hnd->dst.as_voidptr = (void*)usb_svc_unhalt_hook;
	hnd->src.as_int = eptnum;
	hnd->hcontrol(DCR_HANDLE);
}
开发者ID:bratkov,项目名称:tmos,代码行数:10,代码来源:usb_svc.cpp

示例4: usb_svc_setaddress

/**
 * Sets the current device configuration
*/
void usb_svc_setaddress(HANDLE hnd, unsigned int adr)
{
    /* Sends a zero-length packet and then set the device address */
    if(hnd->tsk_write(NULL, 0, USB_SETUP_WRITE_TOUT)==RES_OK)
    {
    	// note: Stall will be performed for the last endpoint used by this handle!!
    	hnd->dst.as_voidptr = (void*)usb_svc_setaddress_hook;
    	hnd->src.as_int = adr;
    	hnd->hcontrol(DCR_HANDLE);
    }
}
开发者ID:bratkov,项目名称:tmos,代码行数:14,代码来源:usb_svc.cpp

示例5: ConfigureDacDma

static bool ConfigureDacDma(HANDLE dma_hnd, const DMA_DRIVER_MODE* dma_mode)
{
	if(dma_mode->dma_index < INALID_DRV_INDX)
	{
		if(dma_hnd->res < RES_CLOSED)
		{
			dma_hnd->hcontrol(DCR_CANCEL);
			dma_hnd->close();
		}
		return dma_hnd->drv_open(dma_mode->dma_index, dma_mode);
	}
	return true;
}
开发者ID:bratkov,项目名称:tmos,代码行数:13,代码来源:dac_drv.cpp

示例6: usb_svc_stall

/**
 * Causes the given endpoint to acknowledge the next packet it receives
 * with a STALL handshake
*/
void usb_svc_stall(HANDLE hnd)
{
	// note: Stall will be performed for the last endpoint used by this handle!!
	hnd->dst.as_voidptr = (void*)usb_svc_stall_hook;
	hnd->hcontrol(DCR_HANDLE);
}
开发者ID:bratkov,项目名称:tmos,代码行数:10,代码来源:usb_svc.cpp


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