Skip to content

Commit

Permalink
Whitespace: Automated whitespace fixes (large commit)
Browse files Browse the repository at this point in the history
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
  • Loading branch information
projectgus authored and espressif-bot committed Nov 11, 2020
1 parent e82eac4 commit 66fb5a2
Show file tree
Hide file tree
Showing 1,975 changed files with 9,433 additions and 10,476 deletions.
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ contact_links:
- name: Hardware-related services
url: https://www.espressif.com/en/products/hardware-services
about: Espressif service providing hardware design and certification support


2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ flake8_output.txt
build

# lock files for examples and components
dependencies.lock
dependencies.lock
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ python:
- requirements: docs/requirements.txt

# We need to list all the submodules included in documenation build by DOxygen
submodules:
submodules:
include:
- components/mqtt/esp-mqtt
- components/mqtt/esp-mqtt
2 changes: 0 additions & 2 deletions add_path.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ else
export PATH="${IDF_ADD_PATHS_EXTRAS}:${PATH}"
echo "Added to PATH: ${IDF_ADD_PATHS_EXTRAS}"
fi


4 changes: 2 additions & 2 deletions components/app_trace/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(srcs
set(srcs
"app_trace.c"
"app_trace_util.c"
"host_file_io.c"
Expand All @@ -12,7 +12,7 @@ if(CONFIG_SYSVIEW_ENABLE)
sys_view/SEGGER
sys_view/Sample/OS)

list(APPEND srcs
list(APPEND srcs
"sys_view/SEGGER/SEGGER_SYSVIEW.c"
"sys_view/Sample/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c"
"sys_view/Sample/OS/SEGGER_SYSVIEW_FreeRTOS.c"
Expand Down
1 change: 0 additions & 1 deletion components/app_trace/heap_trace_tohost.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,3 @@ static IRAM_ATTR void record_free(void *p, void **callers)
#include "heap_trace.inc"

#endif /*CONFIG_HEAP_TRACING_TOHOST*/

6 changes: 3 additions & 3 deletions components/app_trace/host_file_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void *esp_apptrace_fopen(esp_apptrace_dest_t dest, const char *path, const char

ESP_EARLY_LOGV(TAG, "esp_apptrace_fopen '%s' '%s'", path, mode);
if (path == NULL || mode == NULL) {
return 0;
return 0;
}

cmd_args.path = path;
Expand Down Expand Up @@ -217,7 +217,7 @@ size_t esp_apptrace_fwrite(esp_apptrace_dest_t dest, const void *ptr, size_t siz
ESP_EARLY_LOGV(TAG, "esp_apptrace_fwrite f %p l %d", stream, size*nmemb);

if (ptr == NULL) {
return 0;
return 0;
}

cmd_args.buf = (void *)ptr;
Expand Down Expand Up @@ -256,7 +256,7 @@ size_t esp_apptrace_fread(esp_apptrace_dest_t dest, void *ptr, size_t size, size
ESP_EARLY_LOGV(TAG, "esp_apptrace_fread f %p l %d", stream, size*nmemb);

if (ptr == NULL) {
return 0;
return 0;
}

cmd_args.size = size * nmemb;
Expand Down
4 changes: 2 additions & 2 deletions components/app_trace/include/esp_app_trace_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extern "C" {
/** Infinite waiting timeout */
#define ESP_APPTRACE_TMO_INFINITE ((uint32_t)-1)

/** Structure which holds data necessary for measuring time intervals.
/** Structure which holds data necessary for measuring time intervals.
*
* After initialization via esp_apptrace_tmo_init() user needs to call esp_apptrace_tmo_check()
* periodically to check timeout for expiration.
Expand Down Expand Up @@ -100,7 +100,7 @@ esp_err_t esp_apptrace_lock_give(esp_apptrace_lock_t *lock);

/** Ring buffer control structure.
*
* @note For purposes of application tracing module if there is no enough space for user data and write pointer can be wrapped
* @note For purposes of application tracing module if there is no enough space for user data and write pointer can be wrapped
* current ring buffer size can be temporarily shrinked in order to provide buffer with requested size.
*/
typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion components/app_trace/linker.lf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[mapping:app_trace]
archive: libapp_trace.a
entries:
entries:
app_trace (noflash)
app_trace_util (noflash)
SEGGER_SYSVIEW (noflash)
Expand Down
2 changes: 1 addition & 1 deletion components/app_trace/sdkconfig.rename
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE
CONFIG_ESP32_APPTRACE_ONPANIC_HOST_FLUSH_TMO CONFIG_APPTRACE_ONPANIC_HOST_FLUSH_TMO
CONFIG_ESP32_APPTRACE_POSTMORTEM_FLUSH_TRAX_THRESH CONFIG_APPTRACE_POSTMORTEM_FLUSH_THRESH
CONFIG_ESP32_APPTRACE_PENDING_DATA_SIZE_MAX CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX
CONFIG_ESP32_GCOV_ENABLE CONFIG_APPTRACE_GCOV_ENABLE
CONFIG_ESP32_GCOV_ENABLE CONFIG_APPTRACE_GCOV_ENABLE
2 changes: 1 addition & 1 deletion components/app_trace/sys_view/Config/Global.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Purpose : Global types
#else
#define U64_C(x) x##ULL
#endif
#else
#else
//
// C99 compliant compiler
//
Expand Down
2 changes: 1 addition & 1 deletion components/app_trace/sys_view/SEGGER/SEGGER_RTT.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
---------------------------END-OF-HEADER------------------------------
File : SEGGER_RTT.h
Purpose : Implementation of SEGGER real-time transfer which allows
real-time communication on targets which support debugger
real-time communication on targets which support debugger
memory accesses while the CPU is running.
Revision: $Rev: 5626 $
----------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions components/app_trace/sys_view/SEGGER/SEGGER_SYSVIEW.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ static U8 *_EncodeStr(U8 *pPayload, const char *pText, unsigned int Limit) {
// Write Len
//
if (Len < 255) {
*pPayload++ = Len;
*pPayload++ = Len;
} else {
*pPayload++ = 255;
*pPayload++ = (Len & 255);
Expand Down Expand Up @@ -556,7 +556,7 @@ static int _TrySendOverflowPacket(void) {
* _SendSyncInfo()
*
* Function description
* Send SystemView sync packet and system information in
* Send SystemView sync packet and system information in
* post mortem mode.
*
* Additional information
Expand Down Expand Up @@ -792,7 +792,7 @@ static void _VPrintHost(const char* s, U32 Options, va_list* pParamList) {
U32 aParas[SEGGER_SYSVIEW_MAX_ARGUMENTS];
U32 NumArguments;
const char* p;

p = s;
NumArguments = 0;
while (*p) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ extern "C" {
#endif

// Lowest Id reported by the Application.
#ifndef SEGGER_SYSVIEW_ID_BASE
#ifndef SEGGER_SYSVIEW_ID_BASE
#define SEGGER_SYSVIEW_ID_BASE 0
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ static U64 _cbGetTime(void) {
*/
void SYSVIEW_AddTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) {
unsigned n;

if (memcmp(pcTaskName, "IDLE", 5) == 0) {
return;
}

for (n = 0; n < SYSVIEW_FREERTOS_MAX_NOF_TASKS; n++) {
if (_aTasks[n].xHandle == 0) {
break;
Expand Down Expand Up @@ -170,7 +170,7 @@ void SYSVIEW_AddTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPrio
*/
void SYSVIEW_UpdateTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) {
unsigned n;

if (memcmp(pcTaskName, "IDLE", 5) == 0) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions components/app_update/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
idf_component_register(SRCS "esp_ota_ops.c"
idf_component_register(SRCS "esp_ota_ops.c"
"esp_app_desc.c"
INCLUDE_DIRS "include"
REQUIRES spi_flash partition_table bootloader_support)
Expand Down Expand Up @@ -52,7 +52,7 @@ if(NOT BOOTLOADER_BUILD)

add_custom_target(read_otadata DEPENDS "${PARTITION_CSV_PATH}"
COMMAND ${otatool_py} ${esptool_args}
--partition-table-file ${PARTITION_CSV_PATH}
--partition-table-file ${PARTITION_CSV_PATH}
--partition-table-offset ${PARTITION_TABLE_OFFSET}
read_otadata)

Expand Down
6 changes: 3 additions & 3 deletions components/app_update/Makefile.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $(BLANK_OTA_DATA_FILE): partition_table_get_info $(PARTITION_TABLE_CSV_PATH) | c

blank_ota_data: $(BLANK_OTA_DATA_FILE)

# If there is no otadata partition, both OTA_DATA_OFFSET and BLANK_OTA_DATA_FILE
# If there is no otadata partition, both OTA_DATA_OFFSET and BLANK_OTA_DATA_FILE
# expand to empty values.
ESPTOOL_ALL_FLASH_ARGS += $(OTA_DATA_OFFSET) $(BLANK_OTA_DATA_FILE)

Expand All @@ -36,8 +36,8 @@ erase_otadata: $(PARTITION_TABLE_CSV_PATH) partition_table_get_info | check_pyth
erase_otadata

read_otadata: $(PARTITION_TABLE_CSV_PATH) partition_table_get_info | check_python_dependencies
$(OTATOOL_PY) $(ESPTOOL_ARGS) --partition-table-file $(PARTITION_TABLE_CSV_PATH) \
--partition-table-offset $(partition_table_offset) \
$(OTATOOL_PY) $(ESPTOOL_ARGS) --partition-table-file $(PARTITION_TABLE_CSV_PATH) \
--partition-table-offset $(partition_table_offset) \
read_otadata

all: blank_ota_data
Expand Down
2 changes: 1 addition & 1 deletion components/app_update/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)

# esp_app_desc structure is added as an undefined symbol because otherwise the
# esp_app_desc structure is added as an undefined symbol because otherwise the
# linker will ignore this structure as it has no other files depending on it.
COMPONENT_ADD_LDFLAGS += -u esp_app_desc

Expand Down
2 changes: 1 addition & 1 deletion components/app_update/esp_app_desc.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ __attribute__((constructor)) void esp_ota_init_app_elf_sha256(void)
/* The esp_app_desc.app_elf_sha256 should be possible to print in panic handler during cache is disabled.
* But because the cache is disabled the reading esp_app_desc.app_elf_sha256 is not right and
* can lead to a complete lock-up of the CPU.
* For this reason we do a reading of esp_app_desc.app_elf_sha256 while start up in esp_ota_init_app_elf_sha256()
* For this reason we do a reading of esp_app_desc.app_elf_sha256 while start up in esp_ota_init_app_elf_sha256()
* and keep it in the static s_app_elf_sha256 value.
*/
int IRAM_ATTR esp_ota_get_app_elf_sha256(char* dst, size_t size)
Expand Down
4 changes: 2 additions & 2 deletions components/app_update/include/esp_ota_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ typedef uint32_t esp_ota_handle_t;

/**
* @brief Return esp_app_desc structure. This structure includes app version.
*
*
* Return description for running app.
* @return Pointer to esp_app_desc structure.
*/
Expand Down Expand Up @@ -225,7 +225,7 @@ const esp_partition_t* esp_ota_get_next_update_partition(const esp_partition_t *

/**
* @brief Returns esp_app_desc structure for app partition. This structure includes app version.
*
*
* Returns a description for the requested app partition.
* @param[in] partition Pointer to app partition. (only app partition)
* @param[out] app_desc Structure of info about app.
Expand Down
2 changes: 1 addition & 1 deletion components/asio/port/include/esp_exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace detail {
template <typename Exception>
void throw_exception(const Exception& e)
{
ESP_LOGE("esp32_asio_exception", "Caught exception: %s!", e.what());
ESP_LOGE("esp32_asio_exception", "Caught exception: %s!", e.what());
abort();
}
}}
Expand Down
1 change: 0 additions & 1 deletion components/bootloader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ if(NOT CONFIG_SECURE_BOOT)
${CONFIG_BOOTLOADER_OFFSET_IN_FLASH}
"${BOOTLOADER_BUILD_DIR}/bootloader.bin")
endif()

1 change: 0 additions & 1 deletion components/bootloader/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -788,4 +788,3 @@ menu "Security features"


endmenu # Security features

2 changes: 1 addition & 1 deletion components/bootloader/Makefile.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ ifdef CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME
ifdef CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES
rm -f $(BOOTLOADER_SIGNED_BIN)
endif
endif
endif
1 change: 0 additions & 1 deletion components/bootloader/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
#
# See Makefile.projbuild for the targets which actually build the bootloader.
COMPONENT_CONFIG_ONLY := 1

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int uECC_verify_antifault(const uint8_t *public_key,
uECC_word_t *_public = (uECC_word_t *)public_key;
#else
uECC_word_t _public[uECC_MAX_WORDS * 2];
#endif
#endif
uECC_word_t r[uECC_MAX_WORDS], s[uECC_MAX_WORDS];
wordcount_t num_words = curve->num_words;
wordcount_t num_n_words = BITS_TO_WORDS(curve->num_n_bits);
Expand Down
1 change: 0 additions & 1 deletion components/bootloader/subproject/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ set(scripts "ld/${target}/bootloader.ld"
"ld/${target}/bootloader.rom.ld")

target_linker_script(${COMPONENT_LIB} INTERFACE "${scripts}")

2 changes: 1 addition & 1 deletion components/bootloader/subproject/main/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ifdef CONFIG_IDF_TARGET_ESP32
ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
LINKER_SCRIPTS += $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.spiflash.ld
endif
ifdef CONFIG_ESP32_REV_MIN_3
ifdef CONFIG_ESP32_REV_MIN_3
LINKER_SCRIPTS += $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.eco3.ld
endif
endif
Expand Down
1 change: 0 additions & 1 deletion components/bootloader_support/include/bootloader_clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ int bootloader_clock_get_rated_freq_mhz(void);
#ifdef __cplusplus
}
#endif

1 change: 0 additions & 1 deletion components/bootloader_support/include/bootloader_flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@
*/
esp_err_t bootloader_flash_wrap_set(spi_flash_wrap_mode_t mode);
#endif

2 changes: 1 addition & 1 deletion components/bootloader_support/include/bootloader_mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ void bootloader_init_mem(void);

#ifdef __cplusplus
}
#endif
#endif
18 changes: 9 additions & 9 deletions components/bootloader_support/include/esp_secure_boot.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static inline bool esp_secure_boot_enabled(void)
* @important This function is intended to be called from bootloader code only.
*
* This function is only used in the context of the Secure Boot V1 scheme.
*
*
* If secure boot is not yet enabled for bootloader, this will:
* 1) generate the secure boot key and burn it on EFUSE
* (without enabling R/W protection)
Expand All @@ -91,9 +91,9 @@ esp_err_t esp_secure_boot_generate_digest(void);
*
* @important This function is intended to be called from bootloader code only.
*
* @important In case of Secure Boot V1, this will enable r/w protection
* of secure boot key on EFUSE, therefore it is to be ensured that
* esp_secure_boot_generate_digest() is called before this .If secure boot is not
* @important In case of Secure Boot V1, this will enable r/w protection
* of secure boot key on EFUSE, therefore it is to be ensured that
* esp_secure_boot_generate_digest() is called before this .If secure boot is not
* yet enabled for bootloader, this will
* 1) enable R/W protection of secure boot key on EFUSE
* 2) enable secure boot by blowing the EFUSE_RD_ABS_DONE_0 efuse.
Expand All @@ -116,9 +116,9 @@ esp_err_t esp_secure_boot_permanently_enable(void);
* enabled on the chip via efuse.
*
* @important This function is intended to be called from bootloader code only.
*
* @important In case of Secure Boot V2, this will enable write protection
* of secure boot key on EFUSE in BLK2. .If secure boot is not
*
* @important In case of Secure Boot V2, this will enable write protection
* of secure boot key on EFUSE in BLK2. .If secure boot is not
* yet enabled for bootloader, this will
* 1) enable W protection of secure boot key on EFUSE
* 2) enable secure boot by blowing the EFUSE_RD_ABS_DONE_1 efuse.
Expand All @@ -127,7 +127,7 @@ esp_err_t esp_secure_boot_permanently_enable(void);
* ROM bootloader does this.)
*
* @param image_data Image metadata of the application to be loaded.
*
*
* Will fail if efuses have been part-burned in a way that indicates
* secure boot should not or could not be correctly enabled.
*
Expand All @@ -141,7 +141,7 @@ esp_err_t esp_secure_boot_v2_permanently_enable(const esp_image_metadata_t *imag
*
* For ECDSA Scheme (Secure Boot V1) - deterministic ECDSA w/ SHA256 image
* For RSA Scheme (Secure Boot V2) - RSA-PSS Verification of the SHA-256 image
*
*
* Public key is compiled into the calling program in the ECDSA Scheme.
* See the apt docs/security/secure-boot-v1.rst or docs/security/secure-boot-v2.rst for details.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ void bootloader_debug_buffer(const void *buffer, size_t length, const char *labe
/** @brief Generates the digest of the data between offset & offset+length.
*
* This function should be used when the size of the data is larger than 3.2MB.
* The MMU capacity is 3.2MB (50 pages - 64KB each). This function generates the SHA-256
* of the data in chunks of 3.2MB, considering the MMU capacity.
*
* The MMU capacity is 3.2MB (50 pages - 64KB each). This function generates the SHA-256
* of the data in chunks of 3.2MB, considering the MMU capacity.
*
* @param[in] flash_offset Offset of the data in flash.
* @param[in] len Length of data in bytes.
* @param[out] digest Pointer to buffer where the digest is written, if ESP_OK is returned.
*
* @param[out] digest Pointer to buffer where the digest is written, if ESP_OK is returned.
*
* @return ESP_OK if secure boot digest is generated successfully.
*/
esp_err_t bootloader_sha256_flash_contents(uint32_t flash_offset, uint32_t len, uint8_t *digest);
Loading

0 comments on commit 66fb5a2

Please sign in to comment.