Merge pull request #383 from kasjer/kasjer/fox-busy-flag-race-condition
Fix endpoint busy flag race condition
This commit is contained in:
		| @@ -995,8 +995,8 @@ bool usbd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t | |||||||
|  |  | ||||||
|   TU_LOG2("  Queue EP %02X with %u bytes ... ", ep_addr, total_bytes); |   TU_LOG2("  Queue EP %02X with %u bytes ... ", ep_addr, total_bytes); | ||||||
|  |  | ||||||
|   TU_VERIFY( dcd_edpt_xfer(rhport, ep_addr, buffer, total_bytes) ); |  | ||||||
|   _usbd_dev.ep_status[epnum][dir].busy = true; |   _usbd_dev.ep_status[epnum][dir].busy = true; | ||||||
|  |   TU_VERIFY_HDLR( dcd_edpt_xfer(rhport, ep_addr, buffer, total_bytes), _usbd_dev.ep_status[epnum][dir].busy = false); | ||||||
|  |  | ||||||
|   TU_LOG2("OK\r\n"); |   TU_LOG2("OK\r\n"); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Ha Thach
					Ha Thach