本文整理汇总了C++中DEVICE_PROP类的典型用法代码示例。如果您正苦于以下问题:C++ DEVICE_PROP类的具体用法?C++ DEVICE_PROP怎么用?C++ DEVICE_PROP使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DEVICE_PROP类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: USB_Istr
/* Minimum USB interrupt handler for USB CDC */
void USB_Istr(void) {
wIstr = _GetISTR();
if (wIstr & ISTR_SOF & wInterrupt_Mask) _SetISTR(CLR_SOF);
if (wIstr & ISTR_CTR & wInterrupt_Mask) CTR_LP();
if (wIstr & ISTR_RESET & wInterrupt_Mask) {
_SetISTR(CLR_RESET);
Device_Property.Reset();
}
}
示例2: __irq_usb_lp_can_rx0
/* overloaded ISR routine, this is the main usb ISR */
void __irq_usb_lp_can_rx0(void) {
wIstr = _GetISTR();
/* go nuts with the preproc switches since this is an ISTR and must be FAST */
#if (ISR_MSK & ISTR_RESET)
if (wIstr & ISTR_RESET & wInterrupt_Mask)
{
_SetISTR((u16)CLR_RESET);
Device_Property.Reset();
}
#endif
#if (ISR_MSK & ISTR_DOVR)
if (wIstr & ISTR_DOVR & wInterrupt_Mask)
{
_SetISTR((u16)CLR_DOVR);
}
#endif
#if (ISR_MSK & ISTR_ERR)
if (wIstr & ISTR_ERR & wInterrupt_Mask)
{
_SetISTR((u16)CLR_ERR);
}
#endif
#if (ISR_MSK & ISTR_WKUP)
if (wIstr & ISTR_WKUP & wInterrupt_Mask) {
_SetISTR((u16)CLR_WKUP);
usbResume(RESUME_EXTERNAL);
}
#endif
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#if (ISR_MSK & ISTR_SUSP)
if (wIstr & ISTR_SUSP & wInterrupt_Mask) {
/* check if SUSPEND is possible */
if (F_SUSPEND_ENABLED) {
usbSuspend();
} else {
/* if not possible then resume after xx ms */
usbResume(RESUME_LATER);
}
/* clear of the ISTR bit must be done after setting of CNTR_FSUSP */
_SetISTR((u16)CLR_SUSP);
}
#endif
#if (ISR_MSK & ISTR_SOF)
if (wIstr & ISTR_SOF & wInterrupt_Mask) {
_SetISTR((u16)CLR_SOF);
bIntPackSOF++;
}
#endif
#if (ISR_MSK & ISTR_ESOF)
if (wIstr & ISTR_ESOF & wInterrupt_Mask) {
_SetISTR((u16)CLR_ESOF);
/* resume handling timing is made with ESOFs */
usbResume(RESUME_ESOF); /* request without change of the machine state */
}
#endif
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
#if (ISR_MSK & ISTR_CTR)
if (wIstr & ISTR_CTR & wInterrupt_Mask) {
/* servicing of the endpoint correct transfer interrupt */
/* clear of the CTR flag into the sub */
CTR_LP(); /* low priority ISR defined in the usb core lib */
}
#endif
}