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

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

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

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

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

示例1: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the library USB Configuration Changed event. */void EVENT_USB_Device_ConfigurationChanged(void){	bool ConfigSuccess = true;	/* Configure the device endpoints according to the selected mode */	if (CurrentFirmwareMode == MODE_USART_BRIDGE)	{		ConfigSuccess &= CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface);		/* Configure the UART flush timer - run at Fcpu/1024 for maximum interval before overflow */		TCCR0B = ((1 << CS02) | (1 << CS00));		/* Initialize ring buffers used to hold serial data between USB and software UART interfaces */		RingBuffer_InitBuffer(&USBtoUART_Buffer, USBtoUART_Buffer_Data, sizeof(USBtoUART_Buffer_Data));		RingBuffer_InitBuffer(&UARTtoUSB_Buffer, UARTtoUSB_Buffer_Data, sizeof(UARTtoUSB_Buffer_Data));		/* Start the software USART */		SoftUART_Init();	}	else	{		ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);		if ((AVRISP_DATA_IN_EPADDR & ENDPOINT_EPNUM_MASK) != (AVRISP_DATA_OUT_EPADDR & ENDPOINT_EPNUM_MASK))		  ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);		/* Configure the V2 protocol packet handler */		V2Protocol_Init();	}	LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);}
开发者ID:0xdec,项目名称:tmk_keyboard,代码行数:33,


示例2: RNDIS_Device_ConfigureEndpoints

bool RNDIS_Device_ConfigureEndpoints(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo){	memset(&RNDISInterfaceInfo->State, 0x00, sizeof(RNDISInterfaceInfo->State));	if (!(Endpoint_ConfigureEndpoint(RNDISInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK,							         ENDPOINT_DIR_IN, RNDISInterfaceInfo->Config.DataINEndpointSize,							         ENDPOINT_BANK_SINGLE)))	{		return false;	}	if (!(Endpoint_ConfigureEndpoint(RNDISInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_BULK,	                                 ENDPOINT_DIR_OUT, RNDISInterfaceInfo->Config.DataOUTEndpointSize,	                                 ENDPOINT_BANK_SINGLE)))	{		return false;	}	if (!(Endpoint_ConfigureEndpoint(RNDISInterfaceInfo->Config.NotificationEndpointNumber, EP_TYPE_INTERRUPT,	                                 ENDPOINT_DIR_IN, RNDISInterfaceInfo->Config.NotificationEndpointSize,	                                 ENDPOINT_BANK_SINGLE)))	{		return false;	}	return true;}
开发者ID:geemoo,项目名称:oopslogger,代码行数:27,


示例3: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration *  of the USB device after enumeration, and configures the keyboard and mouse device endpoints. */void EVENT_USB_Device_ConfigurationChanged(void){	/* Indicate USB connected and ready */	LEDs_SetAllLEDs(LEDMASK_USB_READY);	/* Setup Keyboard Report Endpoint */	if (!(Endpoint_ConfigureEndpoint(KEYBOARD_IN_EPNUM, EP_TYPE_INTERRUPT,		                             ENDPOINT_DIR_IN, HID_EPSIZE,	                                 ENDPOINT_BANK_SINGLE)))	{		LEDs_SetAllLEDs(LEDMASK_USB_ERROR);	}		/* Setup Keyboard LED Report Endpoint */	if (!(Endpoint_ConfigureEndpoint(KEYBOARD_OUT_EPNUM, EP_TYPE_INTERRUPT,		                             ENDPOINT_DIR_OUT, HID_EPSIZE,	                                 ENDPOINT_BANK_SINGLE)))	{		LEDs_SetAllLEDs(LEDMASK_USB_ERROR);	}	/* Setup Mouse Report Endpoint */	if (!(Endpoint_ConfigureEndpoint(MOUSE_IN_EPNUM, EP_TYPE_INTERRUPT,		                             ENDPOINT_DIR_IN, HID_EPSIZE,	                                 ENDPOINT_BANK_SINGLE)))	{		LEDs_SetAllLEDs(LEDMASK_USB_ERROR);	}}
开发者ID:emcute0319,项目名称:ir-usb-kbd,代码行数:32,


