Update hcd-ehci, dcd-dwc2 and examples.
1. Add some example Msh commands. 2. Fix device enumeration on EXT hub. 3. Re-file some templates. 4. Extend end-point number of dwc2 device driver. 5. Re-file rndis_host implementation includes a. rt_mutex_take in ISR b. 2rd pmsg is unaligned issue. c. destroy u0 ethernet resource after removing dongle.
This commit is contained in:
@@ -132,19 +132,19 @@ BLOCK_TYPE mass_block[BLOCK_COUNT];
|
||||
|
||||
void usbd_msc_get_cap(uint8_t lun, uint32_t *block_num, uint16_t *block_size)
|
||||
{
|
||||
*block_num = 1000; //Pretend having so many buffer,not has actually.
|
||||
*block_num = BLOCK_COUNT; //Pretend having so many buffer,not has actually.
|
||||
*block_size = BLOCK_SIZE;
|
||||
}
|
||||
int usbd_msc_sector_read(uint32_t sector, uint8_t *buffer, uint32_t length)
|
||||
{
|
||||
if (sector < 10)
|
||||
if (sector < BLOCK_COUNT)
|
||||
memcpy(buffer, mass_block[sector].BlockSpace, length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usbd_msc_sector_write(uint32_t sector, uint8_t *buffer, uint32_t length)
|
||||
{
|
||||
if (sector < 10)
|
||||
if (sector < BLOCK_COUNT)
|
||||
memcpy(mass_block[sector].BlockSpace, buffer, length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user