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

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

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

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

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

示例1: main_test11

//! /brief Test 11 - Wrong value in first setup request get configuration 0static void main_test11(void){	uint8_t nb_fail;	main_otg_init();	udd_attach_device();	nb_fail = 4;	while (nb_fail--) {		main_usb_enum_step1();		main_usb_enum_step2();		main_usb_enum_step3();		main_usb_enum_step4();		main_usb_enum_step5();		main_usb_enum_step6();		main_usb_enum_step7();		main_usb_enum_step8();		main_usb_enum_step9();		main_usb_enum_step10();		main_usb_enum_step11();		// Get configuration descriptor		main_usb_wait_setup_packet();		main_conf_desc.conf.bDescriptorType = 0xFF;		main_conf_desc.conf.bMaxPower       = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER);		main_conf_desc.conf.bmAttributes         = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,		main_usb_send_in((uint8_t*)&main_conf_desc, sizeof(usb_conf_desc_t));		main_usb_wait_out(NULL,0);	}	main_usb_wait_suspend();	main_detach();}
开发者ID:ThucVD2704,项目名称:femto-usb-blink-example,代码行数:32,


示例2: 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,


示例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_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,


示例5: main_test9

//! /brief Test 9  - Detach after reset after first setup request get descriptorstatic void main_test9(void){	main_otg_init();	udd_attach_device();	main_usb_enum_step1();	main_usb_enum_step2();	main_usb_enum_step3();	main_usb_enum_step4();	main_usb_enum_step5();	main_usb_enum_step6();	main_usb_enum_step7();	main_usb_wait_sof();	main_detach();}
开发者ID:ThucVD2704,项目名称:femto-usb-blink-example,代码行数:15,


示例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);	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,


示例7: 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,



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


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