|
|
@ -150,9 +150,17 @@ void CardReader::initsd()
|
|
|
|
if(root.isOpen())
|
|
|
|
if(root.isOpen())
|
|
|
|
root.close();
|
|
|
|
root.close();
|
|
|
|
#ifdef SDSLOW
|
|
|
|
#ifdef SDSLOW
|
|
|
|
if (!card.init(SPI_HALF_SPEED,SDSS))
|
|
|
|
if (!card.init(SPI_HALF_SPEED,SDSS)
|
|
|
|
|
|
|
|
#if defined(LCD_SDSS) && (LCD_SDSS != SDSS)
|
|
|
|
|
|
|
|
&& !card.init(SPI_HALF_SPEED,LCD_SDSS)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
)
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
if (!card.init(SPI_FULL_SPEED,SDSS))
|
|
|
|
if (!card.init(SPI_FULL_SPEED,SDSS)
|
|
|
|
|
|
|
|
#if defined(LCD_SDSS) && (LCD_SDSS != SDSS)
|
|
|
|
|
|
|
|
&& !card.init(SPI_FULL_SPEED,LCD_SDSS)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//if (!card.init(SPI_HALF_SPEED,SDSS))
|
|
|
|
//if (!card.init(SPI_HALF_SPEED,SDSS))
|
|
|
|