示例4: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration *  of the USB device after enumeration, and configures the generic HID device endpoints. */void EVENT_USB_Device_ConfigurationChanged(void){	bool ConfigSuccess = true;	/* Setup HID Report Endpoints */	ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,	                                            GENERIC_EPSIZE, ENDPOINT_BANK_SINGLE);	ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT,	                                            GENERIC_EPSIZE, ENDPOINT_BANK_SINGLE);	/* Indicate endpoint configuration success or failure */	//LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);	/*	if (ConfigSuccess){		LED_PORT |= LED_PIN;	}else{		while(1){		LED_PORT |= LED_PIN;		_delay_ms(100);		LED_PORT &= ~LED_PIN;		_delay_ms(100);		}	}	*/}
开发者ID:123jefferson,项目名称:MiniBloq-Sparki,代码行数:28,


示例5: Audio_Device_ConfigureEndpoints

bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* AudioInterfaceInfo){    memset(&AudioInterfaceInfo->State, 0x00, sizeof(AudioInterfaceInfo->State));    if (AudioInterfaceInfo->Config.DataINEndpointNumber)    {        if (!(Endpoint_ConfigureEndpoint(AudioInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_ISOCHRONOUS,                                         ENDPOINT_DIR_IN, AudioInterfaceInfo->Config.DataINEndpointSize,                                         ENDPOINT_BANK_DOUBLE)))        {            return false;        }    }    if (AudioInterfaceInfo->Config.DataOUTEndpointNumber)    {        if (!(Endpoint_ConfigureEndpoint(AudioInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_ISOCHRONOUS,                                         ENDPOINT_DIR_OUT, AudioInterfaceInfo->Config.DataOUTEndpointSize,                                         ENDPOINT_BANK_DOUBLE)))        {            return false;        }    }    return true;}
开发者ID:andrew-taylor,项目名称:bowerbird-avr,代码行数:26,


示例6: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration *  of the USB device after enumeration - the device endpoints are configured and the CDC management task started. */void EVENT_USB_Device_ConfigurationChanged(void){	/* Indicate USB connected and ready */	/* Setup CDC Notification, Rx and Tx Endpoints */	if (!(Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,		                             ENDPOINT_DIR_IN, CDC_NOTIFICATION_EPSIZE,	                                 ENDPOINT_BANK_SINGLE)))	{	}		if (!(Endpoint_ConfigureEndpoint(CDC_TX_EPNUM, EP_TYPE_BULK,		                             ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,	                                 ENDPOINT_BANK_SINGLE)))	{	}		if (!(Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK,		                             ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,	                                 ENDPOINT_BANK_SINGLE)))	{	}		/* Reset line encoding baud rate so that the host knows to send new values */	LineEncoding.BaudRateBPS = 0;}
开发者ID:sankeq,项目名称:ethersex,代码行数:29,


示例7: CDC_Device_ConfigureEndpoints

