本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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;
}
示例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);
}