您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ udd_sleep_mode函数代码示例

51自学网 2021-06-03 09:05:44
  C++
这篇教程C++ udd_sleep_mode函数代码示例写得很实用,希望能帮到您。

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

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

示例1: udd_attach

void udd_attach(void){	irqflags_t flags;	flags = cpu_irq_save();	// At startup the USB bus state is unknown,	// therefore the state is considered IDLE to not miss any USB event	udd_sleep_mode(true);	// Enable peripheral clock and USB clock	udd_enable_periph_ck();	// Authorize attach if VBus is present	udd_enable_transceiver();	udd_attach_device();	// Enable USB line events	udd_enable_suspend_interrupt();	udd_enable_wake_up_interrupt();	udd_enable_resume_interrupt();	udd_enable_ext_resume_interrupt();	udd_enable_sof_interrupt();	cpu_irq_restore(flags);}
开发者ID:AshitakaLax,项目名称:Ultimate_Developer_Keyboard,代码行数:25,


示例2: udd_detach

void udd_detach(void){	otg_unfreeze_clock();	// Detach device from the bus	udd_detach_device();	udd_sleep_mode(false);}
开发者ID:12019,项目名称:USB-Rubber-Ducky,代码行数:7,


示例3: udd_attach

void udd_attach(void){	irqflags_t flags;	flags = cpu_irq_save();	// At startup the USB bus state is unknown,	// therefore the state is considered IDLE to not miss any USB event	udd_sleep_mode(true);	otg_unfreeze_clock();	while (!Is_otg_clock_usable());	// Authorize attach if Vbus is present	udd_attach_device();	// Enable USB line events	udd_enable_reset_interrupt();	udd_enable_suspend_interrupt();	udd_enable_wake_up_interrupt();	udd_enable_sof_interrupt();	// Reset following interrupts flag	udd_ack_reset();	udd_ack_sof();	// The first suspend interrupt must be forced	udd_raise_suspend();	udd_ack_wake_up();	otg_freeze_clock();	cpu_irq_restore(flags);}
开发者ID:InSoonPark,项目名称:asf,代码行数:30,


示例4: udd_detach

void udd_detach(void){	// Disable transceiver	udd_disable_transceiver();	// Detach device from the bus	udd_detach_device();	udd_sleep_mode(false);}
开发者ID:AshitakaLax,项目名称:Ultimate_Developer_Keyboard,代码行数:8,


示例5: udd_send_remotewakeup

void udd_send_remotewakeup(void){#ifndef UDD_NO_SLEEP_MGR	if (!udd_b_idle)#endif	{		udd_sleep_mode(true); // Enter in IDLE mode		udd_send_remote_wake_up();	}}
开发者ID:aero530,项目名称:Robit_xMega,代码行数:10,


示例6: udd_attach

void udd_attach(void){	irqflags_t flags;	flags = cpu_irq_save();	// At startup the USB bus state is unknown, 	// therefore the state is considered IDLE to not miss any USB event	udd_sleep_mode(true);	otg_unfreeze_clock();		// This section of clock check can be improved with a chek of 	// USB clock source via sysclk()#if UC3A3	// For parts with high speed feature, the "USABLE" clock is the UTMI clock,	// and the UTMI clock is disabled in suspend mode. Thereby, the utmi clock	// can't be checked when USB line is not attached or in suspend mode 	// But it is not a issue, because the clock source is the OSC#else	// Check USB clock because the source can be a PLL	while( !Is_clock_usable() );#endif	// Authorize attach if VBus is present	udd_attach_device();	// (RESET_AND_WAKEUP)	// After the attach and the first USB suspend, the following USB Reset time can be inferior to CPU restart clock time.	// Thus, the USB Reset state is not detected and endpoint control is not allocated	// In this case, a Reset is do automatically after attach.	udc_reset();	// Reset USB Device Stack Core	udd_reset_ep_ctrl();	// Reset endpoint control	udd_ctrl_init();	// Reset endpoint control management	// Enable USB line events	udd_enable_reset_interrupt();	udd_enable_suspend_interrupt();	udd_enable_wake_up_interrupt();#ifdef UDC_SOF_EVENT	udd_enable_sof_interrupt();#endif	// Reset following interupts flag	udd_ack_reset();	udd_ack_sof();      // The first suspend interrupt must be forced#if UC3A3   // With UTMI, the first suspend is detected but must be cleared to reoccur interrupt   udd_ack_suspend();#else   // The first suspend interrupt is not detected else raise it   udd_raise_suspend();#endif	udd_ack_wake_up();	otg_freeze_clock();	cpu_irq_restore(flags);}
开发者ID:12019,项目名称:USB-Rubber-Ducky,代码行数:55,


示例7: udd_send_remotewakeup

void udd_send_remotewakeup(void){#ifndef UDD_NO_SLEEP_MGR	if (!udd_b_idle)#endif	{		udd_sleep_mode(true); // Enter in IDLE mode		otg_unfreeze_clock();		udd_initiate_remote_wake_up();	}}
开发者ID:AndreyMostovov,项目名称:asf,代码行数:11,


示例8: udd_disable

void udd_disable(void){	irqflags_t flags;	flags = cpu_irq_save();	// Disable USB pad	otg_disable();	otg_disable_pad();	sysclk_disable_usb();	udd_sleep_mode(false);#ifndef UDD_NO_SLEEP_MGR	sleepmgr_unlock_mode(USBB_SLEEP_MODE_USB_SUSPEND);#endif	cpu_irq_restore(flags);}
开发者ID:12019,项目名称:USB-Rubber-Ducky,代码行数:14,


示例9: udd_disable

void udd_disable(void){	irqflags_t flags;	flags = cpu_irq_save();	udd_detach_device();	// Disable interface	USB_CTRLA = 0;	USB_CTRLB = 0;	sysclk_disable_usb();	udd_sleep_mode(false);#ifndef UDD_NO_SLEEP_MGR	sleepmgr_unlock_mode(USBC_SLEEP_MODE_USB_SUSPEND);#endif	cpu_irq_restore(flags);}
开发者ID:aero530,项目名称:Robit_xMega,代码行数:15,


示例10: udd_attach

void udd_attach(void){	irqflags_t flags;	flags = cpu_irq_save();	// At startup the USB bus state is unknown,	// therefore the state is considered IDLE to not miss any USB event	udd_sleep_mode(true);	udd_ack_suspend_event();	udd_ack_resume_event();	udd_attach_device();	// Enable main USB interrupts	udd_enable_tc_interrupt();	udd_enable_busevt_interrupt();	udd_enable_setup_interrupt();	udd_enable_start_of_frame_interrupt();	cpu_irq_restore(flags);}
开发者ID:aero530,项目名称:Robit_xMega,代码行数:20,


示例11: udd_attach

void udd_attach(void){	irqflags_t flags;	flags = cpu_irq_save();	// At startup the USB bus state is unknown,	// therefore the state is considered IDLE to not miss any USB event	udd_sleep_mode(true);	otg_unfreeze_clock();	while( !Is_otg_clock_usable() );	// Authorize attach if Vbus is present	udd_attach_device();	// Enable USB line events	udd_enable_reset_interrupt();	udd_enable_suspend_interrupt();	udd_enable_wake_up_interrupt();	udd_enable_sof_interrupt();#ifdef USB_DEVICE_HS_SUPPORT	udd_enable_msof_interrupt();#endif	// Reset following interrupts flag	udd_ack_reset();	udd_ack_sof();	udd_ack_msof();	// The first suspend interrupt must be forced#if UC3A3	// With UTMI, the first suspend is detected but must be cleared to reoccur interrupt	udd_ack_suspend();#else	// The first suspend interrupt is not detected else raise it	udd_raise_suspend();#endif	udd_ack_wake_up();	otg_freeze_clock();	cpu_irq_restore(flags);}
开发者ID:AndreyMostovov,项目名称:asf,代码行数:39,


示例12: ISR

ISR(udd_interrupt, AVR32_USBB_IRQ_GROUP, UDD_USB_INT_LEVEL)#  endif#endif{	if (Is_udd_sof()) {		udd_ack_sof();		if (Is_udd_full_speed_mode()) {			udc_sof_notify();		}#ifdef UDC_SOF_EVENT		UDC_SOF_EVENT();#endif		goto udd_interrupt_end;	}	if (Is_udd_msof()) {		udd_ack_msof();		udc_sof_notify();		goto udd_interrupt_end;	}	if (udd_ctrl_interrupt())		goto udd_interrupt_end; // Interrupt acked by control endpoint managed#if (0 != USB_DEVICE_MAX_EP)	if (udd_ep_interrupt())		goto udd_interrupt_end; // Interrupt acked by bulk/interrupt/isochronous endpoint managed#endif	// USB bus reset detection	if (Is_udd_reset()) {		udd_ack_reset();		// Abort all jobs on-going#if (USB_DEVICE_MAX_EP != 0)		udd_ep_job_table_kill();#endif		// Reset USB Device Stack Core		udc_reset();		// Reset endpoint control		udd_reset_ep_ctrl();		// Reset endpoint control management		udd_ctrl_init();		goto udd_interrupt_end;	}	if (Is_udd_suspend_interrupt_enabled() && Is_udd_suspend()) {		otg_unfreeze_clock();		// The suspend interrupt is automatic acked when a wakeup occur		udd_disable_suspend_interrupt();		udd_enable_wake_up_interrupt();		otg_freeze_clock(); // Mandatory to exit of sleep mode after a wakeup event		udd_sleep_mode(false); // Enter in SUSPEND mode#ifdef UDC_SUSPEND_EVENT		UDC_SUSPEND_EVENT();#endif		goto udd_interrupt_end;	}	if (Is_udd_wake_up_interrupt_enabled() && Is_udd_wake_up()) {		// Ack wakeup interrupt and enable suspend interrupt		otg_unfreeze_clock();		// Check USB clock ready after suspend and eventually sleep USB clock		while( !Is_otg_clock_usable() );		// The wakeup interrupt is automatic acked when a suspend occur		udd_disable_wake_up_interrupt();		udd_enable_suspend_interrupt();		udd_sleep_mode(true); // Enter in IDLE mode#ifdef UDC_RESUME_EVENT		UDC_RESUME_EVENT();#endif		goto udd_interrupt_end;	}	if (Is_otg_vbus_transition()) {		// Ack Vbus transition and send status to high level		otg_unfreeze_clock();		otg_ack_vbus_transition();		otg_freeze_clock();#ifndef USB_DEVICE_ATTACH_AUTO_DISABLE		if (Is_otg_vbus_high()) {			udd_attach();		} else {			udd_detach();		}#endif#ifdef UDC_VBUS_EVENT		UDC_VBUS_EVENT(Is_otg_vbus_high());#endif		goto udd_interrupt_end;	}udd_interrupt_end:	otg_data_memory_barrier();#if (defined FREERTOS_USED)	// Since we do not know if the user callbacks have used or not FreeRTOS APIs, let's	// consider that exiting from the USB interrupt will require a context switch.	return pdTRUE;#else	return;#endif//.........这里部分代码省略.........
开发者ID:AndreyMostovov,项目名称:asf,代码行数:101,


示例13: ISR

ISR(udd_interrupt, AVR32_USBB_IRQ_GROUP, UDD_USB_INT_LEVEL)#endif{#ifdef UDC_SOF_EVENT	if (Is_udd_sof()) {		udd_ack_sof();		UDC_SOF_EVENT();		goto udd_interrupt_end;	}#endif	if (udd_ctrl_interrupt())		goto udd_interrupt_end;	// Interrupt acked by control endpoint managed#if (0!=USB_DEVICE_MAX_EP)	if (udd_ep_interrupt())		goto udd_interrupt_end;	// Interrupt acked by bulk/interrupt/isochronous endpoint managed#endif	// USB bus reset detection	if (Is_udd_reset()) {		udd_ack_reset();		// Abort all jobs on-going#if (0!=USB_DEVICE_MAX_EP)		udd_ep_job_table_kill();#endif		// Reset USB Device Stack Core		udc_reset();		// Reset endpoint control		udd_reset_ep_ctrl();		// Reset endpoint control management		udd_ctrl_init();		goto udd_interrupt_end;	}	if (Is_udd_suspend_interrupt_enabled() && Is_udd_suspend()) {		otg_unfreeze_clock();		// The suspend interrupt is automatic acked when a wakeup occur		udd_disable_suspend_interrupt();		udd_enable_wake_up_interrupt();		otg_freeze_clock();	// Mandatory to exit of sleep mode after a wakeup event		udd_sleep_mode(false);	// Enter in SUSPEND mode#ifdef UDC_SUSPEND_EVENT		UDC_SUSPEND_EVENT();#endif		goto udd_interrupt_end;	}	if (Is_udd_wake_up_interrupt_enabled() && Is_udd_wake_up()) {		// Ack wakeup interrupt and enable suspend interrupt		otg_unfreeze_clock();		// Check USB clock ready after suspend and eventually sleep USB clock		while( !Is_clock_usable() ) {			if(Is_udd_suspend()) break;   // In case of USB state change in HS		};		// The wakeup interrupt is automatic acked when a suspend occur		udd_disable_wake_up_interrupt();		udd_enable_suspend_interrupt();		udd_sleep_mode(true);	// Enter in IDLE mode#ifdef UDC_RESUME_EVENT		UDC_RESUME_EVENT();#endif		goto udd_interrupt_end;	}	if (Is_udd_vbus_transition()) {		// Ack VBus transition and send status to high level		otg_unfreeze_clock();		udd_ack_vbus_transition();		otg_freeze_clock();#ifdef UDC_VBUS_EVENT		UDC_VBUS_EVENT(Is_udd_vbus_high());#endif		goto udd_interrupt_end;	}udd_interrupt_end:	otg_data_memory_barrier();	return;}
开发者ID:12019,项目名称:USB-Rubber-Ducky,代码行数:79,



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


C++ udev_builtin_add_property函数代码示例
C++ udd_attach_device函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。