-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
bugSomething isn't workingSomething isn't workinginternal bug trackerIssue confirmed and reported into a ticket in the internal bug tracking system.Issue confirmed and reported into a ticket in the internal bug tracking system.mwMiddleware-related issue or pull-request.Middleware-related issue or pull-request.usbUSB-related (host or device) issue or pull-requestUSB-related (host or device) issue or pull-request
Description
I'm getting a Hard Fault on USB disconnect on USB MSC at USBH_MSC_UnitIsReady at line 741
I think this should be something like
* @brief USBH_MSC_UnitIsReady
* The function check whether a LUN is ready
* @param phost: Host handle
* @param lun: logical Unit Number
* @retval Lun status (0: not ready / 1: ready)
*/
uint8_t USBH_MSC_UnitIsReady(USBH_HandleTypeDef *phost, uint8_t lun)
{
if(phost && phost->pActiveClass) { // Check for pActiveClass not NULL
MSC_HandleTypeDef *MSC_Handle = (MSC_HandleTypeDef *) phost->pActiveClass->pData;
uint8_t res;
/* Store the current lun */
MSC_Handle->current_lun = lun;
if ((phost->gState == HOST_CLASS) && (MSC_Handle->unit[lun].error == MSC_OK))
{
res = 1U;
}
else
{
res = 0U;
}
} else {
res = 0U;
}
return res;
}```
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinginternal bug trackerIssue confirmed and reported into a ticket in the internal bug tracking system.Issue confirmed and reported into a ticket in the internal bug tracking system.mwMiddleware-related issue or pull-request.Middleware-related issue or pull-request.usbUSB-related (host or device) issue or pull-requestUSB-related (host or device) issue or pull-request
Type
Projects
Status
Analyzed