Whitespace: Automated whitespace fixes (large commit)

Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
This commit is contained in:
Angus Gratton
2020-11-10 18:40:01 +11:00
committed by bot
parent e82eac4354
commit 66fb5a29bb
1975 changed files with 9433 additions and 10476 deletions
-1
View File
@@ -11,4 +11,3 @@ idf_component_register(SRCS "esp_spiffs.c"
PRIV_REQUIRES bootloader_support)
set_source_files_properties(spiffs/src/spiffs_nucleus.c PROPERTIES COMPILE_FLAGS -Wno-stringop-truncation)
+2 -2
View File
@@ -8,7 +8,7 @@ USE_MAGIC :=
endif
ifdef CONFIG_SPIFFS_USE_MAGIC_LENGTH
USE_MAGIC_LEN := "--use-magic-len"
USE_MAGIC_LEN := "--use-magic-len"
else
USE_MAGIC_LEN :=
endif
@@ -35,7 +35,7 @@ $(1)_bin: $(PARTITION_TABLE_BIN) $(SPIFFS_IMAGE_DEPENDS) | check_python_dependen
--meta-len=$(CONFIG_SPIFFS_META_LENGTH) \
$(FOLLOW_SYMLINKS) \
$(USE_MAGIC) \
$(USE_MAGIC_LEN)
$(USE_MAGIC_LEN)
all_binaries: $(1)_bin
print_flash_cmd: $(1)_bin
+5 -5
View File
@@ -37,7 +37,7 @@ typedef struct {
*
* @param conf Pointer to esp_vfs_spiffs_conf_t configuration structure
*
* @return
* @return
* - ESP_OK if success
* - ESP_ERR_NO_MEM if objects could not be allocated
* - ESP_ERR_INVALID_STATE if already mounted or partition is encrypted
@@ -51,7 +51,7 @@ esp_err_t esp_vfs_spiffs_register(const esp_vfs_spiffs_conf_t * conf);
*
* @param partition_label Same label as passed to esp_vfs_spiffs_register.
*
* @return
* @return
* - ESP_OK if successful
* - ESP_ERR_INVALID_STATE already unregistered
*/
@@ -63,7 +63,7 @@ esp_err_t esp_vfs_spiffs_unregister(const char* partition_label);
* @param partition_label Optional, label of the partition to check.
* If not specified, first partition with subtype=spiffs is used.
*
* @return
* @return
* - true if mounted
* - false if not mounted
*/
@@ -73,7 +73,7 @@ bool esp_spiffs_mounted(const char* partition_label);
* Format the SPIFFS partition
*
* @param partition_label Same label as passed to esp_vfs_spiffs_register.
* @return
* @return
* - ESP_OK if successful
* - ESP_FAIL on error
*/
@@ -86,7 +86,7 @@ esp_err_t esp_spiffs_format(const char* partition_label);
* @param[out] total_bytes Size of the file system
* @param[out] used_bytes Current used bytes in the file system
*
* @return
* @return
* - ESP_OK if success
* - ESP_ERR_INVALID_STATE if not mounted
*/
+6 -6
View File
@@ -33,7 +33,7 @@ void spiffs_api_unlock(spiffs *fs)
s32_t spiffs_api_read(spiffs *fs, uint32_t addr, uint32_t size, uint8_t *dst)
{
esp_err_t err = esp_partition_read(((esp_spiffs_t *)(fs->user_data))->partition,
esp_err_t err = esp_partition_read(((esp_spiffs_t *)(fs->user_data))->partition,
addr, dst, size);
if (unlikely(err)) {
ESP_LOGE(TAG, "failed to read addr %08x, size %08x, err %d", addr, size, err);
@@ -44,7 +44,7 @@ s32_t spiffs_api_read(spiffs *fs, uint32_t addr, uint32_t size, uint8_t *dst)
s32_t spiffs_api_write(spiffs *fs, uint32_t addr, uint32_t size, uint8_t *src)
{
esp_err_t err = esp_partition_write(((esp_spiffs_t *)(fs->user_data))->partition,
esp_err_t err = esp_partition_write(((esp_spiffs_t *)(fs->user_data))->partition,
addr, src, size);
if (unlikely(err)) {
ESP_LOGE(TAG, "failed to write addr %08x, size %08x, err %d", addr, size, err);
@@ -55,7 +55,7 @@ s32_t spiffs_api_write(spiffs *fs, uint32_t addr, uint32_t size, uint8_t *src)
s32_t spiffs_api_erase(spiffs *fs, uint32_t addr, uint32_t size)
{
esp_err_t err = esp_partition_erase_range(((esp_spiffs_t *)(fs->user_data))->partition,
esp_err_t err = esp_partition_erase_range(((esp_spiffs_t *)(fs->user_data))->partition,
addr, size);
if (err) {
ESP_LOGE(TAG, "failed to erase addr %08x, size %08x, err %d", addr, size, err);
@@ -64,7 +64,7 @@ s32_t spiffs_api_erase(spiffs *fs, uint32_t addr, uint32_t size)
return 0;
}
void spiffs_api_check(spiffs *fs, spiffs_check_type type,
void spiffs_api_check(spiffs *fs, spiffs_check_type type,
spiffs_check_report report, uint32_t arg1, uint32_t arg2)
{
static const char * spiffs_check_type_str[3] = {
@@ -84,10 +84,10 @@ void spiffs_api_check(spiffs *fs, spiffs_check_type type,
};
if (report != SPIFFS_CHECK_PROGRESS) {
ESP_LOGE(TAG, "CHECK: type:%s, report:%s, %x:%x", spiffs_check_type_str[type],
ESP_LOGE(TAG, "CHECK: type:%s, report:%s, %x:%x", spiffs_check_type_str[type],
spiffs_check_report_str[report], arg1, arg2);
} else {
ESP_LOGV(TAG, "CHECK PROGRESS: report:%s, %x:%x",
ESP_LOGV(TAG, "CHECK PROGRESS: report:%s, %x:%x",
spiffs_check_report_str[report], arg1, arg2);
}
}
+1 -1
View File
@@ -55,4 +55,4 @@ void spiffs_api_check(spiffs *fs, spiffs_check_type type,
#ifdef __cplusplus
}
#endif
#endif
+1 -1
View File
@@ -1,3 +1,3 @@
idf_component_register(SRC_DIRS "."
PRIV_INCLUDE_DIRS "."
PRIV_REQUIRES cmock test_utils spiffs)
PRIV_REQUIRES cmock test_utils spiffs)
+4 -4
View File
@@ -57,7 +57,7 @@ endef
define COMPILE_CPP
$(call CPPTARGET, ${1}, $(BUILD_DIR)) : ${1} $(SDKCONFIG)
mkdir -p $(BUILD_DIR)
mkdir -p $(BUILD_DIR)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $(call CPPTARGET, ${1}, $(BUILD_DIR)) ${1}
endef
@@ -88,12 +88,12 @@ $(TEST_PROGRAM): lib $(TEST_OBJ_FILES) $(SPI_FLASH_SIM_BUILD_DIR)/$(SPI_FLASH_SI
# Use spiffs source directory as the test image
spiffs_image: ../spiffs $(shell find ../spiffs -type d) $(shell find ../spiffs -type -f -name '*')
# Creation of test symlinks unfortunately causes rerun of spiffsgen.py every make invoke
rm -f ../spiffs/include ../spiffs/CMakeLists.txt
rm -f ../spiffs/include ../spiffs/CMakeLists.txt
ln -s ../include ../spiffs/include
ln -s ../CMakeLists.txt ../spiffs/CMakeLists.txt
../spiffsgen.py --follow-symlinks 2097152 ../spiffs image.bin
../spiffsgen.py --follow-symlinks 2097152 ../spiffs image.bin
test: $(TEST_PROGRAM) spiffs_image
test: $(TEST_PROGRAM) spiffs_image
./$(TEST_PROGRAM)
# Create other necessary targets
@@ -14,4 +14,4 @@ CLEAN_FILES := component_project_vars.mk
clean:
$(summary) RM $(CLEAN_FILES)
rm -f $(CLEAN_FILES)
$(MAKE) -C $(COMPONENT_PATH) clean SDKCONFIG=$(SDKCONFIG_HEADER) BUILD_DIR=$(COMPONENT_BUILD_DIR) COMPONENT=$(COMPONENT_NAME)
$(MAKE) -C $(COMPONENT_PATH) clean SDKCONFIG=$(SDKCONFIG_HEADER) BUILD_DIR=$(COMPONENT_BUILD_DIR) COMPONENT=$(COMPONENT_NAME)
@@ -1,3 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
@@ -3,4 +3,4 @@
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
storage, data, spiffs, , 2M,
storage, data, spiffs, , 2M,
1 # Name, Type, SubType, Offset, Size, Flags
3 nvs, data, nvs, 0x9000, 0x6000,
4 phy_init, data, phy, 0xf000, 0x1000,
5 factory, app, factory, 0x10000, 1M,
6 storage, data, spiffs, , 2M, storage, data, spiffs, , 2M,
@@ -19,4 +19,3 @@
#define CONFIG_ESPTOOLPY_FLASHSIZE "8MB"
//currently use the legacy implementation, since the stubs for new HAL are not done yet
#define CONFIG_SPI_FLASH_USE_LEGACY_IMPL 1
@@ -254,4 +254,4 @@ TEST_CASE("can read spiffs image", "[spiffs]")
check_spiffs_files(&fs, "../spiffs", path_buf);
deinit_spiffs(&fs);
}
}