mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-10-30 21:02:32 +01:00 
			
		
		
		
	Fixed broken MIDI host driver MIDI_Host_ReceiveEventPacket() function due to not unfreezing the MIDI data IN pipe before use (thanks to Michael Brown).
This commit is contained in:
		
							parent
							
								
									590d9b5ff8
								
							
						
					
					
						commit
						1007317c5f
					
				| @ -56,6 +56,7 @@ | |||||||
|   *   - Fixed inverted LED logic in the USB2AX board LED driver |   *   - Fixed inverted LED logic in the USB2AX board LED driver | ||||||
|   *   - Fixed possible deadlock in the CDC device driver if the USB connection is dropped while the CDC_REQ_SetLineEncoding control request is being processed by |   *   - Fixed possible deadlock in the CDC device driver if the USB connection is dropped while the CDC_REQ_SetLineEncoding control request is being processed by | ||||||
|   *     the stack (thanks to Jonathan Hudgins) |   *     the stack (thanks to Jonathan Hudgins) | ||||||
|  |   *   - Fixed broken MIDI host driver MIDI_Host_ReceiveEventPacket() function due to not unfreezing the MIDI data IN pipe before use (thanks to Michael Brown) | ||||||
|   *  - Library Applications: |   *  - Library Applications: | ||||||
|   *   - Fixed error in the AVRISP-MKII programmer when ISP mode is used at 64KHz (thanks to Ben R. Porter) |   *   - Fixed error in the AVRISP-MKII programmer when ISP mode is used at 64KHz (thanks to Ben R. Porter) | ||||||
|   *   - Fixed AVRISP-MKII programmer project failing to compile for the U4 chips when VTARGET_ADC_CHANNEL is defined to an invalid channel and NO_VTARGET_DETECT is |   *   - Fixed AVRISP-MKII programmer project failing to compile for the U4 chips when VTARGET_ADC_CHANNEL is defined to an invalid channel and NO_VTARGET_DETECT is | ||||||
|  | |||||||
| @ -193,17 +193,26 @@ bool MIDI_Host_ReceiveEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterface | |||||||
| 	if ((USB_HostState != HOST_STATE_Configured) || !(MIDIInterfaceInfo->State.IsActive)) | 	if ((USB_HostState != HOST_STATE_Configured) || !(MIDIInterfaceInfo->State.IsActive)) | ||||||
| 	  return HOST_SENDCONTROL_DeviceDisconnected; | 	  return HOST_SENDCONTROL_DeviceDisconnected; | ||||||
| 	   | 	   | ||||||
|  | 	bool DataReady = false; | ||||||
|  | 
 | ||||||
| 	Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataINPipe.Address); | 	Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataINPipe.Address); | ||||||
|  | 	Pipe_Unfreeze(); | ||||||
| 
 | 
 | ||||||
| 	if (!(Pipe_IsReadWriteAllowed())) | 	if (Pipe_IsINReceived()) | ||||||
| 	  return false; | 	{ | ||||||
| 
 | 		if (Pipe_BytesInPipe()) | ||||||
|  | 		{ | ||||||
| 			Pipe_Read_Stream_LE(Event, sizeof(MIDI_EventPacket_t), NULL); | 			Pipe_Read_Stream_LE(Event, sizeof(MIDI_EventPacket_t), NULL); | ||||||
|  | 			DataReady = true; | ||||||
|  | 		} | ||||||
| 
 | 
 | ||||||
| 	if (!(Pipe_IsReadWriteAllowed())) | 		if (!(Pipe_BytesInPipe())) | ||||||
| 		  Pipe_ClearIN(); | 		  Pipe_ClearIN(); | ||||||
|  | 	} | ||||||
| 	 | 	 | ||||||
| 	return true; | 	Pipe_Freeze(); | ||||||
|  | 	 | ||||||
|  | 	return DataReady; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #endif | #endif | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Dean Camera
						Dean Camera