Skip to content

Commit

Permalink
merging in v1.02 release.
Browse files Browse the repository at this point in the history
* Fixed issue with soft detect for SD card connectors that don't have card detect pin
* Relocated driver files from "<mla installation folder>/framework/drivers/fileio" to "<mla installation folder>/framework/fileio/drivers".  Fixed issues with that relocation.
  • Loading branch information
davidflowers committed Aug 11, 2015
1 parent 77d701e commit ec02cd6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
Binary file modified doc/help_mla_fileio.jar
Binary file not shown.
Binary file modified doc/help_mla_fileio.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion drivers/internal_flash/internal_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ please contact [email protected]
#include "string.h"
#include <fileio_config.h>
#include <fileio.h>
#include <driver/fileio/internal_flash.h>
#include <internal_flash.h>

#include <stdint.h>
#include <stdbool.h>
Expand Down
10 changes: 5 additions & 5 deletions drivers/sd_spi/sd_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ please contact [email protected]
#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 <string.h>
#include <stdint.h>
#include <stdbool.h>
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions drivers/sd_spi/sd_spi_config_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,9 @@ please contact [email protected]
#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


0 comments on commit ec02cd6

Please sign in to comment.