/* get max lun of the mass storage device  */
static usbh_status usbh_msc_maxlun_get(usbh_host *uhost, uint8_t *maxlun)
/* get max lun of the mass storage device  */
static usbh_status usbh_msc_maxlun_get(usbh_host *uhost, uint8_t *maxlun)
{
    usbh_status status = USBH_BUSY;
    if (uhost->control.ctl_state == CTL_IDLE) {
        uhost->control.setup.req = (usb_req) {
            .bmRequestType = USB_TRX_IN | USB_REQTYPE_CLASS | USB_RECPTYPE_ITF,
            .bRequest      = BBB_GET_MAX_LUN,
            .wValue        = 0U,
            .wIndex        = 0U,
            .wLength       = 1U
        };
        usbh_ctlstate_config (uhost, maxlun, 1U);
    }
    status = usbh_ctl_handler (uhost);
    return status;
}