Skip to content

Commit d4c3b58

Browse files
committed
Forcibly ignore USB write-protect status
1 parent fab54f9 commit d4c3b58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/usb/usbh_msc_fatfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static bool_t usbh_msc_connected(void)
188188

189189
static bool_t usbh_msc_readonly(void)
190190
{
191-
return usbh_msc_connected() && USBH_MSC_Param.MSWriteProtect;
191+
return FALSE;//usbh_msc_connected() && USBH_MSC_Param.MSWriteProtect;
192192
}
193193

194194
/*
@@ -201,7 +201,7 @@ static DSTATUS usb_disk_initialize(BYTE pdrv)
201201
return RES_PARERR;
202202

203203
dstatus = (!usbh_msc_connected() ? STA_NOINIT
204-
: USBH_MSC_Param.MSWriteProtect ? STA_PROTECT
204+
// : USBH_MSC_Param.MSWriteProtect ? STA_PROTECT
205205
: 0);
206206

207207
return dstatus;

0 commit comments

Comments
 (0)