bool CDC_Device_ConfigureEndpoints(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo){	memset(&CDCInterfaceInfo->State, 0x00, sizeof(CDCInterfaceInfo->State));	if (!(Endpoint_ConfigureEndpoint(CDCInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_BULK,							         ENDPOINT_DIR_IN, CDCInterfaceInfo->Config.DataINEndpointSize,							         CDCInterfaceInfo->Config.DataINEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))	{		return false;	}	if (!(Endpoint_ConfigureEndpoint(CDCInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_BULK,	                                 ENDPOINT_DIR_OUT, CDCInterfaceInfo->Config.DataOUTEndpointSize,	                                 CDCInterfaceInfo->Config.DataOUTEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))	{		return false;	}	if (!(Endpoint_ConfigureEndpoint(CDCInterfaceInfo->Config.NotificationEndpointNumber, EP_TYPE_INTERRUPT,	                                 ENDPOINT_DIR_IN, CDCInterfaceInfo->Config.NotificationEndpointSize,	                                 CDCInterfaceInfo->Config.NotificationEndpointDoubleBank ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))	{		return false;	}	return true;}
开发者ID:emcute0319,项目名称:ir-usb-kbd,代码行数:27,


示例8: EVENT_USB_Device_Configuration_Changed

void EVENT_USB_Device_Configuration_Changed(){	//controlendpoint is configured internally by lufa with default settings	//Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL, ENDPOINT_DIR_IN, ENDPOINT_CONTROLEP_DEFAULT_SIZE, ENDPOINT_BANK_SINGLE);	////todo do i need those endpoints?	Endpoint_ConfigureEndpoint(IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN, IO_EPSIZE, ENDPOINT_BANK_SINGLE);	Endpoint_ConfigureEndpoint(OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT, IO_EPSIZE, ENDPOINT_BANK_SINGLE);}
开发者ID:Codingboy,项目名称:ucuni,代码行数:8,


示例9: EVENT_USB_Device_ConfigurationChanged

void EVENT_USB_Device_ConfigurationChanged(void){ 	/* careful with endpoints: we don't reconfigure when "switching ports"	   so we need the same configuration on all of them */	if (!Endpoint_ConfigureEndpoint(1, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, 8, ENDPOINT_BANK_SINGLE))		panic(GREEN, BOTH);	if (!Endpoint_ConfigureEndpoint(2, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT, 8, ENDPOINT_BANK_SINGLE))		panic(GREEN, BOTH);}
开发者ID:RancidoPS3ita,项目名称:Psgroove_Hermes_V.4_Modded,代码行数:9,


示例10: EVENT_USB_Device_ConfigurationChanged

void EVENT_USB_Device_ConfigurationChanged(void){    bool ConfigSuccess = true;    ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,                                                GENERIC_EPSIZE, ENDPOINT_BANK_SINGLE);    ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT,                                                GENERIC_EPSIZE, ENDPOINT_BANK_SINGLE);}
开发者ID:HexTank,项目名称:KADE,代码行数:9,


示例11: EVENT_USB_Device_ConfigurationChanged

void EVENT_USB_Device_ConfigurationChanged() {	timerSetEnabled(false);	bool ConfigSuccess = true;	ConfigSuccess &= Endpoint_ConfigureEndpoint(VENDOR_IN_EPADDR, EP_TYPE_BULK, VENDOR_IN_EPSIZE, 2);	ConfigSuccess &= Endpoint_ConfigureEndpoint(VENDOR_OUT_EPADDR, EP_TYPE_BULK, VENDOR_OUT_EPSIZE, 2);	led::setState(led::GREEN, ConfigSuccess);}
开发者ID:slomkowski,项目名称:szark,代码行数:10,


示例12: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration *  of the USB device after enumeration, and configures the generic HID device endpoints. */void EVENT_USB_Device_ConfigurationChanged(void){	bool ConfigSuccess = true;	/* Setup HID Report Endpoints */	ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_IN_EPADDR, EP_TYPE_INTERRUPT, GENERIC_EPSIZE, 1);	ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_OUT_EPADDR, EP_TYPE_INTERRUPT, GENERIC_EPSIZE, 1);	/* Indicate endpoint configuration success or failure */}
开发者ID:cbrpnkrd,项目名称:AR-VRtracker,代码行数:13,


示例13: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This configures the device's endpoints ready *  to relay data to and from the attached USB host. */void EVENT_USB_Device_ConfigurationChanged(void){	/* Setup CDC Notification, Rx and Tx Endpoints */	Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT,	                           CDC_NOTIFICATION_EPSIZE, 1);	Endpoint_ConfigureEndpoint(CDC_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);	Endpoint_ConfigureEndpoint(CDC_RX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);}
开发者ID:40000ft,项目名称:lufa,代码行数:13,


示例14: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration *  of the USB device after enumeration - the device endpoints are configured. */void EVENT_USB_Device_ConfigurationChanged(void){	bool ConfigSuccess = true;	/* Setup Vendor Data Endpoints */	ConfigSuccess &= Endpoint_ConfigureEndpoint(VENDOR_IN_EPADDR,  EP_TYPE_BULK, VENDOR_IO_EPSIZE, 1);	ConfigSuccess &= Endpoint_ConfigureEndpoint(VENDOR_OUT_EPADDR, EP_TYPE_BULK, VENDOR_IO_EPSIZE, 1);	/* Indicate endpoint configuration success or failure */	LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);}
开发者ID:40000ft,项目名称:lufa,代码行数:14,


示例15: EVENT_USB_Device_ConfigurationChanged

void EVENT_USB_Device_ConfigurationChanged(void){	bool ConfigSuccess = true;	/* Setup HID Report Endpoints */	ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_IN_EPADDR, EP_TYPE_INTERRUPT, BUFFER_EPSIZE, 1);	ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_OUT_EPADDR, EP_TYPE_INTERRUPT, BUFFER_EPSIZE, 1);	/* Setup Keyboard HID Report Endpoints */	ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_IN_EPADDR, EP_TYPE_INTERRUPT, KEYBOARD_EPSIZE, 1);	ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_OUT_EPADDR, EP_TYPE_INTERRUPT, KEYBOARD_EPSIZE, 1);   }
开发者ID:12019,项目名称:mooltipass,代码行数:12,


