/* load the last error code in the error list  */
void scsi_sense_code(usb_core_driver *udev, uint8_t lun, uint8_t skey, uint8_t asc)
/* load the last error code in the error list  */
void scsi_sense_code(usb_core_driver *udev, uint8_t lun, uint8_t skey, uint8_t asc)
{
    usbd_msc_handler *msc = (usbd_msc_handler *)udev->dev.class_data[USBD_MSC_INTERFACE];
    msc->scsi_sense[msc->scsi_sense_tail].SenseKey = skey;
    msc->scsi_sense[msc->scsi_sense_tail].ASC = asc;
    msc->scsi_sense_tail++;
    if (SENSE_LIST_DEEPTH == msc->scsi_sense_tail) {
        msc->scsi_sense_tail = 0U;
    }
}