File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33mmce.c -- MMCE support
44
5- Copyright (C) 2022 - 2025 Extrems' Corner.org
5+ Copyright (C) 2022 - 2026 Extrems' Corner.org
66
77This software is provided 'as-is', without any express or implied
88warranty. In no event will the authors be held liable for any
@@ -565,14 +565,17 @@ static bool __mmce_startup(DISC_INTERFACE *disc)
565565 __UnmaskIrq (IM_PI_DEBUG );
566566 }
567567
568- MMCE_SetAccessMode (chan , MMCE_MODE_READWRITE );
568+ if (MMCE_SetAccessMode (chan , MMCE_MODE_READWRITE ) == MMCE_RESULT_NOCARD )
569+ return __mmce_startup (disc );
569570
570- if (MMCE_GetAccessMode (chan , & mode ) == MMCE_RESULT_READY && mode == MMCE_MODE_READWRITE )
571- disc -> features |= FEATURE_MEDIUM_CANWRITE ;
572- else
573- disc -> features &= ~FEATURE_MEDIUM_CANWRITE ;
571+ if (MMCE_GetAccessMode (chan , & mode ) == MMCE_RESULT_READY ) {
572+ if (mode == MMCE_MODE_READWRITE )
573+ disc -> features |= FEATURE_MEDIUM_CANWRITE ;
574+ else
575+ disc -> features &= ~FEATURE_MEDIUM_CANWRITE ;
576+ }
574577
575- return true ;
578+ return __MMCE [ chan ]. attached ;
576579}
577580
578581static bool __mmce_isInserted (DISC_INTERFACE * disc )
You can’t perform that action at this time.
0 commit comments