示例16: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the library USB Configuration Changed event. */void EVENT_USB_Device_ConfigurationChanged(void){	bool ConfigSuccess = true;	/* Setup CDC Data Endpoints */	ConfigSuccess &= Endpoint_ConfigureEndpoint( CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1 );	ConfigSuccess &= Endpoint_ConfigureEndpoint( CDC_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1 );	ConfigSuccess &= Endpoint_ConfigureEndpoint( CDC_RX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1 );	/* Reset line encoding baud rate so that the host knows to send new values */	LineEncoding.BaudRateBPS = 0;}
开发者ID:zwh-labs,项目名称:wcfw,代码行数:13,


示例17: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration *  of the USB device after enumeration - the device endpoints are configured and the CDC management task started. */void EVENT_USB_Device_ConfigurationChanged(void){	bool ConfigSuccess = true;	/* Setup TMC In, Out and Notification Endpoints */	ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, TMC_IO_EPSIZE, 1);	ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_IN_EPADDR,  EP_TYPE_BULK, TMC_IO_EPSIZE, 1);	ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_OUT_EPADDR, EP_TYPE_BULK, TMC_IO_EPSIZE, 1);	/* Indicate endpoint configuration success or failure */	LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);}
开发者ID:ASHOK1991,项目名称:lb-Arduino-Code,代码行数:15,


示例18: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration *  of the USB device after enumeration, and configures the RNDIS device endpoints and starts the relevant tasks. */void EVENT_USB_Device_ConfigurationChanged(void){	bool ConfigSuccess = true;	/* Setup RNDIS Data Endpoints */	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_RX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1);	/* Indicate endpoint configuration success or failure */	LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);}
开发者ID:DuinoPilot,项目名称:lufa,代码行数:15,


示例19: EVENT_USB_Device_ConfigurationChanged

void EVENT_USB_Device_ConfigurationChanged(void){    bool ConfigSuccess = true;    /* Setup Sideshow Data Endpoints */    ConfigSuccess &= Endpoint_ConfigureEndpoint(SIDESHOW_IN_EPNUM,  EP_TYPE_BULK, ENDPOINT_DIR_IN,                     SIDESHOW_IO_EPSIZE, ENDPOINT_BANK_SINGLE);    ConfigSuccess &= Endpoint_ConfigureEndpoint(SIDESHOW_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,                     SIDESHOW_IO_EPSIZE, ENDPOINT_BANK_SINGLE);    /* Indicate endpoint configuration success or failure */    LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);}
开发者ID:danielilie,项目名称:CANBus-Triple,代码行数:13,


示例20: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration *  of the USB device after enumeration, and configures the generic HID device endpoints. */void EVENT_USB_Device_ConfigurationChanged(void){	bool ConfigSuccess = true;	/* Setup HID Report Endpoints */	ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,	                                            GENERIC_EPSIZE, ENDPOINT_BANK_SINGLE);	ConfigSuccess &= Endpoint_ConfigureEndpoint(GENERIC_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT,	                                            GENERIC_EPSIZE, ENDPOINT_BANK_SINGLE);	/* Indicate endpoint configuration success or failure */	LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);}
开发者ID:Armadill0,项目名称:CANBus-Triple_Genesis-Connect,代码行数:16,


示例21: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration *  of the USB device after enumeration, and configures the keyboard and mouse device endpoints. */void EVENT_USB_Device_ConfigurationChanged(void){	bool ConfigSuccess = true;	/* Setup Keyboard HID Report Endpoints */	ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_IN_EPADDR, EP_TYPE_INTERRUPT, HID_EPSIZE, 1);	ConfigSuccess &= Endpoint_ConfigureEndpoint(KEYBOARD_OUT_EPADDR, EP_TYPE_INTERRUPT, HID_EPSIZE, 1);	/* Setup Mouse HID Report Endpoint */	ConfigSuccess &= Endpoint_ConfigureEndpoint(MOUSE_IN_EPADDR, EP_TYPE_INTERRUPT, HID_EPSIZE, 1);	/* Indicate endpoint configuration success or failure */	LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);}
开发者ID:0xdec,项目名称:tmk_keyboard,代码行数:17,


