コード例 #1
0
ファイル: fast-usbserial.c プロジェクト: urjaman/frser-spi-u2
static void usb_process(void) {
	Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
	do {
		if (Endpoint_IsSETUPReceived())
		  USB_Device_ProcessControlRequest();
	} while (USB_DeviceState != DEVICE_STATE_Configured);
}
コード例 #2
0
ファイル: USB.c プロジェクト: NicoHood/SecureLoader
ISR(USB_COM_vect, ISR_BLOCK)
{
	USB_Device_ProcessControlRequest();

	#if !defined(CONTROL_ONLY_DEVICE)
		#error Previous selected endpoints will not be restored.
		#error Add this feature or only use this if you know what you are doing.
		#error Remove this error to accept.
	#endif
	#error EVENT_USB_Device_ControlRequest() needs to be inlined.
	#warning Interrupt control Endpoint uses ~150-200 more bytes of flash
}
コード例 #3
0
ファイル: USBTask.c プロジェクト: MariusRumpf/a-culfw
static void USB_DeviceTask(void)
{
	if (USB_DeviceState != DEVICE_STATE_Unattached)
	{
		uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint();
	
		Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);

		if (Endpoint_IsSETUPReceived())
		  USB_Device_ProcessControlRequest();
		
		Endpoint_SelectEndpoint(PrevEndpoint);
	}
}
コード例 #4
0
ISR(USB_COM_vect, ISR_BLOCK)
{
	uint8_t PrevSelectedEndpoint = Endpoint_GetCurrentEndpoint();

	Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
	USB_INT_Disable(USB_INT_RXSTPI);

	GlobalInterruptEnable();

	USB_Device_ProcessControlRequest();

	Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
	USB_INT_Enable(USB_INT_RXSTPI);
	Endpoint_SelectEndpoint(PrevSelectedEndpoint);
}
コード例 #5
0
ファイル: USBInterrupt.c プロジェクト: Andrew0Hill/keyboard
ISR(USB_COM_vect, ISR_BLOCK)
{
	uint8_t PrevSelectedEndpoint = Endpoint_GetCurrentEndpoint(); 

	Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
	USB_INT_Disable(USB_INT_RXSTPI);

	NONATOMIC_BLOCK(NONATOMIC_FORCEOFF)
	{
		USB_Device_ProcessControlRequest();
	}

	Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
	USB_INT_Enable(USB_INT_RXSTPI);
	Endpoint_SelectEndpoint(PrevSelectedEndpoint);
}