Fix typo in spiffs config and update submodule

Fixes github issues #1012 and #1013

https://github.com/espressif/esp-idf/issues/1012
https://github.com/espressif/esp-idf/issues/1013
This commit is contained in:
me-no-dev 2017-09-19 17:09:20 +08:00
parent 7e428433e1
commit 14b12a27cf
4 changed files with 15 additions and 7 deletions

View File

@ -498,7 +498,7 @@ static int spiffs_mode_conv(int m)
} else if ((m & O_CREAT) && (m & O_TRUNC)) { } else if ((m & O_CREAT) && (m & O_TRUNC)) {
res |= SPIFFS_O_CREAT | SPIFFS_O_TRUNC; res |= SPIFFS_O_CREAT | SPIFFS_O_TRUNC;
} else if (m & O_APPEND) { } else if (m & O_APPEND) {
res |= SPIFFS_O_APPEND; res |= SPIFFS_O_CREAT | SPIFFS_O_APPEND;
} }
return res; return res;
} }

View File

@ -18,6 +18,10 @@
#include <stdbool.h> #include <stdbool.h>
#include "esp_err.h" #include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* @brief Configuration structure for esp_vfs_spiffs_register * @brief Configuration structure for esp_vfs_spiffs_register
*/ */
@ -91,4 +95,8 @@ esp_err_t esp_spiffs_format(const char* partition_label);
*/ */
esp_err_t esp_spiffs_info(const char* partition_label, size_t *total_bytes, size_t *used_bytes); esp_err_t esp_spiffs_info(const char* partition_label, size_t *total_bytes, size_t *used_bytes);
#ifdef __cplusplus
}
#endif
#endif /* _ESP_SPIFFS_H_ */ #endif /* _ESP_SPIFFS_H_ */

View File

@ -24,27 +24,27 @@
#define SPIFFS_TAG "SPIFFS" #define SPIFFS_TAG "SPIFFS"
// Set generic spiffs debug output call. // Set generic spiffs debug output call.
#if CONGIG_SPIFFS_DBG #if CONFIG_SPIFFS_DBG
#define SPIFFS_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__) #define SPIFFS_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__)
#else #else
#define SPIFFS_DBG(...) #define SPIFFS_DBG(...)
#endif #endif
#if CONGIG_SPIFFS_API_DBG #if CONFIG_SPIFFS_API_DBG
#define SPIFFS_API_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__) #define SPIFFS_API_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__)
#else #else
#define SPIFFS_API_DBG(...) #define SPIFFS_API_DBG(...)
#endif #endif
#if CONGIG_SPIFFS_DBG #if CONFIG_SPIFFS_DBG
#define SPIFFS_GC_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__) #define SPIFFS_GC_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__)
#else #else
#define SPIFFS_GC_DBG(...) #define SPIFFS_GC_DBG(...)
#endif #endif
#if CONGIG_SPIFFS_CACHE_DBG #if CONFIG_SPIFFS_CACHE_DBG
#define SPIFFS_CACHE_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__) #define SPIFFS_CACHE_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__)
#else #else
#define SPIFFS_CACHE_DBG(...) #define SPIFFS_CACHE_DBG(...)
#endif #endif
#if CONGIG_SPIFFS_CHECK_DBG #if CONFIG_SPIFFS_CHECK_DBG
#define SPIFFS_CHECK_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__) #define SPIFFS_CHECK_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__)
#else #else
#define SPIFFS_CHECK_DBG(...) #define SPIFFS_CHECK_DBG(...)

@ -1 +1 @@
Subproject commit 794f0478d2aa9c978c3844da6e97f14239a1e061 Subproject commit f5e26c4e933189593a71c6b82cda381a7b21e41c