Skip to content

Commit

Permalink
#63 -Mocked sdmmmc_host
Browse files Browse the repository at this point in the history
  • Loading branch information
PerMalmberg committed Aug 31, 2019
1 parent c733195 commit 0dc1b3d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,22 @@ set(SMOOTH_SOURCES
${CMAKE_CURRENT_LIST_DIR}/smooth/core/io/InterruptInput.cpp
${CMAKE_CURRENT_LIST_DIR}/smooth/core/io/Input.cpp
${CMAKE_CURRENT_LIST_DIR}/smooth/include/smooth/core/io/Input.h
${CMAKE_CURRENT_LIST_DIR}/smooth/include/smooth/core/io/Output.h
${CMAKE_CURRENT_LIST_DIR}/smooth/include/smooth/core/io/Input.h
${CMAKE_CURRENT_LIST_DIR}/smooth/core/io/Output.cpp
${CMAKE_CURRENT_LIST_DIR}/smooth/core/filesystem/MMCSDCard.cpp

$ENV{IDF_PATH}/components/json/cJSON/cJSON.c
$ENV{IDF_PATH}/components/json/cJSON/cJSON.h
)

if (${ESP_PLATFORM})
list(APPEND SMOOTH_SOURCES
${CMAKE_CURRENT_LIST_DIR}/smooth/core/sntp/Sntp.cpp
${CMAKE_CURRENT_LIST_DIR}/smooth/core/logging/idf/idf_log.cpp
${CMAKE_CURRENT_LIST_DIR}/smooth/core/io/i2c/I2CCommandLink.cpp
${CMAKE_CURRENT_LIST_DIR}/smooth/core/io/i2c/I2CMasterDevice.cpp
${CMAKE_CURRENT_LIST_DIR}/smooth/core/io/i2c/Master.cpp
${CMAKE_CURRENT_LIST_DIR}/smooth/core/sntp/Sntp.cpp
${CMAKE_CURRENT_LIST_DIR}/smooth/core/filesystem/MMCSDCard.cpp
${CMAKE_CURRENT_LIST_DIR}/smooth/include/smooth/core/io/Input.h
${CMAKE_CURRENT_LIST_DIR}/smooth/include/smooth/core/io/Output.h
${CMAKE_CURRENT_LIST_DIR}/smooth/include/smooth/core/io/i2c/I2CCommandLink.h
${CMAKE_CURRENT_LIST_DIR}/smooth/include/smooth/core/io/InterruptInput.h
${CMAKE_CURRENT_LIST_DIR}/smooth/include/smooth/core/io/i2c/I2CMasterDevice.h
Expand Down
5 changes: 5 additions & 0 deletions mock-idf/components/driver/gpio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ int gpio_get_level(gpio_num_t /*gpio_num*/)
{
return 0;
}

esp_err_t gpio_set_pull_mode(gpio_num_t /*gpio_num*/, gpio_pull_mode_t /*pull*/)
{
return ESP_OK;
}
14 changes: 14 additions & 0 deletions mock-idf/components/driver/include/driver/sdmmc_host.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once

#include <driver/gpio.h>

#define SDMMC_HOST_DEFAULT() {}

typedef struct {
gpio_num_t gpio_cd; ///< GPIO number of card detect signal
gpio_num_t gpio_wp; ///< GPIO number of write protect signal
uint8_t width; ///< Bus width used by the slot (might be less than the max width supported)
uint32_t flags; ///< Features used by this slot
} sdmmc_slot_config_t;

#define SDMMC_SLOT_CONFIG_DEFAULT() {}

0 comments on commit 0dc1b3d

Please sign in to comment.