From ddcabd484e07b977268ba3febacbb4dd86514e81 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Mon, 27 Sep 2021 22:39:56 +0100 Subject: [PATCH] Fix spelling of "successful" in comments (#2054) ***NO_CI*** --- src/CLR/Include/WireProtocol_HAL_Interface.h | 2 +- src/PAL/COM/ComDirector.cpp | 54 +++++++++---------- src/PAL/Include/nanoPAL_BlockStorage.h | 2 +- ...sys_io_filesystem_System_IO_FileStream.cpp | 8 +-- .../Windows.Devices.Gpio/cpu_gpio.cpp | 2 +- ...e_native_Windows_Storage_StorageFolder.cpp | 6 +-- .../Windows.Devices.Gpio/cpu_gpio.cpp | 2 +- .../nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp | 2 +- ...age_native_Windows_Storage_StorageFile.cpp | 4 +- ...e_native_Windows_Storage_StorageFolder.cpp | 18 +++---- ...etHAL_ConfigurationManager_CC13x2_26x2.cpp | 2 +- .../targetHAL_ConfigurationManager_CC32xx.cpp | 2 +- .../Windows.Devices.Gpio/cpu_gpio.cpp | 2 +- .../win32/Include/TargetPAL_BlockStorage.h | 20 +++---- 14 files changed, 63 insertions(+), 63 deletions(-) diff --git a/src/CLR/Include/WireProtocol_HAL_Interface.h b/src/CLR/Include/WireProtocol_HAL_Interface.h index b460f5858c..9686bf6768 100644 --- a/src/CLR/Include/WireProtocol_HAL_Interface.h +++ b/src/CLR/Include/WireProtocol_HAL_Interface.h @@ -22,7 +22,7 @@ void WP_ReceiveBytes(uint8_t **ptr, uint32_t *size); /// @brief Sends a message through the Wire Protocol channel. /// /// @param message Message to send -/// @return bool true for transmition succesfull, false otherwise. +/// @return bool true for transmition successful, false otherwise. /// uint8_t WP_TransmitMessage(WP_Message *message); diff --git a/src/PAL/COM/ComDirector.cpp b/src/PAL/COM/ComDirector.cpp index 52022a5638..cc5f75db49 100644 --- a/src/PAL/COM/ComDirector.cpp +++ b/src/PAL/COM/ComDirector.cpp @@ -6,56 +6,56 @@ #include -int DebuggerPort_Write( COM_HANDLE ComPortNum, const char* Data, size_t size, int maxRetries ) +int DebuggerPort_Write(COM_HANDLE ComPortNum, const char *Data, size_t size, int maxRetries) { NATIVE_PROFILE_PAL_COM(); - - UINT32 transport = ExtractTransport(ComPortNum); - const char* dataTmp = Data; - INT32 totWrite = 0; - int retries = maxRetries + 1; - while(size > 0 && retries > 0 ) + UINT32 transport = ExtractTransport(ComPortNum); + const char *dataTmp = Data; + INT32 totWrite = 0; + int retries = maxRetries + 1; + + while (size > 0 && retries > 0) { int ret = 0; - - switch(transport) + + switch (transport) { - case USART_TRANSPORT: - ret = USART_Write( ConvertCOM_ComPort( ComPortNum ), dataTmp, size ); - break; - case USB_TRANSPORT: - ret = USB_Write( ConvertCOM_UsbStream( ComPortNum ), dataTmp, size ); - break; - case SOCKET_TRANSPORT: - ret = SOCKETS_Write( ConvertCOM_SockPort(ComPortNum), dataTmp, size ); - break; + case USART_TRANSPORT: + ret = USART_Write(ConvertCOM_ComPort(ComPortNum), dataTmp, size); + break; + case USB_TRANSPORT: + ret = USB_Write(ConvertCOM_UsbStream(ComPortNum), dataTmp, size); + break; + case SOCKET_TRANSPORT: + ret = SOCKETS_Write(ConvertCOM_SockPort(ComPortNum), dataTmp, size); + break; - case GENERIC_TRANSPORT: - return GenericPort_Write( ConvertCOM_GenericPort( ComPortNum ), dataTmp, size ); + case GENERIC_TRANSPORT: + return GenericPort_Write(ConvertCOM_GenericPort(ComPortNum), dataTmp, size); } - if(ret < 0) + if (ret < 0) { // error condition, bug out break; } - else if(ret == 0) + else if (ret == 0) { // didn't send any data ( assume buffer full ) --retries; // if interrupts are off and buffer is full or out of retries // then there is nothing more to do. - if(!INTERRUPTS_ENABLED_STATE() || retries <= 0 ) + if (!INTERRUPTS_ENABLED_STATE() || retries <= 0) break; Events_WaitForEvents(0, 1); } else - { // succesfully transmitted at least some of the data + { // successfully transmitted at least some of the data // update counters and loop back to try sending more - retries = maxRetries + 1; - size -= ret; - dataTmp += ret; + retries = maxRetries + 1; + size -= ret; + dataTmp += ret; totWrite += ret; } } diff --git a/src/PAL/Include/nanoPAL_BlockStorage.h b/src/PAL/Include/nanoPAL_BlockStorage.h index 579be20a62..b1c2462221 100644 --- a/src/PAL/Include/nanoPAL_BlockStorage.h +++ b/src/PAL/Include/nanoPAL_BlockStorage.h @@ -315,7 +315,7 @@ struct IBLOCKSTORAGEDEVICE // Initializes a given block device for use // // Returns: - // true if succesful; false if not + // true if successful; false if not // // Remarks: // De initializes the device when no longer needed diff --git a/src/System.IO.FileSystem/nf_sys_io_filesystem_System_IO_FileStream.cpp b/src/System.IO.FileSystem/nf_sys_io_filesystem_System_IO_FileStream.cpp index b2834a71a1..c033a7f451 100644 --- a/src/System.IO.FileSystem/nf_sys_io_filesystem_System_IO_FileStream.cpp +++ b/src/System.IO.FileSystem/nf_sys_io_filesystem_System_IO_FileStream.cpp @@ -119,7 +119,7 @@ HRESULT Library_nf_sys_io_filesystem_System_IO_FileStream::OpenFileNative___VOID } if (operationResult == FR_OK) { - // file created (or opened) succesfully + // file created (or opened) successfully // OK to close it f_close(&file); } @@ -216,7 +216,7 @@ HRESULT Library_nf_sys_io_filesystem_System_IO_FileStream::ReadNative___I4__STRI length = f_size(&file) - position; } - // file opened succesfully + // file opened successfully operationResult = f_read(&file, buffer, length, &readCount); if (operationResult != FR_OK) { @@ -314,7 +314,7 @@ HRESULT Library_nf_sys_io_filesystem_System_IO_FileStream::WriteNative___VOID__S NANOCLR_SET_AND_LEAVE(CLR_E_INDEX_OUT_OF_RANGE); } - // file opened succesfully + // file opened successfully CLR_UINT32 written = 0; operationResult = f_write(&file, buffer, length, &written); if (operationResult != FR_OK) @@ -400,7 +400,7 @@ HRESULT Library_nf_sys_io_filesystem_System_IO_FileStream::GetLengthNative___I8_ if (operationResult == FR_OK) { - // file opened succesfully + // file opened successfully length = f_size(&file); // OK to close it diff --git a/targets/ChibiOS/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp b/targets/ChibiOS/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp index b7489a9e96..fb463ba031 100644 --- a/targets/ChibiOS/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp +++ b/targets/ChibiOS/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp @@ -336,7 +336,7 @@ bool CPU_GPIO_EnableInputPin( // pinNumber - Gpio pin number // InitialState - Initial state of pin // driveMode - Drive mode and resistors -// return - True if succesful, false invalid pin, pin not putput, invalid drive mode for ouptput +// return - True if successful, false invalid pin, pin not putput, invalid drive mode for ouptput // bool CPU_GPIO_EnableOutputPin(GPIO_PIN pinNumber, GpioPinValue InitialState, GpioPinDriveMode driveMode) { diff --git a/targets/ChibiOS/_nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFolder.cpp b/targets/ChibiOS/_nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFolder.cpp index 6159d59654..ecd825399d 100644 --- a/targets/ChibiOS/_nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFolder.cpp +++ b/targets/ChibiOS/_nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFolder.cpp @@ -1092,7 +1092,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder:: } else { - // file created (or opened) succesfully + // file created (or opened) successfully // OK to close it SPIFFS_close(driveFs, fd); @@ -1177,7 +1177,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder:: if (operationResult == FR_OK) { - // file created (or opened) succesfully + // file created (or opened) successfully // OK to close it f_close(&file); @@ -1305,7 +1305,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder:: } else { - // file created (or opened) succesfully + // file created (or opened) successfully // OK to close it SPIFFS_close(driveFs, fd); diff --git a/targets/FreeRTOS/NXP/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp b/targets/FreeRTOS/NXP/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp index 9c7ba69d0d..a84c110b4b 100644 --- a/targets/FreeRTOS/NXP/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp +++ b/targets/FreeRTOS/NXP/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp @@ -463,7 +463,7 @@ bool CPU_GPIO_EnableInputPin( // pinNumber - Gpio pin number // InitialState - Initial state of pin // driveMode - Drive mode and resistors -// return - True if succesful, false invalid pin, pin not putput, invalid drive mode for ouptput +// return - True if successful, false invalid pin, pin not putput, invalid drive mode for ouptput // bool CPU_GPIO_EnableOutputPin(GPIO_PIN pinNumber, GpioPinValue InitialState, GpioPinDriveMode driveMode) { diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp index 2d8be67de7..0a1df860b5 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp @@ -383,7 +383,7 @@ bool CPU_GPIO_EnableInputPin( // pinNumber - Gpio pin number // InitialState - Initial state of pin // driveMode - Drive mode and resistors -// return - True if succesful, false invalid pin, pin not putput, invalid drive mode for ouptput +// return - True if successful, false invalid pin, pin not putput, invalid drive mode for ouptput // bool CPU_GPIO_EnableOutputPin(GPIO_PIN pinNumber, GpioPinValue InitialState, GpioPinDriveMode driveMode) { diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFile.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFile.cpp index bb3fc545ac..6e2ebcc389 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFile.cpp +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFile.cpp @@ -29,7 +29,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFile::DeleteFileNative // return allocated converted path, must be freed workingPath = ConvertToESP32Path(managedPath); - // Delete folder, 0=succesfull + // Delete folder, 0=successful operationResult = unlink(workingPath); if (operationResult < 0) operationResult = errno; @@ -77,7 +77,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFile::RenameFileNative desiredPath = stack.Arg1().DereferenceString()->StringText(); desiredWorkingPath = ConvertToESP32Path(desiredPath); - // rename folder, 0=succesfull + // rename folder, 0=successful operationResult = rename(workingPath, desiredWorkingPath); if (operationResult < 0) operationResult = errno; diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFolder.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFolder.cpp index 3ae8099921..cd8270c6f2 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFolder.cpp +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFolder.cpp @@ -225,7 +225,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder:: // malloc stringBuffer to work with FS stringBuffer = (char *)platform_malloc(FF_LFN_BUF + 1); - // sanity check for successfull malloc + // sanity check for successful malloc if (stringBuffer == NULL) { // failed to allocate memory @@ -393,7 +393,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder:: stringBuffer = (char *)platform_malloc(FF_LFN_BUF + 1); workingBuffer = (char *)platform_malloc(2 * FF_LFN_BUF + 1); - // sanity check for successfull malloc + // sanity check for successful malloc if (stringBuffer == NULL || workingBuffer == NULL) { // failed to allocate memory @@ -578,7 +578,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder:: stringBuffer = (char *)platform_malloc(FF_LFN_BUF + 1); workingBuffer = (char *)platform_malloc(2 * FF_LFN_BUF + 1); - // sanity check for successfull malloc + // sanity check for successful malloc if (stringBuffer == NULL || workingBuffer == NULL) { // failed to allocate memory @@ -732,7 +732,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder:: // setup file path filePath = (char *)platform_malloc(2 * FF_LFN_BUF + 1); - // sanity check for successfull malloc + // sanity check for successful malloc if (filePath == NULL) { // failed to allocate memory @@ -802,7 +802,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder:: file = fopen(workingPath, mode); if (file) { - // file created (or opened) succesfully + // file created (or opened) successfully // OK to close it fclose(file); @@ -890,7 +890,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder:: folderPath = (char *)platform_malloc(2 * FF_LFN_BUF + 1); - // sanity check for successfull malloc + // sanity check for successful malloc if (folderPath == NULL) { // failed to allocate memory @@ -1024,7 +1024,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder::DeleteFolderNa // return allocated converted path, must be freed workingPath = ConvertToESP32Path(managedPath); - // Delete folder, 0=succesfull + // Delete folder, 0=successful operationResult = rmdir(workingPath); if (operationResult < 0) operationResult = errno; @@ -1083,7 +1083,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder::RenameFolderNa desiredPath = stack.Arg1().DereferenceString()->StringText(); desiredWorkingPath = ConvertToESP32Path(desiredPath); - // rename folder, 0=succesfull + // rename folder, 0=successful operationResult = rename(workingPath, desiredWorkingPath); if (operationResult < 0) operationResult = errno; @@ -1143,7 +1143,7 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder::GetFolderNativ folderPath = (char *)platform_malloc(2 * FF_LFN_BUF + 1); - // sanity check for successfull malloc + // sanity check for successful malloc if (folderPath == NULL) { // failed to allocate memory diff --git a/targets/TI_SimpleLink/_common/targetHAL_ConfigurationManager_CC13x2_26x2.cpp b/targets/TI_SimpleLink/_common/targetHAL_ConfigurationManager_CC13x2_26x2.cpp index e8ecc8d01e..01f7149327 100644 --- a/targets/TI_SimpleLink/_common/targetHAL_ConfigurationManager_CC13x2_26x2.cpp +++ b/targets/TI_SimpleLink/_common/targetHAL_ConfigurationManager_CC13x2_26x2.cpp @@ -34,7 +34,7 @@ void *ConfigurationManagerCC13x2_26x2_FindNetworkConfigurationBlocks() // allocate memory for file list buffer fileList = (slGetfileList_t *)platform_malloc(sizeof(slGetfileList_t) * NETWORK_CONFIG_MAX_COUNT); - // check succesfull malloc + // check successful malloc if (fileList == NULL) { return NULL; diff --git a/targets/TI_SimpleLink/_common/targetHAL_ConfigurationManager_CC32xx.cpp b/targets/TI_SimpleLink/_common/targetHAL_ConfigurationManager_CC32xx.cpp index bdc2b4e824..11ece6992b 100644 --- a/targets/TI_SimpleLink/_common/targetHAL_ConfigurationManager_CC32xx.cpp +++ b/targets/TI_SimpleLink/_common/targetHAL_ConfigurationManager_CC32xx.cpp @@ -34,7 +34,7 @@ void *ConfigurationManagerCC32xx_FindNetworkConfigurationBlocks() // allocate memory for file list buffer fileList = (slGetfileList_t *)platform_malloc(sizeof(slGetfileList_t) * NETWORK_CONFIG_MAX_COUNT); - // check succesfull malloc + // check successful malloc if (fileList == NULL) { return NULL; diff --git a/targets/TI_SimpleLink/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp b/targets/TI_SimpleLink/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp index 608ef4dc19..eea05c7150 100644 --- a/targets/TI_SimpleLink/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp +++ b/targets/TI_SimpleLink/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp @@ -515,7 +515,7 @@ bool CPU_GPIO_EnableInputPin( // pinNumber - Gpio pin number // InitialState - Initial state of pin // driveMode - Drive mode and resistors -// return - True if succesful, false invalid pin, pin not putput, invalid drive mode for ouptput +// return - True if successful, false invalid pin, pin not putput, invalid drive mode for ouptput // bool CPU_GPIO_EnableOutputPin(GPIO_PIN pinNumber, GpioPinValue InitialState, GpioPinDriveMode driveMode) { diff --git a/targets/win32/Include/TargetPAL_BlockStorage.h b/targets/win32/Include/TargetPAL_BlockStorage.h index 9199865abd..4ed9ce6e48 100644 --- a/targets/win32/Include/TargetPAL_BlockStorage.h +++ b/targets/win32/Include/TargetPAL_BlockStorage.h @@ -338,7 +338,7 @@ // // Input: // // // // Returns: -// // true if succesful; false if not +// // true if successful; false if not // // // // Remarks: // // No other functions in this interface may be called @@ -351,7 +351,7 @@ // // Initializes a given block device for use // // // // Returns: -// // true if succesful; false if not +// // true if successful; false if not // // // // Remarks: // // De initializes the device when no longer needed @@ -379,7 +379,7 @@ // // for the extra sector information. // // // // Returns: -// // true if succesful; false if not +// // true if successful; false if not // // // // Remarks: // // This function reads the number of sectors specified from the device. @@ -409,7 +409,7 @@ // // for the extra sector information. // // // // Returns: -// // true if succesful; false if not +// // true if successful; false if not // // // // Remarks: // // This function reads the number of sectors specified from the device. @@ -456,7 +456,7 @@ // // Address - Logical Sector Address // // // // Returns: -// // true if succesful; false if not +// // true if successful; false if not // // // // Remarks: // // Erases the block containing the sector address specified. @@ -507,7 +507,7 @@ // // Initializes a given block device for use // // // // Returns: -// // true if succesful; false if not +// // true if successful; false if not // // // // Remarks: // // No other functions in this interface may be called @@ -520,7 +520,7 @@ // // Initializes a given block device for use // // // // Returns: -// // true if succesful; false if not +// // true if successful; false if not // // // // Remarks: // // De initializes the device when no longer needed @@ -548,7 +548,7 @@ // // for the extra sector information. // // // // Returns: -// // true if succesful; false if not +// // true if successful; false if not // // // // Remarks: // // This function reads the number of sectors specified from the device. @@ -581,7 +581,7 @@ // // for the extra sector information. // // // // Returns: -// // true if succesful; false if not +// // true if successful; false if not // // // // Remarks: // // This function reads the number of sectors specified from the device. @@ -641,7 +641,7 @@ // // Address - Logical Sector Address // // // // Returns: -// // true if succesful; false if not +// // true if successful; false if not // // // // Remarks: // // Erases the block containing the sector address specified.