示例22: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the library USB Configuration Changed event. */void EVENT_USB_Device_ConfigurationChanged(void){	bool ConfigSuccess = true;	/* Setup AVRISP Data OUT endpoint */	ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);	/* Setup AVRISP Data IN endpoint if it is using a physically different endpoint */	if ((AVRISP_DATA_IN_EPADDR & ENDPOINT_EPNUM_MASK) != (AVRISP_DATA_OUT_EPADDR & ENDPOINT_EPNUM_MASK))	  ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);	/* Indicate endpoint configuration success or failure */	LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);}
开发者ID:BrazzoduroArduino,项目名称:Dougs-Arduino-Stuff,代码行数:15,


示例23: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This configures the device's endpoints ready *  to relay data to and from the attached USB host. */void EVENT_USB_Device_ConfigurationChanged(void){	/* Setup CDC Notification, Rx and Tx Endpoints */	Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,		                       ENDPOINT_DIR_IN, CDC_NOTIFICATION_EPSIZE,	                           ENDPOINT_BANK_SINGLE);	Endpoint_ConfigureEndpoint(CDC_TX_EPNUM, EP_TYPE_BULK,		                       ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,	                           ENDPOINT_BANK_SINGLE);	Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK,		                       ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,	                           ENDPOINT_BANK_SINGLE);}
开发者ID:DspaceSPI,项目名称:SPIScan,代码行数:18,


示例24: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration *  of the USB device after enumeration - the device endpoints are configured and the CDC management task started. */void EVENT_USB_Device_ConfigurationChanged(void){	bool ConfigSuccess = true;	/* Setup CDC Data Endpoints */	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1);	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_TX_EPADDR, EP_TYPE_BULK, CDC_TXRX_EPSIZE, 1);	ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_RX_EPADDR, EP_TYPE_BULK,  CDC_TXRX_EPSIZE, 1);	/* Reset line encoding baud rate so that the host knows to send new values */	LineEncoding.BaudRateBPS = 0;	/* Indicate endpoint configuration success or failure */	LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);}
开发者ID:Steffen-Engel,项目名称:lufa,代码行数:18,


示例25: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration *  of the USB device after enumeration, and configures the device endpoints. */void EVENT_USB_Device_ConfigurationChanged(void){		//LEDs_SetAllLEDs(LEDMASK_USB_READY);	if (!(Endpoint_ConfigureEndpoint(IN_EPNUM, EP_TYPE_INTERRUPT, EPSIZE, 1)))	{		//LEDs_SetAllLEDs(LEDMASK_USB_ERROR);	}		if (!(Endpoint_ConfigureEndpoint(OUT_EPNUM, EP_TYPE_INTERRUPT, EPSIZE, 1)))	{		//LEDs_SetAllLEDs(LEDMASK_USB_ERROR);	}		//USB_Device_EnableSOFEvents();}
开发者ID:RalphFox,项目名称:GIMX-firmwares,代码行数:19,


示例26: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the library USB Configuration Changed event. */void EVENT_USB_Device_ConfigurationChanged(void){	bool ConfigSuccess = true;	/* Setup AVRISP Data Endpoint(s) */	ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,	                                            AVRISP_DATA_EPSIZE, ENDPOINT_BANK_SINGLE);	#if defined(LIBUSB_DRIVER_COMPAT)	ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,	                                            AVRISP_DATA_EPSIZE, ENDPOINT_BANK_SINGLE);	#endif	/* Indicate endpoint configuration success or failure */	LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);}
开发者ID:Armadill0,项目名称:CANBus-Triple_Genesis-Connect,代码行数:17,


示例27: Audio_Device_ConfigureEndpoints

bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo){	memset(&AudioInterfaceInfo->State, 0x00, sizeof(AudioInterfaceInfo->State));	for (uint8_t EndpointNum = 1; EndpointNum < ENDPOINT_TOTAL_ENDPOINTS; EndpointNum++)	{		uint16_t Size;		uint8_t  Type;		uint8_t  Direction;		if (EndpointNum == AudioInterfaceInfo->Config.DataINEndpointNumber)		{			Size         = AudioInterfaceInfo->Config.DataINEndpointSize;			Direction    = ENDPOINT_DIR_IN;			Type         = EP_TYPE_ISOCHRONOUS;		}		else if (EndpointNum == AudioInterfaceInfo->Config.DataOUTEndpointNumber)		{			Size         = AudioInterfaceInfo->Config.DataOUTEndpointSize;			Direction    = ENDPOINT_DIR_OUT;			Type         = EP_TYPE_ISOCHRONOUS;		}		else		{			continue;		}		if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size, ENDPOINT_BANK_DOUBLE)))		{			return false;		}	}	return true;}
开发者ID:softants,项目名称:lufa-lib,代码行数:35,


