mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
liblitesdcard/spisdcard: streamline initialization (cosmetic).
This commit is contained in:
parent
7d5ca3f926
commit
c05d0f1966
1 changed files with 2 additions and 7 deletions
|
@ -276,14 +276,9 @@ DSTATUS disk_status(uint8_t drv) {
|
|||
}
|
||||
|
||||
DSTATUS disk_initialize(uint8_t drv) {
|
||||
uint8_t r;
|
||||
|
||||
if (drv) return RES_NOTRDY;
|
||||
|
||||
r = spisdcard_init();
|
||||
if (drv) return STA_NOINIT;
|
||||
spisdcardstatus = spisdcard_init() ? 0 : STA_NOINIT;
|
||||
spisdcard_deselect();
|
||||
|
||||
spisdcardstatus = r ? 0 : STA_NOINIT;
|
||||
return spisdcardstatus;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue