update tinyusb to latest for scsi write10 complete fix
This commit is contained in:
		
							
								
								
									
										1
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							| @@ -1,7 +1,6 @@ | |||||||
| [submodule "tinyusb"] | [submodule "tinyusb"] | ||||||
| 	path = lib/tinyusb | 	path = lib/tinyusb | ||||||
| 	url = https://github.com/hathach/tinyusb.git | 	url = https://github.com/hathach/tinyusb.git | ||||||
| 	branch = develop |  | ||||||
| [submodule "lib/nrfx"] | [submodule "lib/nrfx"] | ||||||
| 	path = lib/nrfx | 	path = lib/nrfx | ||||||
| 	url = https://github.com/NordicSemiconductor/nrfx.git | 	url = https://github.com/NordicSemiconductor/nrfx.git | ||||||
|   | |||||||
| @@ -130,9 +130,9 @@ static void wait_for_events(void) | |||||||
| #ifdef NRF52840_XXAA | #ifdef NRF52840_XXAA | ||||||
|     // skip if usb is not inited ( e.g OTA / finializing sd/bootloader ) |     // skip if usb is not inited ( e.g OTA / finializing sd/bootloader ) | ||||||
|     extern bool usb_inited(void); |     extern bool usb_inited(void); | ||||||
|     if ( usb_inited() ) |     if ( tusb_inited() ) | ||||||
|     { |     { | ||||||
|       tusb_task(); |       tud_task(); | ||||||
|       tud_cdc_write_flush(); |       tud_cdc_write_flush(); | ||||||
|     } |     } | ||||||
| #endif | #endif | ||||||
|   | |||||||
 Submodule lib/tinyusb updated: a1c596490a...55874813f8
									
								
							| @@ -63,22 +63,9 @@ extern uint16_t           usb_desc_str_serial[1+16]; | |||||||
|  * We must call it within SD's SOC event handler, or set it as power event handler if SD is not enabled. */ |  * We must call it within SD's SOC event handler, or set it as power event handler if SD is not enabled. */ | ||||||
| extern void tusb_hal_nrf_power_event(uint32_t event); | extern void tusb_hal_nrf_power_event(uint32_t event); | ||||||
|  |  | ||||||
|  |  | ||||||
| //------------- IMPLEMENTATION -------------// | //------------- IMPLEMENTATION -------------// | ||||||
| static bool _inited = false; |  | ||||||
|  |  | ||||||
| bool usb_inited(void) |  | ||||||
| { |  | ||||||
|   return _inited; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| void usb_init(bool cdc_only) | void usb_init(bool cdc_only) | ||||||
| { | { | ||||||
|   // skipped if already inited |  | ||||||
|   if ( _inited ) return; |  | ||||||
|  |  | ||||||
|   _inited = true; |  | ||||||
|  |  | ||||||
|   NVIC_SetPriority(USBD_IRQn, 2); |   NVIC_SetPriority(USBD_IRQn, 2); | ||||||
|  |  | ||||||
|   // USB power may already be ready at this time -> no event generated |   // USB power may already be ready at this time -> no event generated | ||||||
|   | |||||||
| @@ -73,6 +73,8 @@ enum { | |||||||
| #define EP_MSC_OUT         _EP_OUT( ITF_NUM_MSC+1 ) | #define EP_MSC_OUT         _EP_OUT( ITF_NUM_MSC+1 ) | ||||||
| #define EP_MSC_IN          _EP_IN ( ITF_NUM_MSC+1 ) | #define EP_MSC_IN          _EP_IN ( ITF_NUM_MSC+1 ) | ||||||
|  |  | ||||||
|  | #define EP_MSC_SIZE        64 | ||||||
|  |  | ||||||
| //--------------------------------------------------------------------+ | //--------------------------------------------------------------------+ | ||||||
| // STRING DESCRIPTORS | // STRING DESCRIPTORS | ||||||
| //--------------------------------------------------------------------+ | //--------------------------------------------------------------------+ | ||||||
| @@ -280,7 +282,7 @@ usb_desc_cfg_t usb_desc_cfg = | |||||||
|           .bDescriptorType  = TUSB_DESC_ENDPOINT, |           .bDescriptorType  = TUSB_DESC_ENDPOINT, | ||||||
|           .bEndpointAddress = EP_MSC_OUT, |           .bEndpointAddress = EP_MSC_OUT, | ||||||
|           .bmAttributes     = { .xfer = TUSB_XFER_BULK }, |           .bmAttributes     = { .xfer = TUSB_XFER_BULK }, | ||||||
|           .wMaxPacketSize   = { .size = CFG_TUD_MSC_EPSIZE}, |           .wMaxPacketSize   = { .size = EP_MSC_SIZE}, | ||||||
|           .bInterval        = 1 |           .bInterval        = 1 | ||||||
|       }, |       }, | ||||||
|  |  | ||||||
| @@ -290,7 +292,7 @@ usb_desc_cfg_t usb_desc_cfg = | |||||||
|           .bDescriptorType  = TUSB_DESC_ENDPOINT, |           .bDescriptorType  = TUSB_DESC_ENDPOINT, | ||||||
|           .bEndpointAddress = EP_MSC_IN, |           .bEndpointAddress = EP_MSC_IN, | ||||||
|           .bmAttributes     = { .xfer = TUSB_XFER_BULK }, |           .bmAttributes     = { .xfer = TUSB_XFER_BULK }, | ||||||
|           .wMaxPacketSize   = { .size = CFG_TUD_MSC_EPSIZE}, |           .wMaxPacketSize   = { .size = EP_MSC_SIZE }, | ||||||
|           .bInterval        = 1 |           .bInterval        = 1 | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user