Skip to content

Commit

Permalink
Forcibly ignore USB write-protect status
Browse files Browse the repository at this point in the history
  • Loading branch information
keirf committed Nov 16, 2024
1 parent fab54f9 commit d4c3b58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/usb/usbh_msc_fatfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static bool_t usbh_msc_connected(void)

static bool_t usbh_msc_readonly(void)
{
return usbh_msc_connected() && USBH_MSC_Param.MSWriteProtect;
return FALSE;//usbh_msc_connected() && USBH_MSC_Param.MSWriteProtect;
}

/*
Expand All @@ -201,7 +201,7 @@ static DSTATUS usb_disk_initialize(BYTE pdrv)
return RES_PARERR;

dstatus = (!usbh_msc_connected() ? STA_NOINIT
: USBH_MSC_Param.MSWriteProtect ? STA_PROTECT
// : USBH_MSC_Param.MSWriteProtect ? STA_PROTECT
: 0);

return dstatus;
Expand Down

0 comments on commit d4c3b58

Please sign in to comment.