Skip to content

Commit

Permalink
Fix spelling of "successful" in comments (#2054)
Browse files Browse the repository at this point in the history
***NO_CI***
  • Loading branch information
networkfusion authored Sep 27, 2021
1 parent 58a5dc9 commit ddcabd4
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion src/CLR/Include/WireProtocol_HAL_Interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
54 changes: 27 additions & 27 deletions src/PAL/COM/ComDirector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,56 @@

#include <nanoPAL.h>

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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/PAL/Include/nanoPAL_BlockStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion targets/ChibiOS/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
Loading

0 comments on commit ddcabd4

Please sign in to comment.