diff --git a/doc/help_mla_fileio.jar b/doc/help_mla_fileio.jar index dd154b6..762902e 100644 Binary files a/doc/help_mla_fileio.jar and b/doc/help_mla_fileio.jar differ diff --git a/doc/help_mla_fileio.pdf b/doc/help_mla_fileio.pdf index 39e2591..15b0d29 100644 Binary files a/doc/help_mla_fileio.pdf and b/doc/help_mla_fileio.pdf differ diff --git a/drivers/internal_flash/internal_flash.c b/drivers/internal_flash/internal_flash.c index eb7c779..741a315 100644 --- a/drivers/internal_flash/internal_flash.c +++ b/drivers/internal_flash/internal_flash.c @@ -22,7 +22,7 @@ please contact mla_licensing@microchip.com #include "string.h" #include #include -#include +#include #include #include diff --git a/drivers/sd_spi/sd_spi.c b/drivers/sd_spi/sd_spi.c index 2786c1f..94ac545 100644 --- a/drivers/sd_spi/sd_spi.c +++ b/drivers/sd_spi/sd_spi.c @@ -24,9 +24,9 @@ please contact mla_licensing@microchip.com #include "fileio.h" #include "../src/fileio_private.h" #include "system.h" -#include "driver/fileio/sd_spi.h" -#include "driver/fileio/src/sd_spi_private.h" -#include "driver/spi/drv_spi.h" +#include "sd_spi.h" +#include "sd_spi_private.h" + #include #include #include @@ -129,7 +129,7 @@ static inline __attribute__((always_inline)) unsigned char SPICalculateBRG(unsig bool FILEIO_SD_MediaDetect (FILEIO_SD_DRIVE_CONFIG * config) { - #ifndef MEDIA_SOFT_DETECT + #ifndef FILEIO_SD_CONFIG_MEDIA_SOFT_DETECT return (*config->cdFunc)(); #else FILEIO_SD_RESPONSE response; @@ -162,7 +162,7 @@ bool FILEIO_SD_MediaDetect (FILEIO_SD_DRIVE_CONFIG * config) //minimizing risk of SPI clock pulse master/slave synchronization problems, //due to possible application noise on the SCK line. (*config->csFunc)(1); //De-select card - FILEIO_SD_SendCmdSlow(config, 0xFF, 0); //Send some "extraneous" clock pulses. If a previous + FILEIO_SD_SPI_Put_Slow(config->index, 0xFF); //Send some "extraneous" clock pulses. If a previous //command was terminated before it completed normally, //the card might not have received the required clocking //following the transfer. diff --git a/drivers/sd_spi/sd_spi_config_template.h b/drivers/sd_spi/sd_spi_config_template.h index 2de2edf..189574f 100644 --- a/drivers/sd_spi/sd_spi_config_template.h +++ b/drivers/sd_spi/sd_spi_config_template.h @@ -57,4 +57,9 @@ please contact mla_licensing@microchip.com #define FILEIO_SD_SPI_Get_Slow DRV_SPI_Get #endif +// Define FILEIO_SD_CONFIG_MEDIA_SOFT_DETECT to enable soft detect of an SD card. +// Some connectors do not have a card detect pin and must use software to detect +// the presence of a card. +#define FILEIO_SD_CONFIG_MEDIA_SOFT_DETECT +