示例28: EVENT_USB_Device_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This configures the device's endpoints ready *  to relay data to and from the attached USB host. */void EVENT_USB_Device_ConfigurationChanged(void){	/* Setup HID Report Endpoint */	Endpoint_ConfigureEndpoint(HID_IN_EPNUM, EP_TYPE_INTERRUPT,		                       ENDPOINT_DIR_IN, HID_IN_EPSIZE,	                           ENDPOINT_BANK_SINGLE);}
开发者ID:AdjacentReality,项目名称:lufa-lib,代码行数:10,


示例29: EVENT_USB_ConfigurationChanged

/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration *  of the USB device after enumeration, and configures the generic HID device endpoints. */void EVENT_USB_ConfigurationChanged(void){  /* Setup USB In and Out Endpoints */  Endpoint_ConfigureEndpoint(OUT_EPNUM, EP_TYPE_BULK,                             ENDPOINT_DIR_OUT, OUT_EPSIZE,                             ENDPOINT_BANK_SINGLE);  Endpoint_ConfigureEndpoint(IN_EPNUM, EP_TYPE_BULK,                             ENDPOINT_DIR_IN, IN_EPSIZE,                             ENDPOINT_BANK_SINGLE);  /* Indicate USB connected and ready */  UpdateStatus(Status_USBReady);  /* Start ProcessPacket task */  Scheduler_SetTaskMode(USB_ProcessPacket, TASK_RUN);}
开发者ID:florisvb,项目名称:Flyatar,代码行数:20,


示例30: USB_Init_Device

static void USB_Init_Device(void){	USB_DeviceState                 = DEVICE_STATE_Unattached;	USB_Device_ConfigurationNumber  = 0;	#if !defined(NO_DEVICE_REMOTE_WAKEUP)	USB_Device_RemoteWakeupEnabled  = false;	#endif	#if !defined(NO_DEVICE_SELF_POWER)	USB_Device_CurrentlySelfPowered = false;	#endif	#if !defined(FIXED_CONTROL_ENDPOINT_SIZE)	USB_Descriptor_Device_t* DeviceDescriptorPtr;		#if defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && /	    !(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))	uint8_t DescriptorAddressSpace;	if (CALLBACK_USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DeviceDescriptorPtr, &DescriptorAddressSpace) != NO_DESCRIPTOR)	{		if (DescriptorAddressSpace == MEMSPACE_FLASH)		  USB_Device_ControlEndpointSize = pgm_read_byte(&DeviceDescriptorPtr->Endpoint0Size);		else if (DescriptorAddressSpace == MEMSPACE_EEPROM)		  USB_Device_ControlEndpointSize = eeprom_read_byte(&DeviceDescriptorPtr->Endpoint0Size);		else		  USB_Device_ControlEndpointSize = DeviceDescriptorPtr->Endpoint0Size;	}	#else	if (CALLBACK_USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DeviceDescriptorPtr) != NO_DESCRIPTOR)	{		#if defined(USE_RAM_DESCRIPTORS)		USB_Device_ControlEndpointSize = DeviceDescriptorPtr->Endpoint0Size;		#elif defined(USE_EEPROM_DESCRIPTORS)		USB_Device_ControlEndpointSize = eeprom_read_byte(&DeviceDescriptorPtr->Endpoint0Size);		#else		USB_Device_ControlEndpointSize = pgm_read_byte(&DeviceDescriptorPtr->Endpoint0Size);		#endif	}		#endif	#endif	if (USB_Options & USB_DEVICE_OPT_LOWSPEED)	  USB_Device_SetLowSpeed();	else	  USB_Device_SetFullSpeed();	Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,							   ENDPOINT_DIR_OUT, USB_Device_ControlEndpointSize,							   ENDPOINT_BANK_SINGLE);	USB_INT_Enable(USB_INT_BUSEVENTI);	USB_Attach();}
开发者ID:Armadill0,项目名称:CANBus-Triple_Genesis-Connect,代码行数:56,



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


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