the file drv_usbh.c needs some fixes

Created at 2024-02-22 05:13:21

Inside drv_usbh.c
the LOG_D() macro must be introduced in several statemnet
THi is however a clerical error.
'
The following statemnet should be a bug.

_ ...

    else if (HAL_HCD_HC_GetState(&stm32_hhcd_fs, pipe->pipe_index) == URB_ERROR)
    {
        LOG_D("error\n");
        pipe->status = UPIPE_STATUS_ERROR;
        if (pipe->callback != RT_NULL)
        {
            pipe->callback(pipe);
        }
        return -1;
    }_

The statemnet will never be reached. Maybe the
HAL_HCD_HC_GetState function
should be replaced, perhaps, by
HAL_HCD_HC_GetURBState function

Will it be possible to replace the HAL library with the most recent libraries for the STM32F4 ?

更多

Follower
0
Views
306
0 Answer
There is no answer, come and add the answer

Write Your Answer

Log in to publish your answer,Click here to log in.

Create
Post

Share