Skip to content

Commit

Permalink
eMMC: Fix build error
Browse files Browse the repository at this point in the history
Removed functions not yet implemented in the SDK.
  • Loading branch information
SPRESENSE committed Nov 11, 2022
1 parent f478f13 commit 1ee2431
Showing 1 changed file with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,25 @@

#define EMMC_MOUNT_POINT "/mnt/emmc/"

#define EMMC_POWER_PIN_UNKNOWN 0xff

//#define DEBUG
#ifdef DEBUG
# define DebugPrintf(fmt, ...) printf(fmt, ## __VA_ARGS__)
#else
# define DebugPrintf(fmt, ...) ((void)0)
#endif

eMMCClass::eMMCClass() : StorageClass(EMMC_MOUNT_POINT), mshandle(NULL)
eMMCClass::eMMCClass() : StorageClass(EMMC_MOUNT_POINT), mshandle(NULL), power_pin(EMMC_POWER_PIN_UNKNOWN)
{
power_pin = 0xff;
}

boolean eMMCClass::begin(uint8_t pin)
{
power_pin = pin;

pinMode(power_pin, OUTPUT);
digitalWrite(power_pin, HIGH);
pinMode(power_pin, OUTPUT);
digitalWrite(power_pin, HIGH);

/* device bootup time */
delay(5);
Expand All @@ -87,15 +88,9 @@ boolean eMMCClass::begin()
boolean eMMCClass::end()
{
/* Finalize and unmount the eMMC device */
int ret = board_emmc_finalize();
if (ret != 0)
{
return false;
}

if(power_pin != 0xff)
if(power_pin != EMMC_POWER_PIN_UNKNOWN)
{
digitalWrite(power_pin, LOW);
digitalWrite(power_pin, LOW);
power_pin = 0xff;
}

Expand Down

0 comments on commit 1ee2431

Please sign in to comment.