diff --git a/applib-targets/emscripten/emscripten_jerry_api.c b/applib-targets/emscripten/emscripten_jerry_api.c index 2bc5eef9..48980020 100644 --- a/applib-targets/emscripten/emscripten_jerry_api.c +++ b/applib-targets/emscripten/emscripten_jerry_api.c @@ -558,7 +558,7 @@ jerry_size_t jerry_object_to_string_to_utf8_char_buffer(const jerry_value_t obje return len; } -// FIXME: PBL-43551 Propery CESU-8 => UTF-8 conversion. +// FIXME: PBL-43551 Property CESU-8 => UTF-8 conversion. jerry_size_t jerry_object_to_string_to_char_buffer(const jerry_value_t object, jerry_char_t *buffer_p, jerry_size_t buffer_size) { diff --git a/applib-targets/emscripten/emscripten_resources.c b/applib-targets/emscripten/emscripten_resources.c index 8ab1bd44..50f52ed1 100644 --- a/applib-targets/emscripten/emscripten_resources.c +++ b/applib-targets/emscripten/emscripten_resources.c @@ -160,7 +160,7 @@ static bool prv_get_resource(uint32_t resource_id, Resource *res) { if ((entry.resource_id != resource_id) || (entry.length == 0)) { // empty resource - printf("%s: Invalid resourcel for %d\n", __FILE__, resource_id); + printf("%s: Invalid resource for %d\n", __FILE__, resource_id); return false; } diff --git a/applib-targets/emscripten/emscripten_resources.h b/applib-targets/emscripten/emscripten_resources.h index 40239ccb..653877f1 100644 --- a/applib-targets/emscripten/emscripten_resources.h +++ b/applib-targets/emscripten/emscripten_resources.h @@ -22,7 +22,7 @@ #include "resource/resource.h" -// transformed to int to avoid surpises between C->JS +// transformed to int to avoid surprises between C->JS typedef int (*ResourceReadCb)(int offset, uint8_t *buf, int num_bytes); typedef int (*ResourceGetSizeCb)(void); diff --git a/checkers/MutexChecker.cpp b/checkers/MutexChecker.cpp index b7f65d6b..d91f81f2 100644 --- a/checkers/MutexChecker.cpp +++ b/checkers/MutexChecker.cpp @@ -28,7 +28,7 @@ namespace std { } /* This analyzer suffers from the major limitation that most of the mutexes in Pebble are globals, - * so all symbols and MemRegions refering to the mutexes are invalidated every time an unknown + * so all symbols and MemRegions referring to the mutexes are invalidated every time an unknown * function is called. This analyzer instead associates mutexes with the declaration of their * variables, which has the obvious limitation of not catching when mutexes are passed as * arguments (which fortunately never? happens in pebble). diff --git a/docs/common.dox b/docs/common.dox index 045082be..c71caa16 100644 --- a/docs/common.dox +++ b/docs/common.dox @@ -191,11 +191,11 @@ This function affects subsequent calls to \ref rand() to produce a sequence of n `setlocale` can be used to: - set the app's locale to a specific locale: `setlocale(LC_ALL, "en_CA")` - set the app's locale to the system locale: `setlocale(LC_ALL, "")` - - get the app's curent locale: `setlocale(LC_ALL, NULL)` + - get the app's current locale: `setlocale(LC_ALL, NULL)` \param category The category of routines for which to set the locale \param locale The ISO formatted locale to use, or "" for the system locale -\return the locale after the change is applied, NULL on failure (e.g. unsuported category) +\return the locale after the change is applied, NULL on failure (e.g. unsupported category) \note Currently, we only support two categories: LC_ALL and LC_TIME @} @@ -421,7 +421,7 @@ original allocation or the new size into the newly allocated buffer. \return The destination buffer dest \fn char *strncat(char *dest, const char *src, size_t n) -\brief Concatenates up to n bytes from the string in src to the end of the string pointed by dest and null terminates dest. There should be no overlap of dest and src in memeory. +\brief Concatenates up to n bytes from the string in src to the end of the string pointed by dest and null terminates dest. There should be no overlap of dest and src in memory. \param dest The destination buffer with enough space for src beyond the null character \param src The source string \param n The maximum number of bytes to copy diff --git a/docs/pulse2/history.md b/docs/pulse2/history.md index 7d35d579..3f90cb72 100644 --- a/docs/pulse2/history.md +++ b/docs/pulse2/history.md @@ -100,7 +100,7 @@ with the target address and data. The receiver performs the write and sends an acknowledgement with the address. If the sender doesn't receive an acknowledgement within some timeout, it re-sends the write command. Any number of write commands and acknowledgements can be in-flight -simulatneously. If a write completes but the acknowledgement is lost in +simultaneously. If a write completes but the acknowledgement is lost in transit, the sender can re-send the same write command and the receiver can naively overwrite the data without issue due to the idempotence of flash writes. @@ -149,7 +149,7 @@ Applications can choose to communicate with either best-effort datagram service (like PULSEv1), or reliable datagram service that guarantees in-order datagram delivery. Having the reliable transport available made it very easy to implement prompt commands over PULSEv2. And it was -also suprisingly easy to implement a PULSEv2 transport for the Pebble +also surprisingly easy to implement a PULSEv2 transport for the Pebble Protocol, which allows developers and test automation to interact with bigboards using libpebble2 and pebble-tool, exactly like they can with emulators and sealed watches connected to phones. diff --git a/docs/tasks.txt b/docs/tasks.txt index 2b5ed8b5..8b5b9a1d 100644 --- a/docs/tasks.txt +++ b/docs/tasks.txt @@ -1,4 +1,4 @@ -FreeRTOS lets us create tasks, which are independant threads of execution. We create a few ourselves, and more are created internally by FreeRTOS. We have pre-emption enabled in our FreeRTOS configuration, so we must be mindful of which other tasks are mucking with the same data. This document describes the tasks that exist in our system. +FreeRTOS lets us create tasks, which are independent threads of execution. We create a few ourselves, and more are created internally by FreeRTOS. We have pre-emption enabled in our FreeRTOS configuration, so we must be mindful of which other tasks are mucking with the same data. This document describes the tasks that exist in our system. FreeRTOS Tasks ============== @@ -10,7 +10,7 @@ Timers that are registered using our timer infrastructure are executed on this t "IDLE" - The idle task ---------------------- -This is a special task used by the FreeRTOS scheduler. It's defined at it's own priority level which is at the lowest priority. If no other task is ready to run, either due to waiting on a semaphore or waiting using vTaskDelay (or something like that), the idle task is chosen to run instead. +This is a special task used by the FreeRTOS scheduler. It's defined at its own priority level which is at the lowest priority. If no other task is ready to run, either due to waiting on a semaphore or waiting using vTaskDelay (or something like that), the idle task is chosen to run instead. We have modified FreeRTOS such that if we're in the idle task, we enter a lower power mode, either sleep or stop. Stop mode is special in that peripheral clocks are shut down when we go into stop and are not automatically turned back on when we leave stop mode. This means we have to go through and turn them all back on. This is what the `register_stop_mode_resume_callback` function does. It allows individual drivers to register callbacks that are called when we leave stop from the idle thread. This comes with a caveat though. Since the idle thread only ever runs when there's nothing else to run, the scheduler assumes that there is always a task to run. This means that if the idle task is stopped or delayed for any reason, the scheduler will explode. Therefore you are not permitted to do operations that may stop the task's execution from within the resume callback. @@ -34,4 +34,4 @@ This task is created for the currently running app. No task is created for the l Open Questions ============== -Which tasks are allowed to manipulate the window state? What if the launcher wants to push a notification window at the same time as an app pushes it's own window? +Which tasks are allowed to manipulate the window state? What if the launcher wants to push a notification window at the same time as an app pushes its own window? diff --git a/ftdi_reload.sh b/ftdi_reload.sh index c172d7fd..7ed492bd 100755 --- a/ftdi_reload.sh +++ b/ftdi_reload.sh @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This script works around an issue in MacOS 10.9 (Mavericks) that causes +# This script works around an issue in macOS 10.9 (Mavericks) that causes # it to go back to the original Apple USB FTDI drivers after a reboot. sudo kextunload /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBFTDI.kext sudo kextcache -system-prelinked-kernel diff --git a/ftdi_unload.sh b/ftdi_unload.sh index 3c76527b..06378f47 100755 --- a/ftdi_unload.sh +++ b/ftdi_unload.sh @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This script works around an issue in MacOS 10.9 (Mavericks) that causes +# This script works around an issue in macOS 10.9 (Mavericks) that causes # it to go back to the original Apple USB FTDI drivers after a reboot. sudo kextunload /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBFTDI.kext sudo kextunload /System/Library/Extensions/FTDIUSBSerialDriver.kext diff --git a/platform/robert/boot/src/board/board.h b/platform/robert/boot/src/board/board.h index c9b8d558..056976cd 100644 --- a/platform/robert/boot/src/board/board.h +++ b/platform/robert/boot/src/board/board.h @@ -28,7 +28,7 @@ #define GPIO_Port_NULL ((GPIO_TypeDef *) 0) #define GPIO_Pin_NULL ((uint16_t)0x0000) -// This is generated in order to faciliate the check within the IRQ_MAP macro below +// This is generated in order to facilitate the check within the IRQ_MAP macro below enum { #define IRQ_DEF(num, irq) IS_VALID_IRQ__##irq, #include "irq_stm32f7.def" diff --git a/platform/robert/boot/src/drivers/display/boot_fpga.c b/platform/robert/boot/src/drivers/display/boot_fpga.c index 3d44ce83..1aee20aa 100644 --- a/platform/robert/boot/src/drivers/display/boot_fpga.c +++ b/platform/robert/boot/src/drivers/display/boot_fpga.c @@ -140,7 +140,7 @@ void display_init(void) { // Work around an issue which some boards exhibit where the FPGA ring // oscillator can start up with higher harmonics, massively overclocking the - // design and causing malfunction. When this occurrs, the draw-scene command + // design and causing malfunction. When this occurs, the draw-scene command // will not work, asserting BUSY indefinitely but never updating the display. // Other commands such as display-on and display-off are less affected by the // overclocking, so the display can be turned on while the FPGA is in this diff --git a/platform/robert/boot/src/drivers/max14690_pmic.c b/platform/robert/boot/src/drivers/max14690_pmic.c index 3713fc32..5ec10164 100644 --- a/platform/robert/boot/src/drivers/max14690_pmic.c +++ b/platform/robert/boot/src/drivers/max14690_pmic.c @@ -239,7 +239,7 @@ bool pmic_enable_battery_measure(void) { bool pmic_disable_battery_measure(void) { bool result = prv_set_mon_config_register(0); - // Releases the lock that was previously aquired in pmic_enable_battery_measure. + // Releases the lock that was previously acquired in pmic_enable_battery_measure. prv_mon_config_unlock(); return result; diff --git a/platform/robert/boot/src/fw_copy.c b/platform/robert/boot/src/fw_copy.c index adeb0c67..5a8817eb 100644 --- a/platform/robert/boot/src/fw_copy.c +++ b/platform/robert/boot/src/fw_copy.c @@ -138,7 +138,7 @@ void fw_copy_check_update_fw(void) { if (boot_bit_test(BOOT_BIT_NEW_FW_UPDATE_IN_PROGRESS)) { dbgserial_putstr("Our previous firmware update failed, aborting update."); - // Pretend like the new firmware bit wasn't set afterall. We'll just run the + // Pretend like the new firmware bit wasn't set after all. We'll just run the // previous code, whether that was normal firmware or the recovery firmware. boot_bit_clear(BOOT_BIT_NEW_FW_UPDATE_IN_PROGRESS); boot_bit_clear(BOOT_BIT_NEW_FW_AVAILABLE); @@ -165,7 +165,7 @@ void fw_copy_check_update_fw(void) { break; case UPDATE_FW_ERROR_MICRO_FLASH_MANGLED: // We've broken our internal flash when trying to update our normal - // firmware. Fall back immediately to the recovery firmare. + // firmware. Fall back immediately to the recovery firmware. boot_bit_set(BOOT_BIT_FW_START_FAIL_STRIKE_ONE); boot_bit_set(BOOT_BIT_FW_START_FAIL_STRIKE_TWO); system_reset(); diff --git a/platform/robert/boot/src/stm32f_flash_boot.ld b/platform/robert/boot/src/stm32f_flash_boot.ld index 3219c141..f2475e2e 100644 --- a/platform/robert/boot/src/stm32f_flash_boot.ld +++ b/platform/robert/boot/src/stm32f_flash_boot.ld @@ -70,28 +70,28 @@ SECTIONS It is one task of the startup to copy the initial values from FLASH to RAM. */ .data : { . = ALIGN(4); - /* This is used by the startup in order to initialize the .data secion */ + /* This is used by the startup in order to initialize the .data section */ __data_start = .; *(.data) *(.data.*) . = ALIGN(4); - __data_end = .; /* This is used by the startup in order to initialize the .data secion */ + __data_end = .; /* This is used by the startup in order to initialize the .data section */ } >RAM AT>FLASH __data_load_start = LOADADDR(.data); /* This is the uninitialized data section */ .bss (NOLOAD) : { . = ALIGN(4); - __bss_start = .; /* This is used by the startup in order to initialize the .bss secion */ + __bss_start = .; /* This is used by the startup in order to initialize the .bss section */ *(.bss) *(.bss.*) *(COMMON) . = ALIGN(4); - __bss_end = .; /* This is used by the startup in order to initialize the .bss secion */ + __bss_end = .; /* This is used by the startup in order to initialize the .bss section */ } >RAM .stack (NOLOAD) : { diff --git a/platform/robert/boot/src/util/delay.c b/platform/robert/boot/src/util/delay.c index 1f32d12f..019cae79 100644 --- a/platform/robert/boot/src/util/delay.c +++ b/platform/robert/boot/src/util/delay.c @@ -39,7 +39,7 @@ void delay_us(uint32_t us) { void delay_ms(uint32_t millis) { // delay_us(millis*1000) is not used because a long delay could easily - // overflow the veriable. Without the outer loop, a delay of even five + // overflow the variable. Without the outer loop, a delay of even five // seconds would overflow. while (millis--) { delay_us(1000); diff --git a/platform/robert/boot/src/util/math.h b/platform/robert/boot/src/util/math.h index 052d82bb..1e2c02ee 100644 --- a/platform/robert/boot/src/util/math.h +++ b/platform/robert/boot/src/util/math.h @@ -64,7 +64,7 @@ int ceil_log_two(uint32_t n); ) /** - * Compute the next backoff interval using a bounded binary expoential backoff formula. + * Compute the next backoff interval using a bounded binary exponential backoff formula. * * @param[in,out] attempt The number of retries performed so far. This count will be incremented * by the function. diff --git a/platform/robert/boot/src/vector_table.c b/platform/robert/boot/src/vector_table.c index c861e100..c488d71f 100644 --- a/platform/robert/boot/src/vector_table.c +++ b/platform/robert/boot/src/vector_table.c @@ -53,7 +53,7 @@ __attribute__((__noreturn__)) void Default_Handler(void) { // All these functions are weak references to the Default_Handler, // so if we define a handler in elsewhere in the firmware, these -// will be overriden +// will be overridden #define ALIAS(sym) __attribute__((__weak__, __alias__(sym))) ALIAS("Default_Handler") void NMI_Handler(void); ALIAS("Default_Handler") void HardFault_Handler(void); diff --git a/platform/robert/boot/waftools/binary_header.py b/platform/robert/boot/waftools/binary_header.py index 09790729..e0104bfc 100644 --- a/platform/robert/boot/waftools/binary_header.py +++ b/platform/robert/boot/waftools/binary_header.py @@ -97,7 +97,7 @@ def process_binary_header(self): sparse length encoding (see waftools/sparse_length_encoding.py). The name of the array variable defaults to the source file name with all - characters that are invaid C identifiers replaced with underscores. The name + characters that are invalid C identifiers replaced with underscores. The name can be explicitly specified by setting the *array_name* parameter. This method overrides the processing by diff --git a/platform/robert/boot/waftools/objcopy.py b/platform/robert/boot/waftools/objcopy.py index 4385f2aa..50c4f407 100644 --- a/platform/robert/boot/waftools/objcopy.py +++ b/platform/robert/boot/waftools/objcopy.py @@ -17,7 +17,7 @@ """ Support for converting linked targets to ihex, srec or binary files using -objcopy. Use the 'objcopy' feature in conjuction with the 'cc' or 'cxx' +objcopy. Use the 'objcopy' feature in conjunction with the 'cc' or 'cxx' feature. The 'objcopy' feature uses the following attributes: objcopy_bfdname Target object format name (eg. ihex, srec, binary). diff --git a/platform/robert/boot/waftools/sparse_length_encoding.py b/platform/robert/boot/waftools/sparse_length_encoding.py index 452da5ec..b06d459d 100755 --- a/platform/robert/boot/waftools/sparse_length_encoding.py +++ b/platform/robert/boot/waftools/sparse_length_encoding.py @@ -58,8 +58,8 @@ def encode(source): frequency.update(source) # most_common() doesn't define what happens if there's a tie in frequency. Let's always pick # the lowest value of that frequency to make the encoding predictable. - occurences = frequency.most_common() - escape = min(x[0] for x in occurences if x[1] == occurences[-1][1]) + occurrences = frequency.most_common() + escape = min(x[0] for x in occurrences if x[1] == occurrences[-1][1]) yield escape for b, g in groupby(source): if b == b'\0': diff --git a/platform/robert/boot/wscript b/platform/robert/boot/wscript index ce22742d..ace7b792 100644 --- a/platform/robert/boot/wscript +++ b/platform/robert/boot/wscript @@ -24,7 +24,7 @@ def options(opt): help='Which board to build for (robert_bb, robert_bb2, cutts_bb, robert_evt)') opt.add_option('--nowatchdog', action='store_true', help='Disable automatic reboots when watchdog fires') - opt.add_option('--display_test', action='store_true', help='Enables the diplsay test loop') + opt.add_option('--display_test', action='store_true', help='Enables the display test loop') def configure(conf): diff --git a/platform/silk/boot/src/fw_copy.c b/platform/silk/boot/src/fw_copy.c index b4728773..211017b6 100644 --- a/platform/silk/boot/src/fw_copy.c +++ b/platform/silk/boot/src/fw_copy.c @@ -143,7 +143,7 @@ void check_update_fw(void) { if (boot_bit_test(BOOT_BIT_NEW_FW_UPDATE_IN_PROGRESS)) { dbgserial_putstr("Our previous firmware update failed, aborting update."); - // Pretend like the new firmware bit wasn't set afterall. We'll just run the + // Pretend like the new firmware bit wasn't set after all. We'll just run the // previous code, whether that was normal firmware or the recovery firmware. boot_bit_clear(BOOT_BIT_NEW_FW_UPDATE_IN_PROGRESS); boot_bit_clear(BOOT_BIT_NEW_FW_AVAILABLE); @@ -170,7 +170,7 @@ void check_update_fw(void) { break; case UPDATE_FW_ERROR_MICRO_FLASH_MANGLED: // We've broken our internal flash when trying to update our normal - // firmware. Fall back immediately to the recovery firmare. + // firmware. Fall back immediately to the recovery firmware. boot_bit_set(BOOT_BIT_FW_START_FAIL_STRIKE_ONE); boot_bit_set(BOOT_BIT_FW_START_FAIL_STRIKE_TWO); system_reset(); diff --git a/platform/silk/boot/src/stm32f_flash_boot.ld.in b/platform/silk/boot/src/stm32f_flash_boot.ld.in index 251733c9..d02ab872 100644 --- a/platform/silk/boot/src/stm32f_flash_boot.ld.in +++ b/platform/silk/boot/src/stm32f_flash_boot.ld.in @@ -16,7 +16,7 @@ PROVIDE ( _Stack_Size = __Stack_Size ) ; __Stack_Init = _estack - __Stack_Size ; -/*"PROVIDE" allows to easily override these values from an object file or the commmand line.*/ +/*"PROVIDE" allows to easily override these values from an object file or the command line.*/ PROVIDE ( _Stack_Init = __Stack_Init ) ; /* @@ -96,28 +96,28 @@ SECTIONS .data : AT ( _sidata ) { . = ALIGN(4); - /* This is used by the startup in order to initialize the .data secion */ + /* This is used by the startup in order to initialize the .data section */ _sdata = .; *(.data) *(.data.*) . = ALIGN(4); - _edata = .; /* This is used by the startup in order to initialize the .data secion */ + _edata = .; /* This is used by the startup in order to initialize the .data section */ } >RAM /* This is the uninitialized data section */ .bss : { . = ALIGN(4); - _sbss = .; /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; /* This is used by the startup in order to initialize the .bss section */ *(.bss) *(.bss.*) *(COMMON) . = ALIGN(4); - _ebss = .; /* This is used by the startup in order to initialize the .bss secion */ + _ebss = .; /* This is used by the startup in order to initialize the .bss section */ } >RAM .stack : diff --git a/platform/silk/boot/src/util/delay.c b/platform/silk/boot/src/util/delay.c index f678efd5..0b3364da 100644 --- a/platform/silk/boot/src/util/delay.c +++ b/platform/silk/boot/src/util/delay.c @@ -41,7 +41,7 @@ void NOINLINE delay_us(uint32_t us) { void delay_ms(uint32_t millis) { // delay_us(millis*1000) is not used because a long delay could easily - // overflow the veriable. Without the outer loop, a delay of even five + // overflow the variable. Without the outer loop, a delay of even five // seconds would overflow. while (millis--) { delay_us(1000); diff --git a/platform/silk/boot/waftools/binary_header.py b/platform/silk/boot/waftools/binary_header.py index 827c11e5..cb52b896 100644 --- a/platform/silk/boot/waftools/binary_header.py +++ b/platform/silk/boot/waftools/binary_header.py @@ -85,7 +85,7 @@ def process_binary_header(self): file is treated as a raw binary file. The name of the array variable defaults to the source file name with all - characters that are invaid C identifiers replaced with underscores. The name + characters that are invalid C identifiers replaced with underscores. The name can be explicitly specified by setting the *array_name* parameter. This method overrides the processing by diff --git a/platform/silk/boot/waftools/objcopy.py b/platform/silk/boot/waftools/objcopy.py index 97c4894d..a582d941 100644 --- a/platform/silk/boot/waftools/objcopy.py +++ b/platform/silk/boot/waftools/objcopy.py @@ -17,7 +17,7 @@ """ Support for converting linked targets to ihex, srec or binary files using -objcopy. Use the 'objcopy' feature in conjuction with the 'cc' or 'cxx' +objcopy. Use the 'objcopy' feature in conjunction with the 'cc' or 'cxx' feature. The 'objcopy' feature uses the following attributes: objcopy_bfdname Target object format name (eg. ihex, srec, binary). diff --git a/platform/snowy/boot/src/drivers/display/ice40lp.c b/platform/snowy/boot/src/drivers/display/ice40lp.c index 3aaaae3a..6a13a410 100644 --- a/platform/snowy/boot/src/drivers/display/ice40lp.c +++ b/platform/snowy/boot/src/drivers/display/ice40lp.c @@ -171,7 +171,7 @@ void display_power_disable(void) { //! //! Write a single byte synchronously to the display. Use this -//! sparingly, as it will tie up the micro duing the write. +//! sparingly, as it will tie up the micro during the write. //! void display_write_byte(uint8_t d) { // Block until the tx buffer is empty diff --git a/platform/snowy/boot/src/drivers/display/snowy_boot_fpga.c b/platform/snowy/boot/src/drivers/display/snowy_boot_fpga.c index 20f88e9e..7a76e717 100644 --- a/platform/snowy/boot/src/drivers/display/snowy_boot_fpga.c +++ b/platform/snowy/boot/src/drivers/display/snowy_boot_fpga.c @@ -224,7 +224,7 @@ void display_init(void) { // Work around an issue which some boards exhibit where the FPGA ring // oscillator can start up with higher harmonics, massively overclocking the - // design and causing malfunction. When this occurrs, the draw-scene command + // design and causing malfunction. When this occurs, the draw-scene command // will not work, asserting BUSY indefinitely but never updating the display. // Other commands such as display-on and display-off are less affected by the // overclocking, so the display can be turned on while the FPGA is in this diff --git a/platform/snowy/boot/src/drivers/flash/s29vs.h b/platform/snowy/boot/src/drivers/flash/s29vs.h index 2eb8c315..ac0f86dc 100644 --- a/platform/snowy/boot/src/drivers/flash/s29vs.h +++ b/platform/snowy/boot/src/drivers/flash/s29vs.h @@ -20,7 +20,7 @@ #include "drivers/flash.h" -//! An address in the flash address spac +//! An address in the flash address space typedef uint32_t FlashAddress; //! This is the memory mapped region that's mapped to the parallel flash. @@ -45,10 +45,10 @@ typedef enum S29VSCommand { } S29VSCommand; //! Arguments to the S29VSCommand_EraseSetup command -typedef enum S29VSCommandEraseAguments { - S29VSCommandEraseAguments_ChipErase = 0x10, - S29VSCommandEraseAguments_SectorErase = 0x30 -} S29VSCommandEraseAguments; +typedef enum S29VSCommandEraseArguments { + S29VSCommandEraseArguments_ChipErase = 0x10, + S29VSCommandEraseArguments_SectorErase = 0x30 +} S29VSCommandEraseArguments; //! The bitset stored in the status register, see flash_s29vs_read_status_register typedef enum S29VSStatusBit { diff --git a/platform/snowy/boot/src/drivers/pmic/max14690_pmic.c b/platform/snowy/boot/src/drivers/pmic/max14690_pmic.c index 806c7873..c34c951b 100644 --- a/platform/snowy/boot/src/drivers/pmic/max14690_pmic.c +++ b/platform/snowy/boot/src/drivers/pmic/max14690_pmic.c @@ -144,7 +144,7 @@ bool pmic_init(void) { return false; } - // If not written to whithin 5 seconds of power-on the PMIC will shut down. + // If not written to within 5 seconds of power-on the PMIC will shut down. //i2c_write_register(I2C_DEVICE_MAX14690, MAX14690_ADDR, PmicRegisters_HAND_SHK, 0x01); // Power up 3.2V rail @@ -261,7 +261,7 @@ bool pmic_enable_battery_measure(void) { bool pmic_disable_battery_measure(void) { bool result = prv_set_mon_config_register(0); - // Releases the lock that was previously aquired in pmic_enable_battery_measure. + // Releases the lock that was previously acquired in pmic_enable_battery_measure. prv_mon_config_unlock(); return result; @@ -327,7 +327,7 @@ static bool prv_is_alive(void) { return true; } else { PBL_LOG(LOG_LEVEL_DEBUG, - "Error: read max14690 whomai byte 0x%x, expecting 0x%x", val, 0x01); + "Error: read max14690 whoami byte 0x%x, expecting 0x%x", val, 0x01); return false; } } diff --git a/platform/snowy/boot/src/flash_region.h b/platform/snowy/boot/src/flash_region.h index b6367ff1..871669b2 100644 --- a/platform/snowy/boot/src/flash_region.h +++ b/platform/snowy/boot/src/flash_region.h @@ -53,7 +53,7 @@ #define FLASH_REGION_SYSTEM_RESOURCES_BEGIN 0x380000 #define FLASH_REGION_SYSTEM_RESOURCES_END 0x400000 // 512k -// FIXME: The addresses below here are hacky work arounds and hopefully not the final place +// FIXME: The addresses below here are hacky workarounds and hopefully not the final place // for these things. Hopefully many of them can move to the filesystem. Everything above here // should be pretty stable. diff --git a/platform/snowy/boot/src/fw_copy.c b/platform/snowy/boot/src/fw_copy.c index cd704537..e6e2d108 100644 --- a/platform/snowy/boot/src/fw_copy.c +++ b/platform/snowy/boot/src/fw_copy.c @@ -129,7 +129,7 @@ void check_update_fw(void) { if (boot_bit_test(BOOT_BIT_NEW_FW_UPDATE_IN_PROGRESS)) { dbgserial_putstr("Our previous firmware update failed, aborting update."); - // Pretend like the new firmware bit wasn't set afterall. We'll just run the + // Pretend like the new firmware bit wasn't set after all. We'll just run the // previous code, whether that was normal firmware or the recovery firmware. boot_bit_clear(BOOT_BIT_NEW_FW_UPDATE_IN_PROGRESS); boot_bit_clear(BOOT_BIT_NEW_FW_AVAILABLE); @@ -156,7 +156,7 @@ void check_update_fw(void) { break; case UPDATE_FW_ERROR_MICRO_FLASH_MANGLED: // We've broken our internal flash when trying to update our normal - // firmware. Fall back immediately to the recovery firmare. + // firmware. Fall back immediately to the recovery firmware. boot_bit_set(BOOT_BIT_FW_START_FAIL_STRIKE_ONE); boot_bit_set(BOOT_BIT_FW_START_FAIL_STRIKE_TWO); system_reset(); diff --git a/platform/snowy/boot/src/stm32f_flash_boot.ld.in b/platform/snowy/boot/src/stm32f_flash_boot.ld.in index de9d4ee4..6067f2b9 100644 --- a/platform/snowy/boot/src/stm32f_flash_boot.ld.in +++ b/platform/snowy/boot/src/stm32f_flash_boot.ld.in @@ -16,7 +16,7 @@ PROVIDE ( _Stack_Size = __Stack_Size ) ; __Stack_Init = _estack - __Stack_Size ; -/*"PROVIDE" allows to easily override these values from an object file or the commmand line.*/ +/*"PROVIDE" allows to easily override these values from an object file or the command line.*/ PROVIDE ( _Stack_Init = __Stack_Init ) ; /* @@ -96,28 +96,28 @@ SECTIONS .data : AT ( _sidata ) { . = ALIGN(4); - /* This is used by the startup in order to initialize the .data secion */ + /* This is used by the startup in order to initialize the .data section */ _sdata = .; *(.data) *(.data.*) . = ALIGN(4); - _edata = .; /* This is used by the startup in order to initialize the .data secion */ + _edata = .; /* This is used by the startup in order to initialize the .data section */ } >RAM /* This is the uninitialized data section */ .bss : { . = ALIGN(4); - _sbss = .; /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; /* This is used by the startup in order to initialize the .bss section */ *(.bss) *(.bss.*) *(COMMON) . = ALIGN(4); - _ebss = .; /* This is used by the startup in order to initialize the .bss secion */ + _ebss = .; /* This is used by the startup in order to initialize the .bss section */ } >RAM .stack : diff --git a/platform/snowy/boot/src/util/delay.c b/platform/snowy/boot/src/util/delay.c index 800711d1..4110ac6e 100644 --- a/platform/snowy/boot/src/util/delay.c +++ b/platform/snowy/boot/src/util/delay.c @@ -36,7 +36,7 @@ void delay_us(uint32_t us) { void delay_ms(uint32_t millis) { // delay_us(millis*1000) is not used because a long delay could easily - // overflow the veriable. Without the outer loop, a delay of even five + // overflow the variable. Without the outer loop, a delay of even five // seconds would overflow. while (millis--) { delay_us(1000); diff --git a/platform/snowy/boot/src/util/misc.h b/platform/snowy/boot/src/util/misc.h index 880b81fb..8e24d135 100644 --- a/platform/snowy/boot/src/util/misc.h +++ b/platform/snowy/boot/src/util/misc.h @@ -79,7 +79,7 @@ const char *bool_to_str(bool b); bool convert_bt_addr_hex_str_to_bd_addr(const char *hex_str, uint8_t *bd_addr, const unsigned int bd_addr_size); /** - * Compute the next backoff interval using a bounded binary expoential backoff formula. + * Compute the next backoff interval using a bounded binary exponential backoff formula. * * @param[in,out] attempt The number of retries performed so far. This count will be incremented by * the function. diff --git a/platform/snowy/boot/waftools/binary_header.py b/platform/snowy/boot/waftools/binary_header.py index e8256534..3f6543b1 100644 --- a/platform/snowy/boot/waftools/binary_header.py +++ b/platform/snowy/boot/waftools/binary_header.py @@ -84,7 +84,7 @@ def process_binary_header(self): file is treated as a raw binary file. The name of the array variable defaults to the source file name with all - characters that are invaid C identifiers replaced with underscores. The name + characters that are invalid C identifiers replaced with underscores. The name can be explicitly specified by setting the *array_name* parameter. This method overrides the processing by diff --git a/platform/snowy/boot/waftools/objcopy.py b/platform/snowy/boot/waftools/objcopy.py index c99fdc7e..3c000b1a 100644 --- a/platform/snowy/boot/waftools/objcopy.py +++ b/platform/snowy/boot/waftools/objcopy.py @@ -17,7 +17,7 @@ """ Support for converting linked targets to ihex, srec or binary files using -objcopy. Use the 'objcopy' feature in conjuction with the 'cc' or 'cxx' +objcopy. Use the 'objcopy' feature in conjunction with the 'cc' or 'cxx' feature. The 'objcopy' feature uses the following attributes: objcopy_bfdname Target object format name (eg. ihex, srec, binary). diff --git a/platform/tintin/boot/src/fw_copy.c b/platform/tintin/boot/src/fw_copy.c index fa26e335..e6ebd7ff 100644 --- a/platform/tintin/boot/src/fw_copy.c +++ b/platform/tintin/boot/src/fw_copy.c @@ -182,7 +182,7 @@ void check_update_fw(void) { if (boot_bit_test(BOOT_BIT_NEW_FW_UPDATE_IN_PROGRESS)) { dbgserial_putstr("Our previous firmware update failed, aborting update."); - // Pretend like the new firmware bit wasn't set afterall. We'll just run the + // Pretend like the new firmware bit wasn't set after all. We'll just run the // previous code, whether that was normal firmware or the recovery firmware. boot_bit_clear(BOOT_BIT_NEW_FW_UPDATE_IN_PROGRESS); boot_bit_clear(BOOT_BIT_NEW_FW_AVAILABLE); @@ -209,7 +209,7 @@ void check_update_fw(void) { break; case UPDATE_FW_ERROR_MICRO_FLASH_MANGLED: // We've broken our internal flash when trying to update our normal - // firmware. Fall back immediately to the recovery firmare. + // firmware. Fall back immediately to the recovery firmware. boot_bit_set(BOOT_BIT_FW_START_FAIL_STRIKE_ONE); boot_bit_set(BOOT_BIT_FW_START_FAIL_STRIKE_TWO); system_reset(); diff --git a/platform/tintin/boot/src/stm32f_flash_boot.ld.in b/platform/tintin/boot/src/stm32f_flash_boot.ld.in index 8e89448d..c57d5e4a 100644 --- a/platform/tintin/boot/src/stm32f_flash_boot.ld.in +++ b/platform/tintin/boot/src/stm32f_flash_boot.ld.in @@ -162,14 +162,14 @@ SECTIONS It is one task of the startup to copy the initial values from FLASH to RAM. */ .data : { . = ALIGN(4); - /* This is used by the startup in order to initialize the .data secion */ + /* This is used by the startup in order to initialize the .data section */ __data_start = .; *(.data) *(.data.*) . = ALIGN(4); - __data_end = .; /* This is used by the startup in order to initialize the .data secion */ + __data_end = .; /* This is used by the startup in order to initialize the .data section */ } >RAM AT>FLASH __data_load_start = LOADADDR(.data); @@ -177,14 +177,14 @@ SECTIONS .bss (NOLOAD) : { . = ALIGN(4); - __bss_start = .; /* This is used by the startup in order to initialize the .bss secion */ + __bss_start = .; /* This is used by the startup in order to initialize the .bss section */ *(.bss) *(.bss.*) *(COMMON) . = ALIGN(4); - __bss_end = .; /* This is used by the startup in order to initialize the .bss secion */ + __bss_end = .; /* This is used by the startup in order to initialize the .bss section */ } >RAM .stack (NOLOAD) : diff --git a/platform/tintin/boot/src/util/delay.c b/platform/tintin/boot/src/util/delay.c index 8d659bb7..2e4d33ba 100644 --- a/platform/tintin/boot/src/util/delay.c +++ b/platform/tintin/boot/src/util/delay.c @@ -41,7 +41,7 @@ void NOINLINE delay_us(uint32_t us) { void delay_ms(uint32_t millis) { // delay_us(millis*1000) is not used because a long delay could easily - // overflow the veriable. Without the outer loop, a delay of even five + // overflow the variable. Without the outer loop, a delay of even five // seconds would overflow. while (millis--) { delay_us(1000); diff --git a/platform/tintin/boot/waftools/binary_header.py b/platform/tintin/boot/waftools/binary_header.py index 827c11e5..cb52b896 100644 --- a/platform/tintin/boot/waftools/binary_header.py +++ b/platform/tintin/boot/waftools/binary_header.py @@ -85,7 +85,7 @@ def process_binary_header(self): file is treated as a raw binary file. The name of the array variable defaults to the source file name with all - characters that are invaid C identifiers replaced with underscores. The name + characters that are invalid C identifiers replaced with underscores. The name can be explicitly specified by setting the *array_name* parameter. This method overrides the processing by diff --git a/platform/tintin/boot/waftools/objcopy.py b/platform/tintin/boot/waftools/objcopy.py index 97c4894d..a582d941 100644 --- a/platform/tintin/boot/waftools/objcopy.py +++ b/platform/tintin/boot/waftools/objcopy.py @@ -17,7 +17,7 @@ """ Support for converting linked targets to ihex, srec or binary files using -objcopy. Use the 'objcopy' feature in conjuction with the 'cc' or 'cxx' +objcopy. Use the 'objcopy' feature in conjunction with the 'cc' or 'cxx' feature. The 'objcopy' feature uses the following attributes: objcopy_bfdname Target object format name (eg. ihex, srec, binary). diff --git a/python_libs/pblprog/loader/src/stm32f4_loader.ld b/python_libs/pblprog/loader/src/stm32f4_loader.ld index ba02ce40..bd6658be 100644 --- a/python_libs/pblprog/loader/src/stm32f4_loader.ld +++ b/python_libs/pblprog/loader/src/stm32f4_loader.ld @@ -59,28 +59,28 @@ SECTIONS It is one task of the startup to copy the initial values from FLASH to RAM. */ .data : { . = ALIGN(4); - /* This is used by the startup in order to initialize the .data secion */ + /* This is used by the startup in order to initialize the .data section */ __data_start = .; *(.data) *(.data.*) . = ALIGN(4); - __data_end = .; /* This is used by the startup in order to initialize the .data secion */ + __data_end = .; /* This is used by the startup in order to initialize the .data section */ } >RAM __data_load_start = LOADADDR(.data); /* This is the uninitialized data section */ .bss (NOLOAD) : { . = ALIGN(4); - __bss_start = .; /* This is used by the startup in order to initialize the .bss secion */ + __bss_start = .; /* This is used by the startup in order to initialize the .bss section */ *(.bss) *(.bss.*) *(COMMON) . = ALIGN(4); - __bss_end = .; /* This is used by the startup in order to initialize the .bss secion */ + __bss_end = .; /* This is used by the startup in order to initialize the .bss section */ } >RAM .stack (NOLOAD) : { diff --git a/python_libs/pblprog/loader/waftools/objcopy.py b/python_libs/pblprog/loader/waftools/objcopy.py index 4385f2aa..50c4f407 100644 --- a/python_libs/pblprog/loader/waftools/objcopy.py +++ b/python_libs/pblprog/loader/waftools/objcopy.py @@ -17,7 +17,7 @@ """ Support for converting linked targets to ihex, srec or binary files using -objcopy. Use the 'objcopy' feature in conjuction with the 'cc' or 'cxx' +objcopy. Use the 'objcopy' feature in conjunction with the 'cc' or 'cxx' feature. The 'objcopy' feature uses the following attributes: objcopy_bfdname Target object format name (eg. ihex, srec, binary). diff --git a/python_libs/pblprog/pebble/programmer/ftdi_swd.py b/python_libs/pblprog/pebble/programmer/ftdi_swd.py index b83e4596..efc7cbf6 100644 --- a/python_libs/pblprog/pebble/programmer/ftdi_swd.py +++ b/python_libs/pblprog/pebble/programmer/ftdi_swd.py @@ -30,7 +30,7 @@ class FTDISerialWireDebug(object): self._ftdi = None raise - # get the FTDI FIFO size and increase the chuncksize to match + # get the FTDI FIFO size and increase the chunksize to match self._ftdi_fifo_size = min(self._ftdi.fifo_sizes) self._ftdi.write_data_set_chunksize(self._ftdi_fifo_size) diff --git a/python_libs/pebble-commander/pebble/commander/_commands/imaging.py b/python_libs/pebble-commander/pebble/commander/_commands/imaging.py index 12c7a450..d6661311 100644 --- a/python_libs/pebble-commander/pebble/commander/_commands/imaging.py +++ b/python_libs/pebble-commander/pebble/commander/_commands/imaging.py @@ -28,7 +28,7 @@ from ..util import stm32_crc class PebbleFirmwareBinaryInfo(object): V1_STRUCT_VERSION = 1 - V1_STRUCT_DEFINTION = [ + V1_STRUCT_DEFINITION = [ ('20s', 'build_id'), ('L', 'version_timestamp'), ('32s', 'version_tag'), @@ -72,7 +72,7 @@ class PebbleFirmwareBinaryInfo(object): def _get_footer_struct(self): fmt = '<' + reduce(lambda s, t: s + t[0], - PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINTION, '') + PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINITION, '') return struct.Struct(fmt) def _get_footer_data_from_bin(self, path): @@ -83,7 +83,7 @@ class PebbleFirmwareBinaryInfo(object): return footer_data def _parse_footer_data(self, footer_data): - z = zip(PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINTION, + z = zip(PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINITION, self.struct.unpack(footer_data)) return {entry[1]: data for entry, data in z} diff --git a/python_libs/pebble-commander/pebble/commander/apps/flash_imaging.py b/python_libs/pebble-commander/pebble/commander/apps/flash_imaging.py index 5e54f4f3..c41d575f 100644 --- a/python_libs/pebble-commander/pebble/commander/apps/flash_imaging.py +++ b/python_libs/pebble-commander/pebble/commander/apps/flash_imaging.py @@ -50,7 +50,7 @@ class EraseCommand(object): if unpacked.address != self.address or unpacked.length != self.length: raise exceptions.ResponseParseError( 'Response does not match command: ' - 'address=%#.08x legnth=%d (expected %#.08x, %d)' % ( + 'address=%#.08x length=%d (expected %#.08x, %d)' % ( unpacked.address, unpacked.length, self.address, self.length)) return unpacked @@ -113,7 +113,7 @@ class CrcCommand(object): if unpacked.address != self.address or unpacked.length != self.length: raise exceptions.ResponseParseError( 'Response does not match command: ' - 'address=%#.08x legnth=%d (expected %#.08x, %d)' % ( + 'address=%#.08x length=%d (expected %#.08x, %d)' % ( unpacked.address, unpacked.length, self.address, self.length)) return unpacked diff --git a/python_libs/pebble-commander/pebble/commander/commander.py b/python_libs/pebble-commander/pebble/commander/commander.py index c69b613f..b11f9824 100644 --- a/python_libs/pebble-commander/pebble/commander/commander.py +++ b/python_libs/pebble-commander/pebble/commander/commander.py @@ -92,7 +92,7 @@ class PebbleCommander(object): `PebbleCommander` as the first argument, and the rest of the argument strings as subsequent arguments. For errors, `fn` should throw an exception. - # TODO: Probably make the return something structured instead of stringly typed. + # TODO: Probably make the return something structured instead of strongly typed. """ def decorator(fn): # Story time: @@ -151,7 +151,7 @@ class PebbleCommander(object): def send_prompt_command(self, cmd): """ Send a prompt command string. - Unfortunately this is indeed stringly typed, a better solution is necessary. + Unfortunately this is indeed strongly typed, a better solution is necessary. """ return self.connection.prompt.command_and_response(cmd) diff --git a/python_libs/pebble-loghash/pebble/loghashing/dehashing.py b/python_libs/pebble-loghash/pebble/loghashing/dehashing.py index 98ca9b82..bde69e3d 100644 --- a/python_libs/pebble-loghash/pebble/loghashing/dehashing.py +++ b/python_libs/pebble-loghash/pebble/loghashing/dehashing.py @@ -167,7 +167,7 @@ def dehash_str(hashed_info, lookup_dict): if formatted_string == hashed_info: formatted_string = lookup_dict.get(str(int(match.group('hash_key'), 16)), hashed_info) - # For each argument, substitute a C-style format specififier in the string + # For each argument, substitute a C-style format specifier in the string for arg in parse_args(match.group('arg_list')): formatted_string = FORMAT_TAG_PATTERN.sub(arg, formatted_string, 1) diff --git a/python_libs/pebble-loghash/test_dehashing.py b/python_libs/pebble-loghash/test_dehashing.py index d98863cf..bbd7d33e 100644 --- a/python_libs/pebble-loghash/test_dehashing.py +++ b/python_libs/pebble-loghash/test_dehashing.py @@ -108,7 +108,7 @@ def test_parse_args(): """ Test for parse_args() """ - # No `` delimted strings + # No `` delimited strings assert ["foo", "bar", "baz"] == parse_args("foo bar baz") # `` delimited strings diff --git a/python_libs/pulse2/pebble/pulse2/link.py b/python_libs/pulse2/pebble/pulse2/link.py index 4d25b563..a2b3995b 100644 --- a/python_libs/pulse2/pebble/pulse2/link.py +++ b/python_libs/pulse2/pebble/pulse2/link.py @@ -114,7 +114,7 @@ class Interface(object): return socket def unregister_socket(self, protocol): - '''Used by InterfaceSocket objets to unregister themselves when + '''Used by InterfaceSocket objects to unregister themselves when closing. ''' try: diff --git a/release-notes/chicken-nugget.txt b/release-notes/chicken-nugget.txt index 59a5704b..69111f1f 100644 --- a/release-notes/chicken-nugget.txt +++ b/release-notes/chicken-nugget.txt @@ -11,4 +11,4 @@ This archive contains v1.3 firmware for the Pebble E-Paper Watch. - 2v5 I2C driver bugfixes. - iPhone ACP stability improvements. - Text rendering performance improvements. - - Support for entering shippiing-mode (standby) via a Bluetooth command. + - Support for entering shipping-mode (standby) via a Bluetooth command. diff --git a/release-notes/ev2-4.txt b/release-notes/ev2-4.txt index 3aa1bb7e..617db531 100644 --- a/release-notes/ev2-4.txt +++ b/release-notes/ev2-4.txt @@ -30,7 +30,7 @@ This archive contains the EV2-4 software for the Pebble E-Paper Watch. included in the directory. For more information, please refer to the 'Flash imaging tools' section. - docs/spi_flash_imaging.txt: A document describing the protocol - used to load load data onto Pebble's SPI flash via + used to load data onto Pebble's SPI flash via the Serial UART diff --git a/release-notes/kiwiburger.md b/release-notes/kiwiburger.md index 85dbb763..2ce0f5db 100644 --- a/release-notes/kiwiburger.md +++ b/release-notes/kiwiburger.md @@ -8,7 +8,7 @@ What's New * Improved Notification UI - Allows multiple notifications to be viewed if they arrive within a short time frame * Improved Set Time UI -* Added the option of showing your current speed (as oppossed to your pace) in the RunKeeper application. +* Added the option of showing your current speed (as opposed to your pace) in the RunKeeper application. * Swapped next and previous track buttons in the music application. * Added the Simplicity watchface. * Removed the Fuzzy Time watchface (it is available through the watchapp library). diff --git a/release-notes/pebble_ev2-1_firmware.txt b/release-notes/pebble_ev2-1_firmware.txt index 7663bf85..4eb64292 100644 --- a/release-notes/pebble_ev2-1_firmware.txt +++ b/release-notes/pebble_ev2-1_firmware.txt @@ -17,7 +17,7 @@ device is started. Once the firmware has loaded, a new screen will appear with a small picture of a watch and the text "Please Connect to Phone". Please note -that the watch will not respond respond to button inputs while this +that the watch will not respond to button inputs while this screen is being displayed. Please contact ajw@getpebble.com with any questions. diff --git a/release/robert_mfg_release.sh b/release/robert_mfg_release.sh index 3b219200..4579c128 100755 --- a/release/robert_mfg_release.sh +++ b/release/robert_mfg_release.sh @@ -76,7 +76,7 @@ echo "${README_TEXT}" > ${OUT_DIR}/README.txt # Create the requirements.txt file echo "${REQUIREMENTS_TEXT}" > ${OUT_DIR}/requirements.txt -# Copy the scripts we're interested into the ouput directory +# Copy the scripts we're interested into the output directory mkdir -p ${OUT_DIR}/scripts cp tools/hdlc.py ${OUT_DIR}/scripts/ cp tools/binutils.py ${OUT_DIR}/scripts/ diff --git a/release/silk_mfg_release.sh b/release/silk_mfg_release.sh index 497b0e76..7666476a 100755 --- a/release/silk_mfg_release.sh +++ b/release/silk_mfg_release.sh @@ -79,7 +79,7 @@ echo "${README_TEXT}" > ${OUT_DIR}/README.txt # Create the requirements.txt file echo "${REQUIREMENTS_TEXT}" > ${OUT_DIR}/requirements.txt -# Copy the scripts we're interested into the ouput directory +# Copy the scripts we're interested into the output directory mkdir -p ${OUT_DIR}/scripts cp tools/hdlc.py ${OUT_DIR}/scripts/ cp tools/binutils.py ${OUT_DIR}/scripts/ diff --git a/resources/normal/base/images/Pebble_50x50_Day_seperator.svg b/resources/normal/base/images/Pebble_50x50_Day_separator.svg similarity index 100% rename from resources/normal/base/images/Pebble_50x50_Day_seperator.svg rename to resources/normal/base/images/Pebble_50x50_Day_separator.svg diff --git a/resources/normal/base/resource_map.json b/resources/normal/base/resource_map.json index 3f54df78..ca836d8e 100644 --- a/resources/normal/base/resource_map.json +++ b/resources/normal/base/resource_map.json @@ -1041,7 +1041,7 @@ { "type": "pdc", "name": "DAY_SEPARATOR_SMALL", - "file": "normal/base/images/Pebble_50x50_Day_seperator.svg" + "file": "normal/base/images/Pebble_50x50_Day_separator.svg" }, { "type": "pdc", diff --git a/sdk/include/_pkjs_message_wrapper.js b/sdk/include/_pkjs_message_wrapper.js index f411e3f3..653ee28f 100644 --- a/sdk/include/_pkjs_message_wrapper.js +++ b/sdk/include/_pkjs_message_wrapper.js @@ -351,7 +351,7 @@ if (this._getNextMessageType() !== "object") { // This is no longer our highest priority outgoing message. // Send that message instead, and this message will be left in the queue - // andrestarted when appropriate. + // and restarted when appropriate. this._resetCurrent(); this._sendNext(); return; diff --git a/sdk/tools/webpack/webpack-config.js.pytemplate b/sdk/tools/webpack/webpack-config.js.pytemplate index dd0714e5..ba5e84a3 100644 --- a/sdk/tools/webpack/webpack-config.js.pytemplate +++ b/sdk/tools/webpack/webpack-config.js.pytemplate @@ -1,5 +1,5 @@ //////////////////////////////////////////////////////////////////////////////// -// Template vars injected by projess_js.py: +// Template vars injected by process_js.py: // boolean const isSandbox = ${IS_SANDBOX}; diff --git a/sdk/waftools/pebble_sdk_common.py b/sdk/waftools/pebble_sdk_common.py index 8d2a9d6e..1e9c6b21 100644 --- a/sdk/waftools/pebble_sdk_common.py +++ b/sdk/waftools/pebble_sdk_common.py @@ -296,7 +296,7 @@ def _get_entry_point(ctx, js_type, waf_js_entry_point): def pbl_bundle(self, *k, **kw): """ This method is bound to the build context and is called by specifying `bld.pbl_bundle`. We - set the custome features `js` and `bundle` to run when this method is invoked. + set the custom features `js` and `bundle` to run when this method is invoked. :param self: the BuildContext object :param k: none expected :param kw: diff --git a/sdk/wscript b/sdk/wscript index e287172a..f0f7b1cb 100644 --- a/sdk/wscript +++ b/sdk/wscript @@ -35,7 +35,7 @@ def _generate_sdk_waf(ctx): for tool in sdk_waftools + shared_waftools: path = ctx.path.parent.find_node(tool) if path is None: - ctx.fatal("Trying to bundle non existent resource in pb-waf ({})".format(tool)) + ctx.fatal("Trying to bundle nonexistent resource in pb-waf ({})".format(tool)) pebble_waf_tools.append(path) # We cannot run this as a sub-wscript because we use a specific vendor-provided diff --git a/src/apps/bg_task_test/src/fg.c b/src/apps/bg_task_test/src/fg.c index 9142677c..e6b4ae36 100644 --- a/src/apps/bg_task_test/src/fg.c +++ b/src/apps/bg_task_test/src/fg.c @@ -169,7 +169,7 @@ void handle_init(void) { text_layer_set_text(text_layer, "? ? ?"); - // Subscribe to mesages published by the worker + // Subscribe to messages published by the worker app_worker_message_subscribe(steps_event_handler); // Subscribe to second ticks diff --git a/src/apps/ble_demo/src/ble_demo_scan.c b/src/apps/ble_demo/src/ble_demo_scan.c index 8a77fe09..85da1920 100644 --- a/src/apps/ble_demo/src/ble_demo_scan.c +++ b/src/apps/ble_demo/src/ble_demo_scan.c @@ -367,7 +367,7 @@ static void window_load(Window *window) { layer_add_child(window_layer, menu_layer_get_layer(s_menu_layer)); - // Start scanning. Advertisments will be delivered in the callback. + // Start scanning. Advertisements will be delivered in the callback. toggle_scan(); } diff --git a/src/apps/complex_animations/src/complex_animations.c b/src/apps/complex_animations/src/complex_animations.c index ec91502c..85d67120 100644 --- a/src/apps/complex_animations/src/complex_animations.c +++ b/src/apps/complex_animations/src/complex_animations.c @@ -74,7 +74,7 @@ static Animation *prv_create_custom_animation(void) { static void click_handler(ClickRecognizerRef recognizer, Window *window) { - // If the animation is still running, fast-foward to 300ms from the end + // If the animation is still running, fast-forward to 300ms from the end if (animation_is_scheduled(s_animation)) { uint32_t duration = animation_get_duration(s_animation, true, true); animation_set_elapsed(s_animation, duration - 300); @@ -142,7 +142,7 @@ static void click_handler(ClickRecognizerRef recognizer, Window *window) { } /* - // Exmple animation parameters: + // Example animation parameters: // Duration defaults to 250 ms animation_set_duration(&prop_animation->animation, 1000); diff --git a/src/apps/fps_test/src/fps_test.c b/src/apps/fps_test/src/fps_test.c index a63647da..127b1ac2 100644 --- a/src/apps/fps_test/src/fps_test.c +++ b/src/apps/fps_test/src/fps_test.c @@ -179,7 +179,7 @@ static void prv_window_load(Window *window) { // one image at the top left .topleft_layer, // and two menu layers .action_list1 and .action_list2 that overlay each other - // some hackery with the two menu layers goes on to keep their scroll offest in sync + // some hackery with the two menu layers goes on to keep their scroll offset in sync // and to have the inverter layer rendered only once const int16_t navbar_width = s_fps_topleft_bitmap.bounds.size.w; diff --git a/src/apps/health_api_test/src/health_api_test.c b/src/apps/health_api_test/src/health_api_test.c index cd2a806f..36b0d6f7 100644 --- a/src/apps/health_api_test/src/health_api_test.c +++ b/src/apps/health_api_test/src/health_api_test.c @@ -1033,7 +1033,7 @@ static void prv_debug_cmd_heart_rate_api(int index, void *context) { goto exit; } - // Test registring and cancelling a metric alert + // Test registering and cancelling a metric alert HealthMetricAlert *alert = health_service_register_metric_alert(HealthMetricHeartRateBPM, 10); APP_LOG(APP_LOG_LEVEL_DEBUG, "Result from register_metric_alert: %p", alert); if (alert == NULL) { diff --git a/src/fw/applib/app_message/app_message.c b/src/fw/applib/app_message/app_message.c index 8f761666..bcd2af97 100644 --- a/src/fw/applib/app_message/app_message.c +++ b/src/fw/applib/app_message/app_message.c @@ -204,7 +204,7 @@ AppMessageResult app_message_open(const uint32_t size_inbound, const uint32_t si void app_message_close(void) { AppMessageCtx *app_message_ctx = app_state_get_app_message_ctx(); - // TODO PBL-1634: handle the the return status when this function returns status. + // TODO PBL-1634: handle the return status when this function returns status. // For now, continue to ignore failure. app_message_outbox_close(&app_message_ctx->outbox); app_message_inbox_close(&app_message_ctx->inbox); diff --git a/src/fw/applib/app_message/app_message.h b/src/fw/applib/app_message/app_message.h index 480708be..d1f3a18f 100644 --- a/src/fw/applib/app_message/app_message.h +++ b/src/fw/applib/app_message/app_message.h @@ -344,7 +344,7 @@ void app_message_deregister_callbacks(void); // -------- AppMessage Lifecycle ----------------------------------------------------------------------------------- // -//! Programatically determine the inbox size maximum in the current configuration. +//! Programmatically determine the inbox size maximum in the current configuration. //! //! \return The inbox size maximum on this firmware. //! @@ -353,7 +353,7 @@ void app_message_deregister_callbacks(void); //! uint32_t app_message_inbox_size_maximum(void); -//! Programatically determine the outbox size maximum in the current configuration. +//! Programmatically determine the outbox size maximum in the current configuration. //! //! \return The outbox size maximum on this firmware. //! diff --git a/src/fw/applib/app_smartstrap.h b/src/fw/applib/app_smartstrap.h index 3161c5d9..c8405d1f 100644 --- a/src/fw/applib/app_smartstrap.h +++ b/src/fw/applib/app_smartstrap.h @@ -56,7 +56,7 @@ //! Error values which may be returned from the smartstrap APIs. typedef enum { - //! No error occured. + //! No error occurred. SmartstrapResultOk = 0, //! Invalid function arguments were supplied. SmartstrapResultInvalidArgs, @@ -69,7 +69,7 @@ typedef enum { SmartstrapResultServiceUnavailable, //! The smartstrap reported that it does not support the requested attribute. SmartstrapResultAttributeUnsupported, - //! A time-out occured during the request. + //! A time-out occurred during the request. SmartstrapResultTimeOut, } SmartstrapResult; @@ -153,7 +153,7 @@ void app_smartstrap_set_timeout(uint16_t timeout_ms); //! @param attribute_id The AttributeId to create the attribute for. //! @param buffer_length The length of the internal buffer which will be used to store the read //! and write requests for this attribute. -//! @returns The newly created SmartstrapAttribute or NULL if an internal error occured or if the +//! @returns The newly created SmartstrapAttribute or NULL if an internal error occurred or if the //! specified length is greater than SMARTSTRAP_ATTRIBUTE_LENGTH_MAXIMUM. SmartstrapAttribute *app_smartstrap_attribute_create(SmartstrapServiceId service_id, SmartstrapAttributeId attribute_id, diff --git a/src/fw/applib/app_timer.c b/src/fw/applib/app_timer.c index facb7d75..957b6724 100644 --- a/src/fw/applib/app_timer.c +++ b/src/fw/applib/app_timer.c @@ -22,7 +22,7 @@ //! @file fw/applib/app_timer.c //! -//! Surpise! All this is is a dumb wrapper around evented_timer! +//! Surprise! All this is is a dumb wrapper around evented_timer! DEFINE_SYSCALL(AppTimer*, app_timer_register, uint32_t timeout_ms, AppTimerCallback callback, diff --git a/src/fw/applib/applib_malloc.json b/src/fw/applib/applib_malloc.json index e79229f1..bee548d6 100644 --- a/src/fw/applib/applib_malloc.json +++ b/src/fw/applib/applib_malloc.json @@ -8,7 +8,7 @@ "", "Types are defined below with the following parameters: ", " name: The name of the type as it appears in our codebase. This type definition must ", - " be visibile in one of the headers in the headers list below. ", + " be visible in one of the headers in the headers list below. ", " size_2x: The size in bytes that should be used for legacy2 apps ", " size_3x: The size in bytes that should be used for 3.x apps ", " size_3x_padding: The amount of padding to add directly to this particular struct. ", diff --git a/src/fw/applib/applib_resource_private.h b/src/fw/applib/applib_resource_private.h index d60619e7..ced2ef1a 100644 --- a/src/fw/applib/applib_resource_private.h +++ b/src/fw/applib/applib_resource_private.h @@ -42,7 +42,7 @@ bool applib_resource_munmap_all(); //! or for a given resource if will try to allocate data and load it into RAM instead. //! Have a look at \ref resource_load_byte_range_system for the discussion of arguments //! @param used_aligned True, if you want this function to allocate 7 extra bytes if it cannot mmap -//! @return NULL, if the resource coudln't be memory-mapped or allocated +//! @return NULL, if the resource couldn't be memory-mapped or allocated void *applib_resource_mmap_or_load(ResAppNum app_num, uint32_t resource_id, size_t offset, size_t length, bool used_aligned); diff --git a/src/fw/applib/bluetooth/ble_ad_parse.h b/src/fw/applib/bluetooth/ble_ad_parse.h index 0fd992b0..72f4d235 100644 --- a/src/fw/applib/bluetooth/ble_ad_parse.h +++ b/src/fw/applib/bluetooth/ble_ad_parse.h @@ -19,7 +19,7 @@ #include //! @file ble_ad_parse.h -//! API to serialize and deserialize advertisment and scan response payloads. +//! API to serialize and deserialize advertisement and scan response payloads. //! //! Inbound payloads, as received using the ble_scan.h public API, can be //! consumed/deserialized using the functions below. @@ -81,7 +81,7 @@ bool ble_ad_get_tx_power_level(const BLEAdData *ad, int8_t *tx_power_level_out); size_t ble_ad_copy_local_name(const BLEAdData *ad, char *buffer, size_t size); -//! If the Local Name is present in the advertisment data, returns the number +//! If the Local Name is present in the advertisement data, returns the number //! of bytes a C-string needs to be to hold the full name. //! @param ad The advertisement data //! @return The size of the Local Name in bytes, *including* zero terminator. @@ -108,7 +108,7 @@ size_t ble_ad_copy_manufacturer_specific_data(const BLEAdData *ad, uint16_t *company_id_out, uint8_t *buffer, size_t size); -//! Gets the size in bytes of Manufacturer Specific data in the advertisment. +//! Gets the size in bytes of Manufacturer Specific data in the advertisement. //! @param ad The advertisement data //! @return The size of the data, in bytes. If the Manufacturer Specific data is //! not present, zero is returned. diff --git a/src/fw/applib/bluetooth/ble_client.h b/src/fw/applib/bluetooth/ble_client.h index 60cade10..a722516a 100644 --- a/src/fw/applib/bluetooth/ble_client.h +++ b/src/fw/applib/bluetooth/ble_client.h @@ -184,7 +184,7 @@ uint16_t ble_client_get_maximum_value_length(BTDevice device); //! @return BTErrnoOK if the operation was successfully started, or ... TODO BTErrno ble_client_read(BLECharacteristic characteristic); -//! Write the value of a characterstic. +//! Write the value of a characteristic. //! A call to this function will result in a callback to the registered //! BLEClientWriteHandler handler. @see ble_client_set_write_response_handler. //! @param characteristic The characteristic for which to write the value @@ -196,7 +196,7 @@ BTErrno ble_client_write(BLECharacteristic characteristic, const uint8_t *value, size_t value_length); -//! Write the value of a characterstic without response. +//! Write the value of a characteristic without response. //! @param characteristic The characteristic for which to write the value //! @param value Buffer with the value to write //! @param value_length Number of bytes to write @@ -234,7 +234,7 @@ BTErrno ble_client_write_without_response(BLECharacteristic characteristic, //! @note Under the hood, this API writes to the Client Characteristic //! Configuration Descriptor's Notifications or Indications enabled/disabled //! bit. -//! @return BTErrnoOK if the subscription request was sent sucessfully, or +//! @return BTErrnoOK if the subscription request was sent successfully, or //! TODO... BTErrno ble_client_subscribe(BLECharacteristic characteristic, BLESubscription subscription_type); diff --git a/src/fw/applib/bluetooth/ble_ibeacon.h b/src/fw/applib/bluetooth/ble_ibeacon.h index f4e4227a..5f527191 100644 --- a/src/fw/applib/bluetooth/ble_ibeacon.h +++ b/src/fw/applib/bluetooth/ble_ibeacon.h @@ -45,7 +45,7 @@ typedef struct { //! The calibrated power of the iBeacon. This is the RSSI measured at 1 meter //! distance from the iBeacon. The iBeacon transmits this information in its - //! advertisment. Using this and the actual RSSI, the distance is estimated. + //! advertisement. Using this and the actual RSSI, the distance is estimated. int8_t calibrated_tx_power; } BLEiBeacon; @@ -90,7 +90,7 @@ void ble_ibeacon_destroy(BLEiBeacon *ibeacon); //! @param rssi The RSSI of the advertisement //! @param[out] ibeacon_out Will contain the parsed iBeacon data if the call //! returns true. -//! @return true if the data element was succesfully parsed as iBeacon, +//! @return true if the data element was successfully parsed as iBeacon, //! false if the data element could not be parsed as iBeacon. bool ble_ibeacon_parse(const BLEAdData *ad, int8_t rssi, BLEiBeacon *ibeacon_out); diff --git a/src/fw/applib/bluetooth/ble_scan.h b/src/fw/applib/bluetooth/ble_scan.h index f66585e2..8cadf127 100644 --- a/src/fw/applib/bluetooth/ble_scan.h +++ b/src/fw/applib/bluetooth/ble_scan.h @@ -18,9 +18,9 @@ #include -//! Callback that is called for each advertisment that is found while scanning +//! Callback that is called for each advertisement that is found while scanning //! using ble_scan_start(). -//! @param device The device from which the advertisment originated. +//! @param device The device from which the advertisement originated. //! @param rssi The RSSI (Received Signal Strength Indication) of the //! advertisement. //! @param advertisement_data The payload of the advertisement. When there was @@ -38,7 +38,7 @@ typedef void (*BLEScanHandler)(BTDevice device, //! Start scanning for advertisements. Pebble will scan actively, meaning it //! will perform scan requests whenever the advertisement is scannable. -//! @param handler The callback to handle the found advertisments. It must not +//! @param handler The callback to handle the found advertisements. It must not //! be NULL. //! @return BTErrnoOK if scanning started successfully, BTErrnoInvalidParameter //! if the handler was invalid or BTErrnoInvalidState if scanning had already diff --git a/src/fw/applib/bluetooth/ble_service.h b/src/fw/applib/bluetooth/ble_service.h index 8abf5f6d..1413d723 100644 --- a/src/fw/applib/bluetooth/ble_service.h +++ b/src/fw/applib/bluetooth/ble_service.h @@ -39,7 +39,7 @@ uint8_t ble_service_get_characteristics(BLEService service, //! @return The 128-bit Service UUID, or UUID_INVALID if the service reference //! was invalid. //! @note The returned UUID is always a 128-bit UUID, even if the device -//! its interal GATT service database uses 16-bit or 32-bit Service UUIDs. +//! its internal GATT service database uses 16-bit or 32-bit Service UUIDs. //! @see bt_uuid_expand_16bit for a macro that converts 16-bit UUIDs to 128-bit //! equivalents. //! @see bt_uuid_expand_32bit for a macro that converts 32-bit UUIDs to 128-bit diff --git a/src/fw/applib/data_logging.h b/src/fw/applib/data_logging.h index aafcc8ca..a0994354 100644 --- a/src/fw/applib/data_logging.h +++ b/src/fw/applib/data_logging.h @@ -125,10 +125,10 @@ void data_logging_finish(DataLoggingSessionRef logging_session); //! DATA_LOGGING_NOT_FOUND if the logging session is invalid //! //! @return -//! DATA_LOGGING_CLOSED if the sesion is not active +//! DATA_LOGGING_CLOSED if the session is not active //! //! @return -//! DATA_LOGGING_BUSY if the sesion is not available for writing +//! DATA_LOGGING_BUSY if the session is not available for writing //! //! @return //! DATA_LOGGING_INVALID_PARAMS if num_items is 0 or data is NULL diff --git a/src/fw/applib/graphics/framebuffer.c b/src/fw/applib/graphics/framebuffer.c index e83252a1..5549b16d 100644 --- a/src/fw/applib/graphics/framebuffer.c +++ b/src/fw/applib/graphics/framebuffer.c @@ -15,8 +15,8 @@ */ //! @file framebuffer.c -//! Bitdepth independant routines for framebuffer.h -//! Bitdepth depenedant routines can be found in the 1_bit & 8_bit folders in their +//! Bitdepth independent routines for framebuffer.h +//! Bitdepth dependent routines can be found in the 1_bit & 8_bit folders in their //! respective framebuffer.c files. #include "applib/graphics/framebuffer.h" diff --git a/src/fw/applib/graphics/gbitmap.c b/src/fw/applib/graphics/gbitmap.c index 781bfba5..b2bbb89a 100644 --- a/src/fw/applib/graphics/gbitmap.c +++ b/src/fw/applib/graphics/gbitmap.c @@ -145,7 +145,7 @@ void gbitmap_init_with_data(GBitmap *bitmap, const uint8_t *data) { bitmap->info.is_bitmap_heap_allocated = false; // Note that our container contains values for the origin, but we want to ignore them. - // This is because orginally we just serialized GBitmap to disk, + // This is because originally we just serialized GBitmap to disk, // but these fields don't really make sense for static images. // These origin fields are only used when reusing a byte buffer in a sub bitmap. // This allows us to have a shallow copy of a portion of a parent bitmap. diff --git a/src/fw/applib/graphics/gbitmap_pbi.h b/src/fw/applib/graphics/gbitmap_pbi.h index 74a2d499..9237df8c 100644 --- a/src/fw/applib/graphics/gbitmap_pbi.h +++ b/src/fw/applib/graphics/gbitmap_pbi.h @@ -43,7 +43,7 @@ //! (width by height) and the first bit of image data is the pixel at (0, 0), //! then the bounds.size would be `GSize(29, 5)` and bounds.origin would be `GPoint(0, 0)`. //! ![](gbitmap.png) -//! In the illustration each pixel is a representated as a square. The white +//! In the illustration each pixel is a represented as a square. The white //! squares are the bits that are used, the gray squares are the padding bits, because //! each row of image data has to be a multiple of 4 bytes (32 bits). //! The numbers in the column in the left are the offsets (in bytes) from the `*addr` @@ -54,7 +54,7 @@ //! ![](pixel_bit_values.png) //! //! - \ref GBitmapFormat8Bit: -//! Each pixel in the bitmap is represented by 1 byte. The color value of that byte correspends to +//! Each pixel in the bitmap is represented by 1 byte. The color value of that byte corresponds to //! a GColor.argb value. //! There is no restriction on row_size_bytes / stride. //! diff --git a/src/fw/applib/graphics/gbitmap_sequence.c b/src/fw/applib/graphics/gbitmap_sequence.c index f259543a..682b1e07 100644 --- a/src/fw/applib/graphics/gbitmap_sequence.c +++ b/src/fw/applib/graphics/gbitmap_sequence.c @@ -288,7 +288,7 @@ bool gbitmap_sequence_update_bitmap_next_frame(GBitmapSequence *bitmap_sequence, const bool bitmap_supports_transparency = (bitmap_format != GBitmapFormat1Bit); // DISPOSE_OP_BACKGROUND sets the background to black with transparency (0x00) - // If we don't support tranparency, just do nothing. + // If we don't support transparency, just do nothing. if (bitmap_supports_transparency && (png_decoder_data->last_dispose_op == APNG_DISPOSE_OP_BACKGROUND)) { const uint32_t y_origin = bitmap->bounds.origin.y + png_decoder_data->previous_yoffset; diff --git a/src/fw/applib/graphics/gcolor_definitions.c b/src/fw/applib/graphics/gcolor_definitions.c index 70eeeaec..8f7a84b3 100644 --- a/src/fw/applib/graphics/gcolor_definitions.c +++ b/src/fw/applib/graphics/gcolor_definitions.c @@ -16,7 +16,7 @@ #include "gtypes.h" -//! This is used for performaing backward-compatibility conversions with 1-bit GColors. +//! This is used for performing backward-compatibility conversions with 1-bit GColors. GColor8 get_native_color(GColor2 color) { switch (color) { case GColor2Black: diff --git a/src/fw/applib/graphics/gcontext.h b/src/fw/applib/graphics/gcontext.h index cd64e5fa..866e2f86 100644 --- a/src/fw/applib/graphics/gcontext.h +++ b/src/fw/applib/graphics/gcontext.h @@ -71,7 +71,7 @@ typedef enum { typedef struct { //! Describes how to treat the range between .min_x and .max_x GDrawMaskRowInfoType type; - //! Left-most pixel, 3.0 means that that pixel 3 is fully visible, 3.5 means it's half visible + //! Left-most pixel, 3.0 means that pixel 3 is fully visible, 3.5 means it's half visible Fixed_S16_3 min_x; //! Right-most pixel, 10.7 means that pixel 10 is fully opaque Fixed_S16_3 max_x; @@ -230,8 +230,8 @@ void graphics_context_mask_destroy(GContext *ctx, GDrawMask *mask); GSize graphics_context_get_framebuffer_size(GContext *ctx); //! @internal -//! Retreives the destination bitmap for the graphics context. -//! @param ctx The graphics context to retreive the bitmap for. +//! Retrieves the destination bitmap for the graphics context. +//! @param ctx The graphics context to retrieve the bitmap for. GBitmap* graphics_context_get_bitmap(GContext* ctx); //! @internal diff --git a/src/fw/applib/graphics/gdraw_command_image.h b/src/fw/applib/graphics/gdraw_command_image.h index 322064b4..606cd428 100644 --- a/src/fw/applib/graphics/gdraw_command_image.h +++ b/src/fw/applib/graphics/gdraw_command_image.h @@ -74,7 +74,7 @@ bool gdraw_command_image_validate(GDrawCommandImage *image, size_t size); //! @param offset Offset from draw context origin to draw the image void gdraw_command_image_draw(GContext *ctx, GDrawCommandImage *image, GPoint offset); -//! Draw an image after being processed by the passed in proccessor +//! Draw an image after being processed by the passed in processor //! @param ctx The destination graphics context in which to draw //! @param image Image to draw //! @param offset Offset from draw context origin to draw the image diff --git a/src/fw/applib/graphics/gdraw_command_list.h b/src/fw/applib/graphics/gdraw_command_list.h index da736f0a..faf7f97d 100644 --- a/src/fw/applib/graphics/gdraw_command_list.h +++ b/src/fw/applib/graphics/gdraw_command_list.h @@ -40,7 +40,7 @@ typedef struct GDrawCommandProcessor GDrawCommandProcessor; //! Callback for iterating over GDrawCommands //! @param processor GDrawCommandProcessor that is currently iterating over the GDrawCommandList. -//! @param proccessed_command Copy of the current GDrawCommand that can be modified +//! @param processed_command Copy of the current GDrawCommand that can be modified //! @param processed_command_max_size Size of GDrawCommand being processed //! @param list list of GDrawCommands that will be modified by the processor //! @param command Current GDrawCommand being processed @@ -123,7 +123,7 @@ size_t gdraw_command_list_get_data_size(GDrawCommandList *command_list); //! The order is guaranteed to be the definition order of the points //! @param command_list \ref GDrawCommandList from which to collect points //! @param is_precise true to convert to GPointPrecise, otherwise points are converted to GPoint -//! @param num_points_out Optinal pointer to uint16_t to receive the num points +//! @param num_points_out Optional pointer to uint16_t to receive the num points GPoint *gdraw_command_list_collect_points(GDrawCommandList *command_list, bool is_precise, uint16_t *num_points_out); diff --git a/src/fw/applib/graphics/gpath.c b/src/fw/applib/graphics/gpath.c index ab88533d..dcdff2e1 100644 --- a/src/fw/applib/graphics/gpath.c +++ b/src/fw/applib/graphics/gpath.c @@ -48,7 +48,7 @@ void gpath_init(GPath *path, const GPathInfo *init) { GPath* gpath_create(const GPathInfo *init) { // Can't pad this out because the definition itself is exported. Even if we did pad it out so - // we can theoretically add members to the end of the struct, we'll still have to add compatibilty + // we can theoretically add members to the end of the struct, we'll still have to add compatibility // flags throughout here to check which size of struct the app is going to pass us through these // APIs. GPath* path = applib_malloc(sizeof(GPath)); diff --git a/src/fw/applib/graphics/graphics.c b/src/fw/applib/graphics/graphics.c index 313b1ba4..9acc925d 100644 --- a/src/fw/applib/graphics/graphics.c +++ b/src/fw/applib/graphics/graphics.c @@ -239,7 +239,7 @@ void graphics_fill_round_rect(GContext* ctx, const GRect *rect, uint16_t radius, #if PBL_COLOR if (ctx->draw_state.antialiased) { - // Antialiased (not suppported on 1-bit color) + // Antialiased (not supported on 1-bit color) prv_fill_rect_aa(ctx, rect, radius, corner_mask, ctx->draw_state.fill_color); return; } @@ -437,7 +437,7 @@ void graphics_draw_round_rect(GContext* ctx, const GRect *rect, uint16_t radius) prv_draw_round_rect_aa_stroked(ctx, rect, radius, ctx->draw_state.stroke_width); return; } else { - // Antialiased and Stroke Width == 1 (not suppported on 1-bit color) + // Antialiased and Stroke Width == 1 (not supported on 1-bit color) // Note: stroke width == 2 is rounded down to stroke width of 1 prv_draw_round_rect_aa(ctx, rect, radius); return; diff --git a/src/fw/applib/graphics/graphics_bitmap.c b/src/fw/applib/graphics/graphics_bitmap.c index 3ee54ba3..0678e10a 100644 --- a/src/fw/applib/graphics/graphics_bitmap.c +++ b/src/fw/applib/graphics/graphics_bitmap.c @@ -127,13 +127,13 @@ T_STATIC GColor get_bitmap_color(GBitmap *bmp, int x, int y) { 0, // y = 0 when using data_row bmp->row_size_bytes, src_bpp); - // Default color to be the raw color index - update only if palletized + // Default color to be the raw color index - update only if palettized GColor src_color = (GColor){.argb = cindex}; - bool palletized = ((format == GBitmapFormat1BitPalette) || + bool palettized = ((format == GBitmapFormat1BitPalette) || (format == GBitmapFormat2BitPalette) || (format == GBitmapFormat4BitPalette)); - if (palletized) { - // Look up color in pallete if palletized + if (palettized) { + // Look up color in palette if palettized const GColor *palette = bmp->palette; src_color = palette[cindex]; } @@ -189,7 +189,7 @@ void graphics_draw_rotated_bitmap(GContext* ctx, GBitmap *src, GPoint src_ic, in background = GColorWhite; break; default: - PBL_ASSERT(0, "unknown coposting mode %d", compositing_mode); + PBL_ASSERT(0, "unknown compositing mode %d", compositing_mode); return; } #endif @@ -215,7 +215,7 @@ void graphics_draw_rotated_bitmap(GContext* ctx, GBitmap *src, GPoint src_ic, in const int32_t width = 2 * (max_width + 1); // Add one more pixel in case on the edge const int32_t height = 2 * (max_height + 1); // Add one more pixel in case on the edge - // add two pixels just in case of rounding isssues + // add two pixels just in case of rounding issues const int32_t max_distance = integer_sqrt((width * width) + (height * height)) + 2; const int32_t min_x = src_ic.x - max_distance; const int32_t min_y = src_ic.y - max_distance; diff --git a/src/fw/applib/graphics/graphics_circle.c b/src/fw/applib/graphics/graphics_circle.c index 3779143b..4578dffe 100644 --- a/src/fw/applib/graphics/graphics_circle.c +++ b/src/fw/applib/graphics/graphics_circle.c @@ -80,7 +80,7 @@ static GPointPrecise prv_get_rotated_precise_point_for_ellipsis(GPointPrecise ce } } - // This algorthm operates on angle starting at our 90° mark, so we add 90° + // This algorithm operates on angle starting at our 90° mark, so we add 90° // and flip x/y coordinates (see last line of this function) angle = (angle + (TRIG_MAX_ANGLE / 4)) % TRIG_MAX_ANGLE; @@ -179,7 +179,7 @@ static void prv_plot4(GBitmap *fb, GRect *clip_box, GPoint center, GPoint offset * | * * + center point - * - x coordiante mirror line + * - x coordinate mirror line * | y coordinate mirror line * x given offset point * xn mirrored points @@ -209,7 +209,7 @@ static void prv_plot8(GBitmap *fb, GRect *clip_box, GPoint center, GPoint offset * / x5| x4 \ * * + center point - * - x coordiante mirror line + * - x coordinate mirror line * | y coordinate mirror line * / 45 degree mirror line * \ 135 degree mirror line @@ -228,7 +228,7 @@ T_STATIC void graphics_circle_quadrant_draw_1px_aa(GContext* ctx, GPoint p, uint GCornerMask quadrant) { /* This will draw antialiased circle with width of 1px, can be drawn in quadrants * Based on wu-xiang line drawing, will draw circle in two steps - * 1. Calculate point on the edge of eighth of the cricle and plot it around by mirroring + * 1. Calculate point on the edge of eighth of the circle and plot it around by mirroring * - if point is matching pixel perfectly thats going to be on fully colored pixel * - if theres fraction, two pixels will be colored accordingly * 2. Fill special case pixels (pixels that are between mirrored eighths) @@ -256,7 +256,7 @@ T_STATIC void graphics_circle_quadrant_draw_1px_aa(GContext* ctx, GPoint p, uint * x - * * | original calculated pixels for plotting - * - mirrored eight of the circle (will mirror more of them if neccessary) + * - mirrored eight of the circle (will mirror more of them if necessary) * o special case pixels * x center of the circle */ @@ -303,7 +303,7 @@ T_STATIC void graphics_circle_quadrant_draw_1px_aa(GContext* ctx, GPoint p, uint // Note: magic numbers explained in main comment for this function int special_case_pixels = 3; - // Acommpanied by magic number 7 (not 6, we increased radius at beginning of this function) + // Accompanied by magic number 7 (not 6, we increased radius at beginning of this function) if (radius < 7) { // And sometimes magic number 2 special_case_pixels = 2; @@ -379,7 +379,7 @@ inline void prv_hline_quadrant(GCornerMask quadrant, GCornerMask desired, GConte static void prv_stroke_circle_quadrant_full(GContext* ctx, GPoint p, uint16_t radius, uint8_t stroke_width, GCornerMask quadrant) { - // This algorithm will draw stroked circle with vairable width (only odd numbers for now) + // This algorithm will draw stroked circle with variable width (only odd numbers for now) const uint8_t half_stroke_width = stroke_width / 2; const int16_t inner_radius = radius - half_stroke_width; const uint8_t outer_radius = radius + half_stroke_width; @@ -459,7 +459,7 @@ void graphics_circle_quadrant_draw(GContext* ctx, GPoint p, uint16_t radius, GCo graphics_circle_quadrant_draw_stroked_aa(ctx, p, radius, stroke_width, quadrant); return; } else { - // Antialiased and Stroke Width == 1 (not suppported on 1-bit color) + // Antialiased and Stroke Width == 1 (not supported on 1-bit color) graphics_circle_quadrant_draw_1px_aa(ctx, p, radius, quadrant); return; } @@ -516,7 +516,7 @@ void graphics_draw_circle(GContext* ctx, GPoint p, uint16_t radius) { } if (radius == 0) { - // Special case radius 0 to fill a circle with radius eqaul to half the stroke width + // Special case radius 0 to fill a circle with radius equal to half the stroke width // Backup the fill color and set that to the current stroke color since the fill color // is what is used for fill circle. Restore the fill color afterwards. GColor backup_fill_color = ctx->draw_state.fill_color; @@ -835,7 +835,7 @@ static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, radius_inner_y.raw_value = MAX(radius_inner_y.raw_value, 0); // This flag prevents from calculation of the inner circle (and bugs related to it) - const bool no_innner_ellipsis = (radius_inner_x.raw_value == 0 || radius_inner_y.raw_value == 0); + const bool no_inner_ellipsis = (radius_inner_x.raw_value == 0 || radius_inner_y.raw_value == 0); // Squared radiuses values - they're used a lot in some cases const uint32_t radius_outer_x_sq = @@ -857,16 +857,16 @@ static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, radius_outer_x.raw_value, radius_outer_y.raw_value, config.end_quadrant.angle); - GPointPrecise start_bottom = (no_innner_ellipsis) ? center : + GPointPrecise start_bottom = (no_inner_ellipsis) ? center : prv_get_rotated_precise_point_for_ellipsis(center, radius_inner_x.raw_value, radius_inner_y.raw_value, config.start_quadrant.angle); - GPointPrecise end_bottom = (no_innner_ellipsis) ? center : + GPointPrecise end_bottom = (no_inner_ellipsis) ? center : prv_get_rotated_precise_point_for_ellipsis(center, radius_inner_x.raw_value, radius_inner_y.raw_value, config.end_quadrant.angle); - // Swapping top/bottom offset points if neccesary + // Swapping top/bottom offset points if necessary if (start_top.y.raw_value > start_bottom.y.raw_value) { prv_swap_precise_points(&start_top, &start_bottom); } else if (start_top.y.raw_value == start_bottom.y.raw_value && @@ -883,15 +883,15 @@ static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, prv_swap_precise_points(&end_top, &end_bottom); } - // Range for scanline, since scanlines are mirred from the middle of the circle this is also + // Range for scanline, since scanlines are mirrored from the middle of the circle this is also // indicated from the middle, therefore initialised with 0 (as middle) and - // radius_y (as scalines are on y axis) + // radius_y (as scanlines are on y axis) int draw_min = 0; int draw_max = radius_outer_y.integer; // Adjust to drawing_box offset int adjusted_center = center.y.integer + ctx->draw_state.drawing_box.origin.y; - // We add one to compenaste in case of odd line needs to be drawn + // We add one to compensate in case of odd line needs to be drawn int adjusted_top = adjusted_center - radius_outer_y.integer - 1; int adjusted_bottom = adjusted_center + radius_outer_y.integer + 1; @@ -912,7 +912,7 @@ static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, int draw_max_top = MAX(center.y.integer - adjusted_top, 0); int draw_max_bottom = MAX(adjusted_bottom - center.y.integer, 0); int draw_min_top = MAX(center.y.integer - adjusted_bottom, 0); - // In case of odd line, center is with half pixel so we have to subtract one more more full line + // In case of odd line, center is with half pixel so we have to subtract one more full line int draw_min_bottom = MAX(adjusted_top - center.y.integer - 1, 0); // Apply clipped distances @@ -970,7 +970,7 @@ static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, int16_t left = center.x.raw_value - outer_edge; int16_t right = center.x.raw_value + outer_edge; - if (!no_innner_ellipsis && radius_inner_y.integer != 0) { + if (!no_inner_ellipsis && radius_inner_y.integer != 0) { // This complicates the situation int16_t inner_edge = prv_get_ellipsis_border(y, radius_inner_y_sq, radius_inner_x_sq).raw_value; @@ -1018,7 +1018,7 @@ static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center, int16_t right = center.x.raw_value + outer_edge; // If theres circle in the middle - calculate it: - if (!no_innner_ellipsis && i < radius_inner_y.integer) { + if (!no_inner_ellipsis && i < radius_inner_y.integer) { int16_t inner_edge = prv_get_ellipsis_border(y, radius_inner_y_sq, radius_inner_x_sq).raw_value; @@ -1211,7 +1211,7 @@ MOCKABLE void graphics_draw_arc_precise_internal(GContext *ctx, GPointPrecise ce center.x.raw_value -= center.x.raw_value % (FIXED_S16_3_ONE.raw_value / 2); center.y.raw_value -= center.y.raw_value % (FIXED_S16_3_ONE.raw_value / 2); - // To maintain compability we have to adjust from integral points where given point means + // To maintain compatibility we have to adjust from integral points where given point means // center of the point center.x.raw_value += 4; center.y.raw_value += 4; diff --git a/src/fw/applib/graphics/graphics_line.c b/src/fw/applib/graphics/graphics_line.c index 7b7d2e74..66176973 100644 --- a/src/fw/applib/graphics/graphics_line.c +++ b/src/fw/applib/graphics/graphics_line.c @@ -380,7 +380,7 @@ static bool prv_calc_far_points(GPointPrecise *p0, GPointPrecise *p1, Fixed_S16_ } // Since we already rotated the vector by 90 degrees, delta x is actually delta y - // therefore if x is bigger than y we have have vertical dominance + // therefore if x is bigger than y we have vertical dominance if (ABS(dx_fixed) > ABS(dy_fixed)) { return true; } @@ -411,13 +411,13 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis ctx->draw_state.fill_color = ctx->draw_state.stroke_color; - // If so, draw a circle with corrseponding radius + // If so, draw a circle with corresponding radius graphics_fill_circle(ctx, GPoint(p0.x.integer, p0.y.integer), radius.integer); // Finish color hack ctx->draw_state.fill_color = temp_color; - // Return without drawing the line since its not neccessary + // Return without drawing the line since its not necessary return; } @@ -459,7 +459,7 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis // Drawing loop: Iterates over horizontal lines // As part of optimisation, this algorithm is moving between drawing boundaries, - // so drawing box has to be substracted from its clipping extremes + // so drawing box has to be subtracted from its clipping extremes const int16_t clip_min_y = ctx->draw_state.clip_box.origin.y - ctx->draw_state.drawing_box.origin.y; const int16_t clip_max_y = clip_min_y + ctx->draw_state.clip_box.size.h; @@ -517,7 +517,7 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis Fixed_S16_3 left_margin = {.raw_value = INT16_MAX}; Fixed_S16_3 right_margin = {.raw_value = INT16_MIN}; - // Find edges of the line's straigth part + // Find edges of the line's straight part if (y >= far_top.y.integer && y <= far_bottom.y.integer) { // TODO: possible performance optimization: PBL-14744 // TODO: ^^ also possible avoid of following logic to avoid division by zero @@ -585,7 +585,7 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis // Drawing loop: Iterates over vertical lines from left to right // As part of optimisation, this algorithm is moving between drawing boundaries, - // so drawing box has to be substracted from its clipping extremes + // so drawing box has to be subtracted from its clipping extremes const int16_t clip_min_x = ctx->draw_state.clip_box.origin.x - ctx->draw_state.drawing_box.origin.x; const int16_t clip_max_x = clip_min_x + ctx->draw_state.clip_box.size.w; @@ -645,7 +645,7 @@ void prv_draw_stroked_line_precise(GContext* ctx, GPointPrecise p0, GPointPrecis Fixed_S16_3 top_margin = {.raw_value = INT16_MAX}; Fixed_S16_3 bottom_margin = {.raw_value = INT16_MIN}; - // Find edges of the line's straigth part + // Find edges of the line's straight part if (x >= far_left.x.integer && x <= far_right.x.integer) { // Main part of the stroked line if (tm_p1.x.raw_value != tm_p0.x.raw_value) { @@ -774,7 +774,7 @@ void graphics_draw_line(GContext* ctx, GPoint p0, GPoint p1) { graphics_line_draw_stroked_aa(ctx, p0, p1, ctx->draw_state.stroke_width); return; } else { - // Antialiased and Stroke Width == 1 (not suppported on 1-bit color) + // Antialiased and Stroke Width == 1 (not supported on 1-bit color) graphics_line_draw_1px_aa(ctx, p0, p1); return; } diff --git a/src/fw/applib/graphics/graphics_private.c b/src/fw/applib/graphics/graphics_private.c index 49330656..71508cd8 100644 --- a/src/fw/applib/graphics/graphics_private.c +++ b/src/fw/applib/graphics/graphics_private.c @@ -191,7 +191,7 @@ void graphics_private_draw_horizontal_line_prepared(GContext *ctx, GBitmap *fram void graphics_private_draw_horizontal_line_integral(GContext *ctx, GBitmap *framebuffer, int16_t y, int16_t x1, int16_t x2, GColor color) { - // This is a wrapper for prv_draw_horizontal_line_raw for integral coordintaes + // This is a wrapper for prv_draw_horizontal_line_raw for integral coordinates // End of the line is inclusive so we subtract one x2--; diff --git a/src/fw/applib/graphics/graphics_private_raw.c b/src/fw/applib/graphics/graphics_private_raw.c index e9ffafc4..999b1e81 100644 --- a/src/fw/applib/graphics/graphics_private_raw.c +++ b/src/fw/applib/graphics/graphics_private_raw.c @@ -188,7 +188,7 @@ T_STATIC void prv_assign_vertical_line_raw(GContext *ctx, int16_t x, Fixed_S16_3 } // This function draws horizontal line with blending, given values have to be clipped and adjusted -// clip_box and draw_box respecively. +// clip_box and draw_box respectively. T_STATIC void prv_blend_horizontal_line_raw(GContext *ctx, int16_t y, int16_t x1, int16_t x2, GColor color) { PBL_ASSERTN(ctx); @@ -212,7 +212,7 @@ T_STATIC void prv_blend_horizontal_line_raw(GContext *ctx, int16_t y, int16_t x1 } // This function draws vertical line with blending, given values have to be clipped and adjusted -// clip_box and draw_box respecively. +// clip_box and draw_box respectively. T_STATIC void prv_blend_vertical_line_raw(GContext *ctx, int16_t x, int16_t y1, int16_t y2, GColor color) { PBL_ASSERTN(ctx); diff --git a/src/fw/applib/graphics/gtransform.c b/src/fw/applib/graphics/gtransform.c index d1506171..cdde4fc3 100644 --- a/src/fw/applib/graphics/gtransform.c +++ b/src/fw/applib/graphics/gtransform.c @@ -114,7 +114,7 @@ bool gtransform_is_equal(const GTransform * const t1, const GTransform * const t ////////////////////////////////////// /// Modifying Transforms ////////////////////////////////////// -// Note that t_new can be set to either of t1 or t2 safely to do in place muliplication +// Note that t_new can be set to either of t1 or t2 safely to do in place multiplication // Note this operation is not commutative. The operation is as follows t_new = t1 * t2 void gtransform_concat(GTransform *t_new, const GTransform *t1, const GTransform * t2) { if ((!t_new) || (!t1) || (!t2)) { diff --git a/src/fw/applib/graphics/gtransform.h b/src/fw/applib/graphics/gtransform.h index 47e23936..43e04e5b 100644 --- a/src/fw/applib/graphics/gtransform.h +++ b/src/fw/applib/graphics/gtransform.h @@ -171,7 +171,7 @@ bool gtransform_is_equal(const GTransform * const t1, const GTransform * const t ////////////////////////////////////// //! Concatenates two transformation matrices and returns the resulting matrix in t1 //! The operation performed is t_new = t1*t2. This order is not commutative so be careful -//! when contactenating the matrices. +//! when concatenating the matrices. //! Note t_new can safely be be the same pointer as t1 or t2. //! @param t_new Pointer to destination transformation matrix //! @param t1 Pointer to transformation matrix to concatenate with t2 where t_new = t1*t2 diff --git a/src/fw/applib/graphics/gtypes.h b/src/fw/applib/graphics/gtypes.h index 8d4cb494..134948f2 100644 --- a/src/fw/applib/graphics/gtypes.h +++ b/src/fw/applib/graphics/gtypes.h @@ -350,7 +350,7 @@ void gpoint_sort(GPoint *points, size_t num_points, GPointComparator comparator, #define GPOINT_PRECISE_PRECISION FIXED_S16_3_PRECISION #define GPOINT_PRECISE_FACTOR FIXED_S16_3_FACTOR -//! Internal respresentation of a point +//! Internal representation of a point //! 1 bit for sign, 12 bits represent the coordinate, 3 bits represent the precision //! Supports -4096.000 px to 4095.875 px resolution typedef struct __attribute__ ((__packed__)) GPointPrecise { @@ -673,7 +673,7 @@ typedef struct { #define GEdgeInsets(...) \ GEdgeInsetsN(__VA_ARGS__, GEdgeInsets4, GEdgeInsets3, GEdgeInsets2, GEdgeInsets1)(__VA_ARGS__) -//! Returns a rectangle that is shrinked or expanded by the given edge insets. +//! Returns a rectangle that is shrunk or expanded by the given edge insets. //! @note The rectangle is standardized and then the inset parameters are applied. //! If the resulting rectangle would have a negative height or width, a GRectZero is returned. //! @param rect The rectangle that will be inset @@ -1065,7 +1065,7 @@ GBitmap *gbitmap_create_with_resource_system(ResAppNum app_num, uint32_t resourc //! @internal //! @see gbitmap_init_with_resource //! @param app_num The app's resource bank number -//! @return true if we were sucessful, false otherwise +//! @return true if we were successful, false otherwise bool gbitmap_init_with_resource_system(GBitmap* bitmap, ResAppNum app_num, uint32_t resource_id); //! @internal @@ -1352,7 +1352,7 @@ typedef struct PACKED { typedef Fixed_S32_16 GTransformNumber; //! @internal -//! Data structure that contains the internal representation of a 3x3 tranformation matrix +//! Data structure that contains the internal representation of a 3x3 transformation matrix //! The transformation matrix will be expressed as follows: //! [ a b 0 ] //! [ c d 0 ] diff --git a/src/fw/applib/graphics/text.h b/src/fw/applib/graphics/text.h index 14f4ab92..c7c3b64a 100644 --- a/src/fw/applib/graphics/text.h +++ b/src/fw/applib/graphics/text.h @@ -53,7 +53,7 @@ typedef enum { GTextOverflowModeFill } GTextOverflowMode; -//! Text aligment controls the way the text is aligned inside the box the text is drawn into. +//! Text alignment controls the way the text is aligned inside the box the text is drawn into. //! @see graphics_draw_text //! @see text_layer_set_text_alignment typedef enum { @@ -138,7 +138,7 @@ void graphics_text_init(void); //! Draw text into the current graphics context, using the context's current text color. //! The text will be drawn inside a box with the specified dimensions and -//! configuration, with clipping occuring automatically. +//! configuration, with clipping occurring automatically. //! @param ctx The destination graphics context in which to draw //! @param text The zero terminated UTF-8 string to draw //! @param font The font in which the text should be set diff --git a/src/fw/applib/graphics/text_layout.c b/src/fw/applib/graphics/text_layout.c index 8e96dd9f..d63c7765 100644 --- a/src/fw/applib/graphics/text_layout.c +++ b/src/fw/applib/graphics/text_layout.c @@ -267,7 +267,7 @@ static bool prv_line_iter_is_vertical_overflow(const LineIterState* const line_i // if we're not rendering the first line. // - This, because the user does not expect to see more text drawn below, after the '...'. // - The first-line exception means that text, and therefore the telltale - // ellipsis, will always be visisble. + // ellipsis, will always be visible. if ((text_box_params->overflow_mode == GTextOverflowModeTrailingEllipsis || text_box_params->overflow_mode == GTextOverflowModeFill) && line_iter_state->current->origin.y != text_box_params->box.origin.y) { @@ -791,11 +791,11 @@ static inline void prv_walk_lines_down(Iterator* const line_iter, TextLayout* co const Word word_before_rendering = *current_word_ref; const OrphanLineState orphan_state = prv_capture_orphan_state(line); - // When repeating text to prevent orhpans we could run into the situation where repeating text + // When repeating text to prevent orphans we could run into the situation where repeating text // pushes down the remaining text far enough so it ends up on yet another page. This would // enter an infinite loop. // To avoid that, we only apply this strategy, when it's "safe" to do so (in theory, there's - // still the propability to run into this scenario if the perimeter isn't vertically symmetric). + // still the probability to run into this scenario if the perimeter isn't vertically symmetric). // The chosen number should be large enough for the previous line, the orphan line plus some // buffer. const int num_safe_lines = 3; @@ -823,7 +823,7 @@ render_line: {} // this {} is just an empty statement that both C and our linter if (is_orphan) { *current_word_ref = prev_line_word; prv_apply_orphan_state(&orphan_state, line); - avoiding_orphans = false; // prevent infinte loops + avoiding_orphans = false; // prevent infinite loops goto render_line; } } diff --git a/src/fw/applib/graphics/text_render.c b/src/fw/applib/graphics/text_render.c index cc8af879..8b5e05e6 100644 --- a/src/fw/applib/graphics/text_render.c +++ b/src/fw/applib/graphics/text_render.c @@ -130,9 +130,9 @@ void render_glyph(GContext* const ctx, const uint32_t codepoint, FontInfo* const // The number of bits between the beginning of dest_block and glyph_block. // If x is negative we need to be fancy to get the rounded down remainder. This - // is the number of bits to the right of the next 32-bit boundry to the left. + // is the number of bits to the right of the next 32-bit boundary to the left. // For example, if x is -5 we want this shift to be 27, since -32 (the nearest - // boundry) + 27 = -5 + // boundary) + 27 = -5 const uint8_t dest_shift_at_line_begin = (x >= 0) ? x % 32 : (x - ((x / 32) * 32)); diff --git a/src/fw/applib/graphics/text_resources.c b/src/fw/applib/graphics/text_resources.c index 32bca226..04d00f02 100644 --- a/src/fw/applib/graphics/text_resources.c +++ b/src/fw/applib/graphics/text_resources.c @@ -225,7 +225,7 @@ static GlyphData *prv_decompress_glyph_data(GlyphData *g, uint8_t *src) { // *src is a pointer to the beginning of // // Once decompressed, Glyph Data will be formatted like this: - // [
| | ] + // [
| | ] // // The glyph is decoded in-place, so obviously, it's imperative that and // not overlap at any time. This is checked by fontgen.py and confirmed diff --git a/src/fw/applib/health_service.h b/src/fw/applib/health_service.h index f34a9a5b..a3986813 100644 --- a/src/fw/applib/health_service.h +++ b/src/fw/applib/health_service.h @@ -328,7 +328,7 @@ HealthServiceAccessibilityMask health_service_metric_accessible( //! @param time_start Earliest UTC time you are interested in. //! @param time_end Latest UTC time you are interested in. //! @param scope \ref HealthServiceTimeScope value describing how the average should be computed. -//! @return A \HealthServiceAccessibilityMask value decribing whether averaged data is available. +//! @return A \HealthServiceAccessibilityMask value describing whether averaged data is available. HealthServiceAccessibilityMask health_service_metric_averaged_accessible( HealthMetric metric, time_t time_start, time_t time_end, HealthServiceTimeScope scope); @@ -342,7 +342,7 @@ HealthServiceAccessibilityMask health_service_metric_averaged_accessible( //! @param time_end Latest UTC time you are interested in. //! @param aggregation The aggregation to perform //! @param scope \ref HealthServiceTimeScope value describing how the average should be computed. -//! @return A \HealthServiceAccessibilityMask value decribing whether averaged data is available. +//! @return A \HealthServiceAccessibilityMask value describing whether averaged data is available. HealthServiceAccessibilityMask health_service_metric_aggregate_averaged_accessible( HealthMetric metric, time_t time_start, time_t time_end, HealthAggregation aggregation, HealthServiceTimeScope scope); @@ -379,7 +379,7 @@ typedef enum { //! Developer-supplied event handler, called when a health-related event occurs after subscribing //! via \ref health_service_events_subscribe(); -//! @param event The type of health-related event that occured. +//! @param event The type of health-related event that occurred. //! @param context The developer-supplied context pointer. typedef void (*HealthEventHandler)(HealthEventType event, void *context); @@ -443,7 +443,7 @@ uint16_t health_service_get_heart_rate_sample_period_expiration_sec(void); //! \endcode //! //! In the current implementation, only one alert per metric can be registered at a time. Future -//! implementations may support two or more simulataneous alert registrations per metric. To change +//! implementations may support two or more simultaneous alert registrations per metric. To change //! the alert threshold in the current implementation, cancel the original registration //! using `health_service_cancel_metric_alert` before registering the new threshold. //! @param metric Which \ref HealthMetric to query. @@ -490,7 +490,7 @@ typedef struct { //! exit, the UTC time of the end of the last record actually returned (i.e. start time of last //! record + 60). If `time_end` on entry is somewhere in the middle of a minute interval, this //! function behaves as if the caller passed in the end of that minute. -//! @return Actual number of records returned. May be less then the maximum requested. +//! @return Actual number of records returned. May be less than the maximum requested. //! @note If the return value is zero, `time_start` and `time_end` are meaningless. //! It's not guaranteed that all records contain valid data, even if the return value is //! greater than zero. Check `HealthMinuteData.is_invalid` to see if a given record contains diff --git a/src/fw/applib/legacy2/ui/action_bar_layer_legacy2.h b/src/fw/applib/legacy2/ui/action_bar_layer_legacy2.h index 5bfeee1b..c4c4a2ba 100644 --- a/src/fw/applib/legacy2/ui/action_bar_layer_legacy2.h +++ b/src/fw/applib/legacy2/ui/action_bar_layer_legacy2.h @@ -136,7 +136,7 @@ typedef struct ActionBarLayerLegacy2 { //! @param action_bar The action bar to initialize void action_bar_layer_legacy2_init(ActionBarLayerLegacy2 *action_bar); -//! Creates a new ActionBarLayerLegacy2 on the heap and initalizes it with the default values. +//! Creates a new ActionBarLayerLegacy2 on the heap and initializes it with the default values. //! * Background color: \ref GColorBlack //! * No click configuration provider (`NULL`) //! * No icons @@ -220,7 +220,7 @@ void action_bar_layer_legacy2_clear_icon(ActionBarLayerLegacy2 *action_bar, Butt //! @note It is advised to call this is in the window's `.load` or `.appear` //! handler. Make sure to call \ref action_bar_layer_legacy2_remove_from_window() in the //! window's `.unload` or `.disappear` handler. -//! @note Adding additional layers to the window's root layer after this calll +//! @note Adding additional layers to the window's root layer after this call //! can occlude the action bar. //! @param action_bar The action bar to associate with the window //! @param window The window with which the action bar is to be associated diff --git a/src/fw/applib/legacy2/ui/animation_legacy2.h b/src/fw/applib/legacy2/ui/animation_legacy2.h index acab2fcf..14b2ae7c 100644 --- a/src/fw/applib/legacy2/ui/animation_legacy2.h +++ b/src/fw/applib/legacy2/ui/animation_legacy2.h @@ -45,7 +45,7 @@ struct AnimationLegacy2Implementation; struct AnimationLegacy2Handlers; -//! Creates a new AnimationLegacy2 on the heap and initalizes it with the default values. +//! Creates a new AnimationLegacy2 on the heap and initializes it with the default values. //! //! * Duration: 250ms, //! * Curve: \ref AnimationCurveEaseInOut (ease-in-out), diff --git a/src/fw/applib/legacy2/ui/property_animation_legacy2.h b/src/fw/applib/legacy2/ui/property_animation_legacy2.h index 870422ff..39a6618b 100644 --- a/src/fw/applib/legacy2/ui/property_animation_legacy2.h +++ b/src/fw/applib/legacy2/ui/property_animation_legacy2.h @@ -35,7 +35,7 @@ //! Actually, property animations do more than just moving a Layer around over time. //! PropertyAnimationLegacy2 is a concrete class of animations and is built around the Animation //! subsystem, which covers anything timing related, but does not move anything around. -//! A ProperyAnimation animates a "property" of a "subject". +//! A PropertyAnimation animates a "property" of a "subject". //! //!

Animating a Layer's frame property

//! Currently there is only one specific type of property animation offered off-the-shelf, namely @@ -68,7 +68,7 @@ //! __type__ value);` //! See \ref Int16Getter, \ref Int16Setter, \ref GPointGetter, \ref GPointSetter, \ref GRectGetter, //! \ref GRectSetter -//! for the typedefs that accompany the update fuctions. +//! for the typedefs that accompany the update functions. //! //! \code{.c} //! static const PropertyAnimationLegacy2Implementation my_implementation = { @@ -127,7 +127,7 @@ void property_animation_legacy2_init(struct PropertyAnimationLegacy2 *property_a const struct PropertyAnimationLegacy2Implementation *implementation, void *subject, void *from_value, void *to_value); -//! Creates a new PropertyAnimationLegacy2 on the heap and and initializes it with the specified +//! Creates a new PropertyAnimationLegacy2 on the heap and initializes it with the specified //! values. The same defaults are used as with \ref animation_create(). //! If the `from_value` or the `to_value` is `NULL`, the getter accessor will be called to get the //! current value of the property and be used instead. diff --git a/src/fw/applib/legacy2/ui/text_layer_legacy2.h b/src/fw/applib/legacy2/ui/text_layer_legacy2.h index 755b7fb1..653e4c78 100644 --- a/src/fw/applib/legacy2/ui/text_layer_legacy2.h +++ b/src/fw/applib/legacy2/ui/text_layer_legacy2.h @@ -71,7 +71,7 @@ typedef struct TextLayerLegacy2 { //! //! The text layer is automatically marked dirty after this operation. //! @param text_layer The TextLayerLegacy2 to initialize -//! @param frame The frame with which to initialze the TextLayerLegacy2 +//! @param frame The frame with which to initialize the TextLayerLegacy2 void text_layer_legacy2_init(TextLayerLegacy2 *text_layer, const GRect *frame); //! Creates a new TextLayerLegacy2 on the heap and initializes it with the default values. @@ -85,7 +85,7 @@ void text_layer_legacy2_init(TextLayerLegacy2 *text_layer, const GRect *frame); //! * Caching: `false` //! //! The text layer is automatically marked dirty after this operation. -//! @param frame The frame with which to initialze the TextLayerLegacy2 +//! @param frame The frame with which to initialize the TextLayerLegacy2 //! @return A pointer to the TextLayerLegacy2. `NULL` if the TextLayerLegacy2 could not //! be created TextLayerLegacy2* text_layer_legacy2_create(GRect frame); @@ -161,7 +161,7 @@ void text_layer_legacy2_set_text_alignment(TextLayerLegacy2 *text_layer, //! By default, layout caching is off (false). Layout caches store the max used //! height and width of a text layer. //! NOTE: when using cached layouts, text_layer_legacy2_deinit() MUST be called at some -//! point in time to prevent memory leaks from occuring. +//! point in time to prevent memory leaks from occurring. void text_layer_legacy2_set_should_cache_layout(TextLayerLegacy2 *text_layer, bool should_cache_layout); diff --git a/src/fw/applib/plugin_service.c b/src/fw/applib/plugin_service.c index c26704cd..02fb5aa6 100644 --- a/src/fw/applib/plugin_service.c +++ b/src/fw/applib/plugin_service.c @@ -49,7 +49,7 @@ static uint16_t prv_get_service_index(Uuid *uuid) { // --------------------------------------------------------------------------------------------------------------- -// Used by list_find to locate the handler for a specfic service index. +// Used by list_find to locate the handler for a specific service index. static bool prv_service_filter(ListNode *node, void *tp) { PluginServiceEntry *info = (PluginServiceEntry *)node; uint16_t service_idx = (uint16_t)(uintptr_t)tp; diff --git a/src/fw/applib/plugin_service_private.h b/src/fw/applib/plugin_service_private.h index 93544b9f..7b42279e 100644 --- a/src/fw/applib/plugin_service_private.h +++ b/src/fw/applib/plugin_service_private.h @@ -32,7 +32,7 @@ typedef struct { typedef struct __attribute__((packed)) PluginServiceState { bool subscribed_to_app_event_service : 1; // Set on first plugin_service_subscribe by this app EventServiceInfo event_service_info; - ListNode subscribed_services; // Linked list of PluginServiceEntrys + ListNode subscribed_services; // Linked list of PluginServiceEntry } PluginServiceState; void plugin_service_state_init(PluginServiceState *state); diff --git a/src/fw/applib/rockyjs/api/rocky_api_app_message.c b/src/fw/applib/rockyjs/api/rocky_api_app_message.c index baf889c4..0e34cf25 100644 --- a/src/fw/applib/rockyjs/api/rocky_api_app_message.c +++ b/src/fw/applib/rockyjs/api/rocky_api_app_message.c @@ -73,7 +73,7 @@ typedef struct { typedef struct OutgoingObject { ListNode node; - //! Working buffer containing the JSON string respresentation of the object. + //! Working buffer containing the JSON string representation of the object. char *data_buffer; //! The next offset in bytes, into the JSON string (excluding the PostMessageChunkPayload diff --git a/src/fw/applib/rockyjs/api/rocky_api_datetime.c b/src/fw/applib/rockyjs/api/rocky_api_datetime.c index 1426b84e..fc52c965 100644 --- a/src/fw/applib/rockyjs/api/rocky_api_datetime.c +++ b/src/fw/applib/rockyjs/api/rocky_api_datetime.c @@ -67,7 +67,7 @@ static bool prv_matches_system_locale(jerry_value_t locale) { return true; } - // in the future, we could run a case-insenstive compare against app_get_system_locale() + // in the future, we could run a case-insensitive compare against app_get_system_locale() // but as we want apps to encourage to be i18n, there's no real point to // receive strings such as 'en-us'. We will ask them to always pass undefined instead return false; diff --git a/src/fw/applib/rockyjs/api/rocky_api_graphics_color.c b/src/fw/applib/rockyjs/api/rocky_api_graphics_color.c index d4839139..3a53808b 100644 --- a/src/fw/applib/rockyjs/api/rocky_api_graphics_color.c +++ b/src/fw/applib/rockyjs/api/rocky_api_graphics_color.c @@ -188,7 +188,7 @@ T_STATIC const RockyAPIGraphicsColorDefinition s_color_definitions[] = { {"transparent", GColorClearARGB8}, {"clear", GColorClearARGB8}, - // Pebble colors taken from gcolor_defitions.h + // Pebble colors taken from gcolor_definitions.h {"black", GColorBlackARGB8}, {"oxfordblue", GColorOxfordBlueARGB8}, {"dukeblue", GColorDukeBlueARGB8}, diff --git a/src/fw/applib/rockyjs/api/rocky_api_memory.c b/src/fw/applib/rockyjs/api/rocky_api_memory.c index be6879e3..d280f513 100644 --- a/src/fw/applib/rockyjs/api/rocky_api_memory.c +++ b/src/fw/applib/rockyjs/api/rocky_api_memory.c @@ -58,7 +58,7 @@ static bool prv_is_headroom_allocated(const RockyMemoryAPIContext *ctx) { } static void prv_allocate_headroom_or_die(RockyMemoryAPIContext *ctx) { - // It's highly likely that while executing a the handler for the 'memorypressure' event, + // It's highly likely that while executing the handler for the 'memorypressure' event, // new objects have been created on the heap. Therefore, it's unlikely we'll be able to reclaim // the desired headroom immediately after returning from the handler. Try to grab as much as we // can and resize it later on, see prv_resize_headroom_if_needed(). @@ -153,7 +153,7 @@ static void prv_memory_callback(jmem_free_unused_memory_severity_t severity, return; } - // Trigger agressive garbage collection, force property hashmaps to be dropped: + // Trigger aggressive garbage collection, force property hashmaps to be dropped: prv_collect_all_garbage(); jmem_heap_stats_t stats = {}; jmem_heap_get_stats(&stats); diff --git a/src/fw/applib/rockyjs/api/rocky_api_tickservice.c b/src/fw/applib/rockyjs/api/rocky_api_tickservice.c index 249542c2..002b1cda 100644 --- a/src/fw/applib/rockyjs/api/rocky_api_tickservice.c +++ b/src/fw/applib/rockyjs/api/rocky_api_tickservice.c @@ -101,5 +101,5 @@ static bool prv_add_handler(const char *event_name, jerry_value_t handler) { const RockyGlobalAPI TICKSERVICE_APIS = { .init = prv_init, .add_handler = prv_add_handler, - // TODO: PBL-43380 apparently, we never unsubsrcibed from tick events… + // TODO: PBL-43380 apparently, we never unsubscribed from tick events… }; diff --git a/src/fw/applib/ui/action_bar_layer.h b/src/fw/applib/ui/action_bar_layer.h index 1fc20aa4..3ad1119b 100644 --- a/src/fw/applib/ui/action_bar_layer.h +++ b/src/fw/applib/ui/action_bar_layer.h @@ -155,7 +155,7 @@ typedef struct { //! @param action_bar The action bar to initialize void action_bar_layer_init(ActionBarLayer *action_bar); -//! Creates a new ActionBarLayer on the heap and initalizes it with the default values. +//! Creates a new ActionBarLayer on the heap and initializes it with the default values. //! * Background color: \ref GColorBlack //! * No click configuration provider (`NULL`) //! * No icons @@ -265,7 +265,7 @@ void action_bar_layer_clear_icon(ActionBarLayer *action_bar, ButtonId button_id) //! @note It is advised to call this is in the window's `.load` or `.appear` //! handler. Make sure to call \ref action_bar_layer_remove_from_window() in the //! window's `.unload` or `.disappear` handler. -//! @note Adding additional layers to the window's root layer after this calll +//! @note Adding additional layers to the window's root layer after this call //! can occlude the action bar. //! @param action_bar The action bar to associate with the window //! @param window The window with which the action bar is to be associated diff --git a/src/fw/applib/ui/action_menu_layer.c b/src/fw/applib/ui/action_menu_layer.c index 6ef516ec..491f0df4 100644 --- a/src/fw/applib/ui/action_menu_layer.c +++ b/src/fw/applib/ui/action_menu_layer.c @@ -589,7 +589,7 @@ static void prv_draw_separator_cb(GContext *ctx, const Layer *cell_layer, system_theme_get_default_content_size_for_runtime_platform(); const ActionMenuSeparatorConfig *config = &s_separator_configs[runtime_platform_default_size]; - // If this index is the seperator index, we want to draw the separator line + // If this index is the separator index, we want to draw the separator line // in the vertical center of the separator const int16_t nudge_down = PBL_IF_RECT_ELSE(3, 0); const int16_t nudge_right = menu_cell_basic_horizontal_inset() + 1; diff --git a/src/fw/applib/ui/action_menu_window.h b/src/fw/applib/ui/action_menu_window.h index 60f23307..9990c4af 100644 --- a/src/fw/applib/ui/action_menu_window.h +++ b/src/fw/applib/ui/action_menu_window.h @@ -68,7 +68,7 @@ typedef void (*ActionMenuWillCloseCb)(ActionMenu *menu, //! Configuration struct for the ActionMenu typedef struct { const ActionMenuLevel *root_level; //!< the root level of the ActionMenu - void *context; //!< a context pointer which will be accessbile when actions are performed + void *context; //!< a context pointer which will be accessible when actions are performed struct { GColor background; //!< the color of the left column of the ActionMenu GColor foreground; //!< the color of the individual "crumbs" that indicate menu depth diff --git a/src/fw/applib/ui/animation.h b/src/fw/applib/ui/animation.h index f2bbf822..fb0299b8 100644 --- a/src/fw/applib/ui/animation.h +++ b/src/fw/applib/ui/animation.h @@ -110,7 +110,7 @@ typedef enum { } AnimationCurve; -//! Creates a new Animation on the heap and initalizes it with the default values. +//! Creates a new Animation on the heap and initializes it with the default values. //! //! * Duration: 250ms, //! * Curve: \ref AnimationCurveEaseInOut (ease-in-out), diff --git a/src/fw/applib/ui/animation_interpolate.h b/src/fw/applib/ui/animation_interpolate.h index c0075668..92579eec 100644 --- a/src/fw/applib/ui/animation_interpolate.h +++ b/src/fw/applib/ui/animation_interpolate.h @@ -48,7 +48,7 @@ int64_t interpolate_int64_linear(int32_t normalized, int64_t from, int64_t to); //! Interpolation between two int64_t. //! In most cases, this is a linear interpolation but the behavior can vary if this function -//! is called from within an animation's update handdler that uses +//! is called from within an animation's update handler that uses //! AnimationCurveCustomInterpolationFunction. This allows clients to transparently implement //! effects such as spatial easing. See \ref animation_set_custom_interpolation(). int64_t interpolate_int64(int32_t normalized, int64_t from, int64_t to); @@ -111,7 +111,7 @@ int64_t interpolate_moook_in_only(int32_t normalized, int64_t from, int64_t to); //! @param from Starting point in space of the animation //! @param to Ending point in space of the animation //! @param bounce_back Whether to lead up to the end point from the opposite direction if we were -//! to lead up from the start poing, which a normal Moook curve would do. +//! to lead up from the start point, which a normal Moook curve would do. int64_t interpolate_moook_out(int32_t normalized, int64_t from, int64_t to, int32_t num_frames_from, bool bounce_back); diff --git a/src/fw/applib/ui/bitmap_layer.c b/src/fw/applib/ui/bitmap_layer.c index 5c86db72..6723cdf6 100644 --- a/src/fw/applib/ui/bitmap_layer.c +++ b/src/fw/applib/ui/bitmap_layer.c @@ -38,7 +38,7 @@ void bitmap_layer_update_proc(BitmapLayer *image, GContext* ctx) { if (!process_manager_compiled_with_legacy2_sdk()) { // Dirty workaround for calculation of offset in graphics_draw_bitmap_in_rect // and preserving state of bitmap alignment in bitmap_layer - // The previous behavior is relied on by some 2.x apps, and therefore we exlude + // The previous behavior is relied on by some 2.x apps, and therefore we exclude // the fix for apps compiled with older SDKs. See PBL-19136 for details. rect.origin.x -= image->layer.bounds.origin.x; rect.origin.y -= image->layer.bounds.origin.y; diff --git a/src/fw/applib/ui/bitmap_layer.h b/src/fw/applib/ui/bitmap_layer.h index b50f2f9e..93e1cc9f 100644 --- a/src/fw/applib/ui/bitmap_layer.h +++ b/src/fw/applib/ui/bitmap_layer.h @@ -75,10 +75,10 @@ typedef struct BitmapLayer { //! //! The bitmap layer is automatically marked dirty after this operation. //! @param bitmap_layer The BitmapLayer to initialize -//! @param frame The frame with which to initialze the BitmapLayer +//! @param frame The frame with which to initialize the BitmapLayer void bitmap_layer_init(BitmapLayer *bitmap_layer, const GRect *frame); -//! Creates a new bitmap layer on the heap and initalizes it the default values. +//! Creates a new bitmap layer on the heap and initializes it the default values. //! //! * Bitmap: `NULL` (none) //! * Background color: \ref GColorClear @@ -120,13 +120,13 @@ const GBitmap* bitmap_layer_get_bitmap(BitmapLayer *bitmap_layer); void bitmap_layer_set_bitmap(BitmapLayer *bitmap_layer, const GBitmap *bitmap); //! Sets the alignment of the image to draw with in frame of the BitmapLayer. -//! The aligment parameter specifies which edges of the bitmap should overlap +//! The alignment parameter specifies which edges of the bitmap should overlap //! with the frame of the BitmapLayer. //! If the bitmap is smaller than the frame of the BitmapLayer, the background //! is filled with the background color. //! //! The bitmap layer is automatically marked dirty after this operation. -//! @param bitmap_layer The BitmapLayer for which to set the aligment +//! @param bitmap_layer The BitmapLayer for which to set the alignment //! @param alignment The new alignment for the image inside the BitmapLayer void bitmap_layer_set_alignment(BitmapLayer *bitmap_layer, GAlign alignment); diff --git a/src/fw/applib/ui/click_internal.h b/src/fw/applib/ui/click_internal.h index 9bd79f54..811e3e53 100644 --- a/src/fw/applib/ui/click_internal.h +++ b/src/fw/applib/ui/click_internal.h @@ -41,7 +41,7 @@ template to the app's ClickRecognizers.

-Whenever a the head of the window stack changes, the OS is responsible +Whenever the head of the window stack changes, the OS is responsible for ensuring that all of its registered click recognizers are reset and reconfigured using the new visible window's ClickConfigProvider. This happens in the window_stack_private_push & diff --git a/src/fw/applib/ui/dialogs/actionable_dialog.h b/src/fw/applib/ui/dialogs/actionable_dialog.h index ee62bbc7..8ff0e73c 100644 --- a/src/fw/applib/ui/dialogs/actionable_dialog.h +++ b/src/fw/applib/ui/dialogs/actionable_dialog.h @@ -41,7 +41,7 @@ void actionable_dialog_init(ActionableDialog *actionable_dialog, const char *dia Dialog *actionable_dialog_get_dialog(ActionableDialog *actionable_dialog); //! Sets the type of action bar to used to one of the pre-defined types or a custom one. -//! @param actionable_dialog Pointer to a \ref ActioanbleDialog whom which to set +//! @param actionable_dialog Pointer to a \ref ActionableDialog whom which to set //! @param action_bar_type The type of action bar to give the passed dialog //! @param action_bar Pointer to an \ref ActionBarLayer to assign to the dialog //! @note: The pointer to an \ref ActionBarLayer is optional and only required when the @@ -53,7 +53,7 @@ void actionable_dialog_set_action_bar_type(ActionableDialog *actionable_dialog, ActionBarLayer *action_bar); //! Sets the ClickConfigProvider of the action bar. If the dialog has a custom action bar then -//! this function has no effect. The action bar is responsible for setting up it's own click +//! this function has no effect. The action bar is responsible for setting up its own click //! config provider //! @param actionable_dialog Pointer to a \ref ActionableDialog to which to set the provider on //! @param click_config_provider The \ref ClickConfigProvider to set diff --git a/src/fw/applib/ui/dialogs/expandable_dialog.h b/src/fw/applib/ui/dialogs/expandable_dialog.h index af4ec336..43434ebf 100644 --- a/src/fw/applib/ui/dialogs/expandable_dialog.h +++ b/src/fw/applib/ui/dialogs/expandable_dialog.h @@ -78,7 +78,7 @@ ExpandableDialog *expandable_dialog_create_with_params(const char *dialog_name, //! Simple callback which closes the dialog when called void expandable_dialog_close_cb(ClickRecognizerRef recognizer, void *e_dialog); -//! Intializes an ExpandableDialog +//! Initializes an ExpandableDialog //! @param expandable_dialog Pointer to an \ref ExpandableDialog //! param dialog_name The name to give the \ref ExpandableDialog void expandable_dialog_init(ExpandableDialog *expandable_dialog, const char *dialog_name); @@ -88,7 +88,7 @@ void expandable_dialog_init(ExpandableDialog *expandable_dialog, const char *dia //! @return \ref Dialog Dialog *expandable_dialog_get_dialog(ExpandableDialog *expandable_dialog); -//! Sets whether or not the expandable dialog should should show its action bar. +//! Sets whether or not the expandable dialog should show its action bar. //! @param expandable_dialog Pointer to the \ref ExpandableDialog to set on //! @param show_action_bar Boolean indicating whether to show the action bar void expandable_dialog_show_action_bar(ExpandableDialog *expandable_dialog, diff --git a/src/fw/applib/ui/dialogs/simple_dialog.c b/src/fw/applib/ui/dialogs/simple_dialog.c index d452a931..87256454 100644 --- a/src/fw/applib/ui/dialogs/simple_dialog.c +++ b/src/fw/applib/ui/dialogs/simple_dialog.c @@ -164,7 +164,7 @@ static void prv_click_handler(ClickRecognizerRef recognizer, void *context) { } static void prv_config_provider(void *context) { - // Simple dialogs are dimissed when any button is pushed. + // Simple dialogs are dismissed when any button is pushed. window_single_click_subscribe(BUTTON_ID_SELECT, prv_click_handler); window_single_click_subscribe(BUTTON_ID_UP, prv_click_handler); window_single_click_subscribe(BUTTON_ID_DOWN, prv_click_handler); diff --git a/src/fw/applib/ui/layer.h b/src/fw/applib/ui/layer.h index 422b7104..15b3c3da 100644 --- a/src/fw/applib/ui/layer.h +++ b/src/fw/applib/ui/layer.h @@ -172,7 +172,7 @@ void layer_init(Layer *layer, const GRect *frame); //! be created Layer* layer_create(GRect frame); -//! Creates a layer on the heap with extra space for callback data, and set its frame andbounds. +//! Creates a layer on the heap with extra space for callback data, and set its frame and bounds. //! Default values: //! * `bounds` : origin (0, 0) and a size equal to the frame that is passed in. //! * `clips` : `true` diff --git a/src/fw/applib/ui/menu_layer.c b/src/fw/applib/ui/menu_layer.c index de5b8ebc..619c7db2 100644 --- a/src/fw/applib/ui/menu_layer.c +++ b/src/fw/applib/ui/menu_layer.c @@ -393,7 +393,7 @@ static void prv_menu_layer_walk_downward_from_iterator(MenuIterator *it) { it->cursor.sep = prv_menu_layer_get_separator_height(it->menu_layer, &it->cursor.index); it->cursor.y = it->cell_bottom_y; // Bottom of previous cell is y of the next cell - // Don't leave space for the seperator for the (non-existent) row after the last row. + // Don't leave space for the separator for the (nonexistent) row after the last row. // This doesn't impact cell drawing in this loop (this condition will only trip on the last run). // But, other parts of the system rely on the cursor being set properly at the end of this iteration. if (it->cursor.index.row < num_rows_in_section - 1 || it->cursor.index.section < num_sections - 1) { @@ -471,7 +471,7 @@ static void prv_menu_layer_walk_upward_from_iterator(MenuIterator *it) { const int16_t total_height = it->cursor.h + it->cursor.sep; if (total_height > it->cursor.y) { // If the total height is greater than the cursor y, don't - // add in space to accodomate the separator as the downwards callback + // add in space to accommodate the separator as the downwards callback // will add it for us. it->cursor.y -= it->cursor.h; } else { @@ -1055,7 +1055,7 @@ void prv_center_focus_animation_update_in_and_out(Animation *animation, void prv_center_focus_animation_update_out_only(Animation *animation, const AnimationProgress progress) { - // anwalys only render the bounce back + // anyways only render the bounce back prv_center_focus_animation_update_impl(animation, true, progress); } diff --git a/src/fw/applib/ui/menu_layer.h b/src/fw/applib/ui/menu_layer.h index 289bffa2..41d882a6 100644 --- a/src/fw/applib/ui/menu_layer.h +++ b/src/fw/applib/ui/menu_layer.h @@ -214,7 +214,7 @@ typedef void (*MenuLayerDrawSeparatorCallback)(GContext* ctx, //! Function signature for the callback to handle the event that a user hits //! the SELECT button. -//! @param menu_layer The \ref MenuLayer for which the selection event occured +//! @param menu_layer The \ref MenuLayer for which the selection event occurred //! @param cell_index The MenuIndex of the cell that is selected //! @param callback_context The callback context //! @see \ref menu_layer_set_callbacks() @@ -225,7 +225,7 @@ typedef void (*MenuLayerSelectCallback)(struct MenuLayer *menu_layer, //! Function signature for the callback to handle a change in the current //! selected item in the menu. -//! @param menu_layer The \ref MenuLayer for which the selection event occured +//! @param menu_layer The \ref MenuLayer for which the selection event occurred //! @param new_index The MenuIndex of the new item that is selected now //! @param old_index The MenuIndex of the old item that was selected before //! @param callback_context The callback context @@ -239,7 +239,7 @@ typedef void (*MenuLayerSelectionChangedCallback)(struct MenuLayer *menu_layer, //! Function signature for the callback which allows or changes selection behavior of the menu. //! In order to change the cell that should be selected, modify the passed in new_index. //! Preventing the selection from changing, new_index can be assigned the value of old_index. -//! @param menu_layer The \ref MenuLayer for which the selection event that occured +//! @param menu_layer The \ref MenuLayer for which the selection event that occurred //! @param new_index Pointer to the index that the MenuLayer is going to change selection to. //! @param old_index The index that is being unselected. //! @param callback_context The callback context @@ -374,13 +374,13 @@ typedef struct MenuLayer { MenuCellSpan cursor; } cache; //! @internal - //! Selected cell index + geometery cache of the selected cell + //! Selected cell index + geometry cache of the selected cell MenuCellSpan selection; MenuLayerCallbacks callbacks; void *callback_context; //! Default colors to be used for \ref MenuLayer. - //! Use MenuLayerColorNormal and MenuLayerColorHightlight for indexing. + //! Use MenuLayerColorNormal and MenuLayerColorHighlight for indexing. GColor normal_colors[MenuLayerColor_Count]; GColor highlight_colors[MenuLayerColor_Count]; @@ -435,10 +435,10 @@ typedef struct MenuLayer { //! will be selected initially. //! The layer is marked dirty automatically. //! @param menu_layer The \ref MenuLayer to initialize -//! @param frame The frame with which to initialze the \ref MenuLayer +//! @param frame The frame with which to initialize the \ref MenuLayer void menu_layer_init(MenuLayer *menu_layer, const GRect *frame); -//! Creates a new \ref MenuLayer on the heap and initalizes it with the default values. +//! Creates a new \ref MenuLayer on the heap and initializes it with the default values. //! //! * Clips: `true` //! * Hidden: `false` @@ -560,7 +560,7 @@ void menu_layer_set_selected_next(MenuLayer *menu_layer, //! @param scroll_align The alignment of the new selection //! @param animated Supply `true` to animate changing the selection, or `false` //! to change the selection instantly. -//! @note If the section and/or row index exceeds the avaible number of sections +//! @note If the section and/or row index exceeds the available number of sections //! or resp. rows, the exceeding index/indices will be capped, effectively //! selecting the last section and/or row, resp. void menu_layer_set_selected_index(MenuLayer *menu_layer, diff --git a/src/fw/applib/ui/menu_layer_system_cells.c b/src/fw/applib/ui/menu_layer_system_cells.c index 3a2a82a9..a8dacbda 100644 --- a/src/fw/applib/ui/menu_layer_system_cells.c +++ b/src/fw/applib/ui/menu_layer_system_cells.c @@ -283,12 +283,12 @@ static ALWAYS_INLINE GRect prv_menu_cell_basic_draw_custom_one_column_round( const bool can_use_two_lines_for_title = !(render_subtitle || render_icon); const bool can_use_many_lines_for_title = (config->overflow_mode == GTextOverflowModeWordWrap); - const int16_t intitial_title_text_lines = can_use_two_lines_for_title ? 2 : 1; + const int16_t initial_title_text_lines = can_use_two_lines_for_title ? 2 : 1; int16_t title_text_frame_height = can_use_many_lines_for_title ? graphics_text_layout_get_text_height(ctx, config->title, title_font, cell_layer_bounds_size.w, config->overflow_mode, text_alignment) - : title_font_height * intitial_title_text_lines; + : title_font_height * initial_title_text_lines; const int title_text_cap_offset = (config->title) ? fonts_get_font_cap_offset(title_font) : 0; int16_t container_height = title_text_frame_height + subtitle_text_frame_height; diff --git a/src/fw/applib/ui/number_window.c b/src/fw/applib/ui/number_window.c index bec3de28..47aa4a5b 100644 --- a/src/fw/applib/ui/number_window.c +++ b/src/fw/applib/ui/number_window.c @@ -110,7 +110,7 @@ void prv_update_proc(Layer *layer, GContext* ctx) { graphics_context_set_fill_color(ctx, GColorWhite); graphics_fill_rect(ctx, &layer->bounds); - // This is safe becase Layer is the first member in Window and Window is the first member in + // This is safe because Layer is the first member in Window and Window is the first member in // NumberWindow. _Static_assert(offsetof(Window, layer) == 0, ""); _Static_assert(offsetof(NumberWindow, window) == 0, ""); diff --git a/src/fw/applib/ui/number_window.h b/src/fw/applib/ui/number_window.h index 1c1333d5..0c6fa3ad 100644 --- a/src/fw/applib/ui/number_window.h +++ b/src/fw/applib/ui/number_window.h @@ -89,7 +89,7 @@ typedef struct NumberWindow { //! See code fragment here: NumberWindow void number_window_init(NumberWindow *numberwindow, const char *label, NumberWindowCallbacks callbacks, void *callback_context); -//! Creates a new NumberWindow on the heap and initalizes it with the default values. +//! Creates a new NumberWindow on the heap and initializes it with the default values. //! //! @param label The title or prompt to display in the NumberWindow. Must be long-lived and cannot be stack-allocated. //! @param callbacks The callbacks diff --git a/src/fw/applib/ui/progress_window.h b/src/fw/applib/ui/progress_window.h index f8cc46f8..6356e269 100644 --- a/src/fw/applib/ui/progress_window.h +++ b/src/fw/applib/ui/progress_window.h @@ -27,7 +27,7 @@ //! //! A UI component that is a window that contains a progress bar. The state of the progress bar //! is updated using progress_window_set_progress. When the window is first pushed, the progress -//! bar will fill on it's own, faking progress until the max_fake_progress_percent threshold is +//! bar will fill on its own, faking progress until the max_fake_progress_percent threshold is //! hit. Once the client wishes to indicate success or failure, calling //! progress_window_set_progress_success or progress_window_set_progress_failure will cause the //! UI to animate out to indicate the result, followed by calling the .finished callback if @@ -107,7 +107,7 @@ void progress_window_set_max_fake_progress(ProgressWindow *window, //! Update the progress to a given percentage. This will stop any further fake progress being shown //! the first time this is called. Note that setting progress to 100 is not the same as calling -//! one of the progress_windw_set_result_* methods. +//! one of the progress_window_set_result_* methods. void progress_window_set_progress(ProgressWindow *window, int16_t progress); //! Tell the ProgressWindow it should animate in a way to show success. When the animation is diff --git a/src/fw/applib/ui/property_animation.c b/src/fw/applib/ui/property_animation.c index 2d10e208..fc03b8f2 100644 --- a/src/fw/applib/ui/property_animation.c +++ b/src/fw/applib/ui/property_animation.c @@ -61,7 +61,7 @@ static inline PropertyAnimationPrivate *prv_find_property_animation(PropertyAnim void property_animation_update_int16(PropertyAnimation *property_animation_h, const uint32_t distance_normalized) { if (animation_private_using_legacy_2(NULL)) { - // We need to enable other applib modules like sroll_layer, menu_layer, etc. which are + // We need to enable other applib modules like scroll_layer, menu_layer, etc. which are // compiled to use the 3.0 animation API to work with 2.0 apps. property_animation_legacy2_update_int16((PropertyAnimationLegacy2 *)property_animation_h, distance_normalized); diff --git a/src/fw/applib/ui/property_animation.h b/src/fw/applib/ui/property_animation.h index 71d63f56..90bd9a58 100644 --- a/src/fw/applib/ui/property_animation.h +++ b/src/fw/applib/ui/property_animation.h @@ -29,7 +29,7 @@ //! @addtogroup Animation //! @{ //! @addtogroup PropertyAnimation -//! \brief A ProperyAnimation animates the value of a "property" of a "subject" over time. +//! \brief A PropertyAnimation animates the value of a "property" of a "subject" over time. //! //!

Animating a Layer's frame property

//! Currently there is only one specific type of property animation offered off-the-shelf, namely @@ -57,7 +57,7 @@ //! Any setter needs to have to following function signature: `void setter(void *subject, //! __type__ value);` //! See \ref Int16Getter, \ref Int16Setter, \ref GPointGetter, \ref GPointSetter, -//! \ref GRectGetter, \ref GRectSetter for the typedefs that accompany the update fuctions. +//! \ref GRectGetter, \ref GRectSetter for the typedefs that accompany the update functions. //! //! \code{.c} //! static const PropertyAnimationImplementation my_implementation = { @@ -534,7 +534,7 @@ bool property_animation_to(PropertyAnimation *property_animation, void *to, size // Implementing custom Property Animations // -//! Creates a new PropertyAnimation on the heap and and initializes it with the specified values. +//! Creates a new PropertyAnimation on the heap and initializes it with the specified values. //! The same defaults are used as with \ref animation_create(). //! If the `from_value` or the `to_value` is `NULL`, the getter accessor will be called to get the //! current value of the property and be used instead. diff --git a/src/fw/applib/ui/rotbmp_pair_layer.c b/src/fw/applib/ui/rotbmp_pair_layer.c index a64627d0..eb193414 100644 --- a/src/fw/applib/ui/rotbmp_pair_layer.c +++ b/src/fw/applib/ui/rotbmp_pair_layer.c @@ -65,7 +65,7 @@ void rotbmp_pair_layer_set_src_ic(RotBmpPairLayer *pair, GPoint ic) { pair->white_layer.layer.bounds.size }); } -void rotbmp_pair_layer_inver_colors(RotBmpPairLayer *pair) { +void rotbmp_pair_layer_invert_colors(RotBmpPairLayer *pair) { RotBitmapLayer temp = pair->black_layer; pair->black_layer = pair->white_layer; pair->white_layer = temp; diff --git a/src/fw/applib/ui/rotbmp_pair_layer.h b/src/fw/applib/ui/rotbmp_pair_layer.h index 31791a7a..30251ac2 100644 --- a/src/fw/applib/ui/rotbmp_pair_layer.h +++ b/src/fw/applib/ui/rotbmp_pair_layer.h @@ -32,7 +32,7 @@ typedef struct { } RotBmpPairLayer; -//! white and black *must* have the same dimensions, and *shouldn't* have any overlapp of eachother +//! white and black *must* have the same dimensions, and *shouldn't* have any overlap of each other void rotbmp_pair_layer_init(RotBmpPairLayer *pair, GBitmap *white, GBitmap *black); void rotbmp_pair_layer_deinit(RotBmpPairLayer *pair); @@ -43,4 +43,4 @@ void rotbmp_pair_layer_increment_angle(RotBmpPairLayer *pair, int32_t angle_chan void rotbmp_pair_layer_set_src_ic(RotBmpPairLayer *pair, GPoint ic); //! exchanges black with white -void rotbmp_pair_layer_inver_colors(RotBmpPairLayer *pair); +void rotbmp_pair_layer_invert_colors(RotBmpPairLayer *pair); diff --git a/src/fw/applib/ui/scroll_layer.h b/src/fw/applib/ui/scroll_layer.h index 686de2de..e596a521 100644 --- a/src/fw/applib/ui/scroll_layer.h +++ b/src/fw/applib/ui/scroll_layer.h @@ -51,7 +51,7 @@ //! UP and DOWN buttons with scrolling up and down. //! * The SELECT button can be configured by installing a click configuration //! provider using \ref scroll_layer_set_callbacks(). -//! * To scroll programatically to a certain offset, use +//! * To scroll programmatically to a certain offset, use //! \ref scroll_layer_set_content_offset(). //! * It is possible to get called back for each scrolling increment, by //! installing the `.content_offset_changed_handler` callback using @@ -76,7 +76,7 @@ typedef struct ScrollLayerCallbacks { //! scrolling behavior. ClickConfigProvider click_config_provider; - //! Called every time the the content offset changes. During a scrolling + //! Called every time the content offset changes. During a scrolling //! animation, it will be called for each intermediary offset as well ScrollLayerCallback content_offset_changed_handler; @@ -156,10 +156,10 @@ _Static_assert(offsetof(struct ScrollPaging, flags) == offsetof(Layer, flags), //! * Callback context: `NULL` //! The layer is marked dirty automatically. //! @param scroll_layer The ScrollLayer to initialize -//! @param frame The frame with which to initialze the ScrollLayer +//! @param frame The frame with which to initialize the ScrollLayer void scroll_layer_init(ScrollLayer *scroll_layer, const GRect *frame); -//! Creates a new ScrollLayer on the heap and initalizes it with the default values: +//! Creates a new ScrollLayer on the heap and initializes it with the default values: //! * Clips: `true` //! * Hidden: `false` //! * Content size: `frame.size` diff --git a/src/fw/applib/ui/selection_layer.c b/src/fw/applib/ui/selection_layer.c index 8d8644e6..b6f35a57 100644 --- a/src/fw/applib/ui/selection_layer.c +++ b/src/fw/applib/ui/selection_layer.c @@ -228,7 +228,7 @@ static void prv_draw_slider_slide(SelectionLayer *selection_layer, GContext *ctx // It then morphs to the size of the next cell + padding causing the illusion that the selector // overshoot it's mark (it will settle back to the correct size in a different animation). - // This means the the width change is the width difference between the two cells plus padding + // This means the width change is the width difference between the two cells plus padding int total_cell_width_change = next_cell_width - cur_cell_width + selection_layer->cell_padding; // The current width change depends on how far we are through the animation @@ -293,7 +293,7 @@ static void prv_draw_text(SelectionLayer *selection_layer, GContext *ctx) { height += prv_get_pixels_for_bump_settle(selection_layer->bump_settle_anim_progress); } // The text should be be vertically centered, unless we are performing an increment / - // decrment animation. + // decrement animation. int y_offset = prv_get_y_offset_which_vertically_centers_font(selection_layer->font, height); @@ -341,7 +341,7 @@ static void prv_draw_selection_layer(SelectionLayer *selection_layer, GContext * /////////////////////////////////////////////////////////////////////////////////////////////////// //! Increment / Decrement Animation -//! This animation causes a the active cell to "bump" when the user presses the up button. +//! This animation causes the active cell to "bump" when the user presses the up button. //! This animation has two parts: //! 1) The "text to cell edge" //! 2) The "background settle" diff --git a/src/fw/applib/ui/selection_layer.h b/src/fw/applib/ui/selection_layer.h index 90e4a77e..f20c1d82 100644 --- a/src/fw/applib/ui/selection_layer.h +++ b/src/fw/applib/ui/selection_layer.h @@ -48,7 +48,7 @@ typedef struct SelectionLayer { unsigned cell_padding; unsigned selected_cell_idx; - // If is_active = false the the selected cell will become invalid, and any clicks will be ignored + // If is_active = false the selected cell will become invalid, and any clicks will be ignored bool is_active; GFont font; diff --git a/src/fw/applib/ui/text_layer.h b/src/fw/applib/ui/text_layer.h index 8a1550b1..50a5d9c7 100644 --- a/src/fw/applib/ui/text_layer.h +++ b/src/fw/applib/ui/text_layer.h @@ -71,7 +71,7 @@ typedef struct TextLayer { //! //! The text layer is automatically marked dirty after this operation. //! @param text_layer The TextLayer to initialize -//! @param frame The frame with which to initialze the TextLayer +//! @param frame The frame with which to initialize the TextLayer void text_layer_init(TextLayer *text_layer, const GRect *frame); //! Creates a new TextLayer on the heap and initializes it with the default values. @@ -85,7 +85,7 @@ void text_layer_init(TextLayer *text_layer, const GRect *frame); //! * Caching: `false` //! //! The text layer is automatically marked dirty after this operation. -//! @param frame The frame with which to initialze the TextLayer +//! @param frame The frame with which to initialize the TextLayer //! @return A pointer to the TextLayer. `NULL` if the TextLayer could not //! be created TextLayer* text_layer_create(GRect frame); @@ -158,7 +158,7 @@ void text_layer_set_text_alignment(TextLayer *text_layer, GTextAlignment text_al //! By default, layout caching is off (false). Layout caches store the max used //! height and width of a text layer. //! NOTE: when using cached layouts, text_layer_deinit() MUST be called at some -//! point in time to prevent memory leaks from occuring. +//! point in time to prevent memory leaks from occurring. void text_layer_set_should_cache_layout(TextLayer *text_layer, bool should_cache_layout); //! @internal diff --git a/src/fw/applib/ui/window.h b/src/fw/applib/ui/window.h index 850fcbb7..78fc723a 100644 --- a/src/fw/applib/ui/window.h +++ b/src/fw/applib/ui/window.h @@ -178,7 +178,7 @@ typedef struct Window { //! @param debug_name The window's debug name void window_init(Window *window, const char* debug_name); -//! Creates a new Window on the heap and initalizes it with the default values. +//! Creates a new Window on the heap and initializes it with the default values. //! //! * Background color : `GColorWhite` //! * Root layer's `update_proc` : function that fills the window's background using `background_color`. @@ -328,14 +328,14 @@ struct Layer* window_get_root_layer(const Window *window); void window_set_background_color(Window *window, GColor background_color); void window_set_background_color_2bit(Window *window, GColor2 background_color); -//! Sets whether or not the window is fullscreen, consequently hiding the sytem status bar. +//! Sets whether or not the window is fullscreen, consequently hiding the system status bar. //! @note This needs to be called before pushing a window to the window stack. //! @param window The window for which to set its full-screen property //! @param enabled True to make the window full-screen or false to leave space for the system status bar. //! @see \ref window_get_fullscreen() void window_set_fullscreen(Window *window, bool enabled); -//! Gets whether the window is full-screen, consequently hiding the sytem status bar. +//! Gets whether the window is full-screen, consequently hiding the system status bar. //! @param window The window for which to get its full-screen property //! @return True if the window is marked as fullscreen, false if it is not marked as fullscreen. bool window_get_fullscreen(const Window *window); diff --git a/src/fw/applib/ui/window_private.h b/src/fw/applib/ui/window_private.h index bb613110..3b164524 100644 --- a/src/fw/applib/ui/window_private.h +++ b/src/fw/applib/ui/window_private.h @@ -20,7 +20,7 @@ #include -//! Internal interface for glayer to schedule a render for the window: +//! Internal interface for layer to schedule a render for the window: //! @param window Pointer to the window to schedule void window_schedule_render(Window *window); @@ -50,8 +50,8 @@ GRect window_calc_frame(bool fullscreen); bool window_has_status_bar(Window *window); //! @param window Pointer to the \ref Window to set -//! @param overrides_back_button Boolean indicating if the back button has been overriden -//! in the \ref ClickConfigProvidier of the passed \ref Window +//! @param overrides_back_button Boolean indicating if the back button has been overridden +//! in the \ref ClickConfigProvider of the passed \ref Window void window_set_overrides_back_button(Window *window, bool overrides_back_button); //! @internal diff --git a/src/fw/applib/ui/window_stack_animation.h b/src/fw/applib/ui/window_stack_animation.h index 40023bd9..723dc0a0 100644 --- a/src/fw/applib/ui/window_stack_animation.h +++ b/src/fw/applib/ui/window_stack_animation.h @@ -36,7 +36,7 @@ typedef void (*WindowTransitionImplementationRenderFunc)(WindowTransitioningCont // needs to // create an animation that drives the visible transition // (e.g. by moving context.window_to.layer.frame) -// call context.window_from.handlers.disappear and context.window_to.handers.appear et al. +// call context.window_from.handlers.disappear and context.window_to.handlers.appear et al. // doesn't need to // restore context.window_from.layer.frame (framework will do that) // if no animation is returned by .create_animation, the windows will be replaced immediately diff --git a/src/fw/apps/core_apps/spinner_ui_window.c b/src/fw/apps/core_apps/spinner_ui_window.c index dc979520..42c63bb5 100644 --- a/src/fw/apps/core_apps/spinner_ui_window.c +++ b/src/fw/apps/core_apps/spinner_ui_window.c @@ -51,7 +51,7 @@ typedef struct { // There is a slight delay (lag) between the animation stopping and starting it again. To minimize // this, make the animation contain multiple loops (360 degree rotations) instead of 1. -// This means that the the lag occurs once less frequently and is less noticable +// This means that the lag occurs once less frequently and is less noticable #define LOOPS_PER_ANIMATION 10 #define LOOP_DURATION_MS 1500 diff --git a/src/fw/apps/demo_apps/animated_demo.c b/src/fw/apps/demo_apps/animated_demo.c index aa4c5f09..22e6b498 100644 --- a/src/fw/apps/demo_apps/animated_demo.c +++ b/src/fw/apps/demo_apps/animated_demo.c @@ -96,7 +96,7 @@ static void click_handler(ClickRecognizerRef recognizer, Window *window) { } /* - // Exmple animation parameters: + // Example animation parameters: // Duration defaults to 250 ms animation_set_duration(animation, 1000); diff --git a/src/fw/apps/demo_apps/click_app.c b/src/fw/apps/demo_apps/click_app.c index b2cea379..6360aead 100644 --- a/src/fw/apps/demo_apps/click_app.c +++ b/src/fw/apps/demo_apps/click_app.c @@ -117,7 +117,7 @@ static void config_provider(Window *window) { // See ui/click.h for more information and default values. // single click / repeat-on-hold config: - window_single_repeating_click_subscribe(BUTTON_ID_SELECT, 1000, (ClickHandler)select_single_click_handler); // "hold-to-repeat" gets overriden if there's a long click handler configured! + window_single_repeating_click_subscribe(BUTTON_ID_SELECT, 1000, (ClickHandler)select_single_click_handler); // "hold-to-repeat" gets overridden if there's a long click handler configured! // multi click config: window_multi_click_subscribe(BUTTON_ID_SELECT, 2, 10, 0, false, (ClickHandler) select_multi_click_handler); @@ -126,7 +126,7 @@ static void config_provider(Window *window) { window_long_click_subscribe(BUTTON_ID_SELECT, 700, (ClickHandler) select_long_click_handler, (ClickHandler) select_long_click_release_handler); // single click / repeat-on-hold config: - window_single_repeating_click_subscribe(BUTTON_ID_UP, 1000, (ClickHandler) select_single_click_handler); // "hold-to-repeat" gets overriden if there's a long click handler configured! + window_single_repeating_click_subscribe(BUTTON_ID_UP, 1000, (ClickHandler) select_single_click_handler); // "hold-to-repeat" gets overridden if there's a long click handler configured! // multi click config: window_multi_click_subscribe(BUTTON_ID_UP, 2, 10, 0, true, (ClickHandler) select_multi_click_handler); diff --git a/src/fw/apps/demo_apps/flash_test.c b/src/fw/apps/demo_apps/flash_test.c index bcf0bc8d..db2e0763 100644 --- a/src/fw/apps/demo_apps/flash_test.c +++ b/src/fw/apps/demo_apps/flash_test.c @@ -179,7 +179,7 @@ void flash_test_dismiss_window(void) { window_stack_remove(&data->test_window, animated); } -static void up_click_handler(ClickRecognizerRef recognizer, void *unusued) { +static void up_click_handler(ClickRecognizerRef recognizer, void *unused) { struct FlashTestData *data = app_state_get_user_data(); if (data->test_case_status != FLASH_TEST_STATUS_RUNNING) { @@ -187,7 +187,7 @@ static void up_click_handler(ClickRecognizerRef recognizer, void *unusued) { } } -static void down_click_handler(ClickRecognizerRef recognizer, void *unusued) { +static void down_click_handler(ClickRecognizerRef recognizer, void *unused) { struct FlashTestData *data = app_state_get_user_data(); // Only stop stress test @@ -216,7 +216,7 @@ static void run_test(void* context) { update_test_case_status(data); } -static void select_click_handler(ClickRecognizerRef recognizer, void *unusued) { +static void select_click_handler(ClickRecognizerRef recognizer, void *unused) { struct FlashTestData *data = app_state_get_user_data(); if ((data->test_case == FLASH_TEST_CASE_RUN_STRESS_ADDR_TEST) && (data->test_case_status == FLASH_TEST_STATUS_RUNNING)) { diff --git a/src/fw/apps/demo_apps/fps_test_app.c b/src/fw/apps/demo_apps/fps_test_app.c index 4d1f4a26..0653c0fc 100644 --- a/src/fw/apps/demo_apps/fps_test_app.c +++ b/src/fw/apps/demo_apps/fps_test_app.c @@ -164,7 +164,7 @@ static void prv_window_update_proc(struct Layer *layer, GContext *ctx) { data->rendered_frames++; } -static void prv_window_disapper(Window *window) { +static void prv_window_disappear(Window *window) { } void prv_syncing_content_offset_changed(struct ScrollLayer *scroll_layer, void *context) { @@ -183,7 +183,7 @@ static void prv_window_load(Window *window) { // one image at the top left .topleft_layer, // and two menu layers .action_list1 and .action_list2 that overlay each other - // some hackery with the two menu layers goes on to keep their scroll offest in sync + // some hackery with the two menu layers goes on to keep their scroll offset in sync // and to have the inverter layer rendered only once const int16_t navbar_width = s_fps_topleft_bitmap.bounds.size.w; @@ -256,7 +256,7 @@ static void s_main(void) { window_set_window_handlers(window, &(WindowHandlers) { .load = prv_window_load, .unload = prv_window_unload, - .disappear = prv_window_disapper, + .disappear = prv_window_disappear, }); app_window_stack_push(window, true); diff --git a/src/fw/apps/demo_apps/pebble_colors.c b/src/fw/apps/demo_apps/pebble_colors.c index f818e2da..9b89c25d 100644 --- a/src/fw/apps/demo_apps/pebble_colors.c +++ b/src/fw/apps/demo_apps/pebble_colors.c @@ -229,7 +229,7 @@ static void set_text_layers(AppData *data) { } else if (data->alpha == ALPHA_66) { alpha_percent = 50; // FIXME: Currently don't support 66 } else if (data->alpha == ALPHA_33) { - alpha_percent = 25; // FIXME: Currenlty don't support 33 + alpha_percent = 25; // FIXME: Currently don't support 33 } else if (data->alpha == ALPHA_0) { alpha_percent = 0; } diff --git a/src/fw/apps/demo_apps/statusbar_demo.c b/src/fw/apps/demo_apps/statusbar_demo.c index e3140635..1727abd1 100644 --- a/src/fw/apps/demo_apps/statusbar_demo.c +++ b/src/fw/apps/demo_apps/statusbar_demo.c @@ -34,7 +34,7 @@ static void prv_handle_click(ClickRecognizerRef ref, void *context) { app_window_stack_push(window, true); } -static void prv_click_config_proivider(void *context) { +static void prv_click_config_provider(void *context) { window_single_click_subscribe(BUTTON_ID_SELECT, prv_handle_click); } @@ -106,7 +106,7 @@ static Window *prv_window_create(void) { layer_add_child(&window->window.layer, &status_bar->layer); } - window_set_click_config_provider(result, prv_click_config_proivider); + window_set_click_config_provider(result, prv_click_config_provider); window_set_window_handlers(&window->window, &(WindowHandlers){ .unload = prv_window_unload, diff --git a/src/fw/apps/demo_apps/stroke_width.c b/src/fw/apps/demo_apps/stroke_width.c index a9f28404..8b6504f0 100644 --- a/src/fw/apps/demo_apps/stroke_width.c +++ b/src/fw/apps/demo_apps/stroke_width.c @@ -286,8 +286,8 @@ static void canvas_update_proc(Layer *layer, GContext* ctx) { uint16_t now_ms = time_ms(&now, NULL); uint32_t seconds = pbl_override_localtime(&now)->tm_sec; - uint32_t miliseconds = seconds * 1000 + now_ms; - uint32_t rotation = miliseconds * TRIG_MAX_ANGLE / (60 * 1000); + uint32_t milliseconds = seconds * 1000 + now_ms; + uint32_t rotation = milliseconds * TRIG_MAX_ANGLE / (60 * 1000); GPointPrecise p0; GPointPrecise p1; @@ -317,8 +317,8 @@ static void canvas_update_proc(Layer *layer, GContext* ctx) { uint16_t now_ms = time_ms(&now, NULL); uint32_t seconds = pbl_override_localtime(&now)->tm_sec; - uint32_t miliseconds = seconds * 1000 + now_ms; - uint32_t rotation = miliseconds * TRIG_MAX_ANGLE / (60 * 1000); + uint32_t milliseconds = seconds * 1000 + now_ms; + uint32_t rotation = milliseconds * TRIG_MAX_ANGLE / (60 * 1000); GPointPrecise p0; GPointPrecise p1; diff --git a/src/fw/apps/demo_apps/test_mpu_cache.c b/src/fw/apps/demo_apps/test_mpu_cache.c index 8ccbfa63..0469868b 100644 --- a/src/fw/apps/demo_apps/test_mpu_cache.c +++ b/src/fw/apps/demo_apps/test_mpu_cache.c @@ -57,7 +57,7 @@ static void prv_verify_modify_on_app_task(void *data) { if (app_data->test != 0x3C3C3C3C) { text_layer_set_text(&app_data->text, "FAILED"); } else { - text_layer_set_text(&app_data->text, "PASSSED"); + text_layer_set_text(&app_data->text, "PASSED"); } } diff --git a/src/fw/apps/demo_apps/test_sys_timer_app.c b/src/fw/apps/demo_apps/test_sys_timer_app.c index 6d7564ec..860d3082 100644 --- a/src/fw/apps/demo_apps/test_sys_timer_app.c +++ b/src/fw/apps/demo_apps/test_sys_timer_app.c @@ -315,7 +315,7 @@ void stuck_callback_menu_cb(int index, void *ctx) { } // ================================================================================= -void invaid_timer_id_menu_cb(int index, void *ctx) { +void invalid_timer_id_menu_cb(int index, void *ctx) { void *cb_data = 0; uint32_t zero_flags = 0; @@ -405,7 +405,7 @@ static void prv_window_load(Window *window) { .callback = stuck_callback_menu_cb }, { .title = "invalid timer ID", - .callback = invaid_timer_id_menu_cb + .callback = invalid_timer_id_menu_cb }, { .title = "RT: sch 1 sec from cb", .callback = reg_timer_schedule_1sec_from_cb_menu_cb diff --git a/src/fw/apps/demo_apps/timeline_pins_demo.c b/src/fw/apps/demo_apps/timeline_pins_demo.c index 539400ca..6436f951 100644 --- a/src/fw/apps/demo_apps/timeline_pins_demo.c +++ b/src/fw/apps/demo_apps/timeline_pins_demo.c @@ -71,7 +71,7 @@ static void prv_add_notification(int32_t delta_time_s) { "Angela Tam", "Liron Damir", "Heiko Behrens", "Kevin Conley", "Matt Hungerford", }; char *bodies[] = { - "Late again? Can you be on time ever? Seriosly? Dude!!!", + "Late again? Can you be on time ever? Seriously? Dude!!!", "Late again. Sorry, I'll be there a few minutes. Meanwhile, I am just texting long messages.", "What's up for lunch?", "\xF0\x9F\x98\x83 \xF0\x9F\x92\xA9", diff --git a/src/fw/apps/prf_apps/mfg_btle_app.c b/src/fw/apps/prf_apps/mfg_btle_app.c index 290a44e6..d3f82771 100644 --- a/src/fw/apps/prf_apps/mfg_btle_app.c +++ b/src/fw/apps/prf_apps/mfg_btle_app.c @@ -155,7 +155,7 @@ static void prv_txrx_menu_update(AppData *data); // and use that to know how to proceed through. // // A BTLE test gets started, and needs to be manually stopped. -// This means that setup setup goes like this: +// This means that setup goes like this: // // 1. User Signals "RUN" // 2. bt_test_start() @@ -174,7 +174,7 @@ static void prv_response_cb(HciStatusCode status, const uint8_t *payload) { // RX Test, need to keep track of received packets // Payload is as follows: // | 1 byte | 2 bytes | - // | success | recieved packets | + // | success | received packets | // So we want grab a uint16_t from 1 byte into the payload const uint16_t *received_packets = (uint16_t *)(payload + 1); data->rx_test_received_packets = *received_packets; @@ -459,7 +459,7 @@ static void prv_status_window_init(AppData *data) { //-------------------------------------------------------------------------------- // TX/RX Menus & Windows //-------------------------------------------------------------------------------- -// The same menu layer is reused for TX / RX, we just handle it differentely +// The same menu layer is reused for TX / RX, we just handle it differently // based on whether we are currently executing a TX or RX test. #define TX_MENU_NUM_PAYLOAD_ROWS (2) diff --git a/src/fw/apps/prf_apps/recovery_first_use_app/getting_started_button_combo.h b/src/fw/apps/prf_apps/recovery_first_use_app/getting_started_button_combo.h index 24bda27d..d8f7d294 100644 --- a/src/fw/apps/prf_apps/recovery_first_use_app/getting_started_button_combo.h +++ b/src/fw/apps/prf_apps/recovery_first_use_app/getting_started_button_combo.h @@ -32,8 +32,8 @@ //! The reason it's not just a boring set of long click handlers is because we don't support //! registering a long click handler for a combination of buttons like up+down. //! -//! I tried to split this out from a seperate file from the recovery_first_use.c file so I could -//! test this behaviour in a unit test independant in the UI. I think it turned out /okay/. The +//! I tried to split this out from a separate file from the recovery_first_use.c file so I could +//! test this behaviour in a unit test independent in the UI. I think it turned out /okay/. The //! callback specification is a little odd (only for select but not for the other ones, should we //! be blowing memory on static behaviour like this?) but it was worth a shot. @@ -46,7 +46,7 @@ typedef struct { //! Timer for how long the combination has been held for. We use new_timer instead of app_timer //! even though it's a little more dangerous (doesn't automatically get cleaned up by the app) - //! because the api is nicer for starting/stopping/resceduling the same timer over and over + //! because the api is nicer for starting/stopping/rescheduling the same timer over and over //! again with different callbacks. TimerID combo_timer; diff --git a/src/fw/apps/system_apps/app_fetch_ui.c b/src/fw/apps/system_apps/app_fetch_ui.c index 282ae071..8d6bb0ba 100644 --- a/src/fw/apps/system_apps/app_fetch_ui.c +++ b/src/fw/apps/system_apps/app_fetch_ui.c @@ -89,7 +89,7 @@ static void prv_app_fetch_launch_app(AppFetchUIData *data) { vibes_short_pulse(); } - // Allocate and inialize the data that would have been sent to the app originally before the + // Allocate and initialize the data that would have been sent to the app originally before the // fetch request. PebbleLaunchAppEventExtended *ext = kernel_malloc_check(sizeof(PebbleLaunchAppEventExtended)); *ext = (PebbleLaunchAppEventExtended) { diff --git a/src/fw/apps/system_apps/health/health.c b/src/fw/apps/system_apps/health/health.c index 9980cab3..b79fd96c 100644 --- a/src/fw/apps/system_apps/health/health.c +++ b/src/fw/apps/system_apps/health/health.c @@ -87,7 +87,7 @@ static void prv_health_service_event_handler(HealthEventType event, void *contex // //! Initialize application -static void prv_finish_initilization_cb(bool in_focus) { +static void prv_finish_initialization_cb(bool in_focus) { if (in_focus) { HealthAppData *health_app_data = app_state_get_user_data(); @@ -128,7 +128,7 @@ static void prv_initialize(void) { // Finish up initializing the app a bit later. This helps reduce lag when opening the app app_focus_service_subscribe_handlers((AppFocusHandlers){ - .did_focus = prv_finish_initilization_cb, + .did_focus = prv_finish_initialization_cb, }); } diff --git a/src/fw/apps/system_apps/health/health_activity_summary_card_segments.h b/src/fw/apps/system_apps/health/health_activity_summary_card_segments.h index 1a9b38c1..204a8700 100644 --- a/src/fw/apps/system_apps/health/health_activity_summary_card_segments.h +++ b/src/fw/apps/system_apps/health/health_activity_summary_card_segments.h @@ -19,7 +19,7 @@ #include "health_progress.h" //! 5 main segments + 2 real corners + 2 endcaps implemented as corners (for bw) -//! Each of the 5 non-corener segments get 20% of the total +//! Each of the 5 non-corner segments get 20% of the total #define AMOUNT_PER_SEGMENT (HEALTH_PROGRESS_BAR_MAX_VALUE * 20 / 100) // Found through trial and error diff --git a/src/fw/apps/system_apps/health/health_card_view.c b/src/fw/apps/system_apps/health/health_card_view.c index 2d1f2cfb..cb51b70b 100644 --- a/src/fw/apps/system_apps/health/health_card_view.c +++ b/src/fw/apps/system_apps/health/health_card_view.c @@ -103,7 +103,7 @@ static int prv_get_next_card_idx(Card current, bool up) { if (next == Card_HrSummary && !activity_is_hrm_present()) { next = next + direction; } - // if heart rate is diabled, change the order of cards to Activiy <-> Sleep <-> HR + // if heart rate is disabled, change the order of cards to Activity <-> Sleep <-> HR else if (activity_is_hrm_present() && !activity_prefs_heart_rate_is_enabled()) { if (current == Card_ActivitySummary) { next = up ? Card_SleepSummary : BACK_TO_WATCHFACE; diff --git a/src/fw/apps/system_apps/health/health_data.h b/src/fw/apps/system_apps/health/health_data.h index 299cf3dd..aaa06845 100644 --- a/src/fw/apps/system_apps/health/health_data.h +++ b/src/fw/apps/system_apps/health/health_data.h @@ -60,7 +60,7 @@ void health_data_update_step_derived_metrics(HealthData *health_data); //! Update the number of steps the user has taken today //! @param health_data A pointer to the health data to use -//! @param new_steps the new value of the steps for toaday +//! @param new_steps the new value of the steps for today void health_data_update_steps(HealthData *health_data, uint32_t new_steps); //! Update the number of seconds the user has slept today diff --git a/src/fw/apps/system_apps/health/health_data_private.h b/src/fw/apps/system_apps/health/health_data_private.h index 863fe0b2..2ea51c83 100644 --- a/src/fw/apps/system_apps/health/health_data_private.h +++ b/src/fw/apps/system_apps/health/health_data_private.h @@ -20,7 +20,7 @@ typedef struct HealthData { //!< Current step / activity info - int32_t step_data[DAYS_PER_WEEK]; //!< Step histroy for today and the previous 6 days + int32_t step_data[DAYS_PER_WEEK]; //!< Step history for today and the previous 6 days int32_t current_distance_meters; int32_t current_calories; diff --git a/src/fw/apps/system_apps/health/health_detail_card.c b/src/fw/apps/system_apps/health/health_detail_card.c index c525f3e4..8af39eaf 100644 --- a/src/fw/apps/system_apps/health/health_detail_card.c +++ b/src/fw/apps/system_apps/health/health_detail_card.c @@ -175,7 +175,7 @@ static void prv_draw_progress_bar_in_zone(GContext *ctx, const GRect *zone_rect, HealthProgressSegment segments[] = { { - // Left side vertical line (needed for the draw outline function to draw the verticle lines) + // Left side vertical line (needed for the draw outline function to draw the vertical lines) .type = HealthProgressSegmentType_Corner, .points = { {progress_bar_x, progress_bar_y}, @@ -185,7 +185,7 @@ static void prv_draw_progress_bar_in_zone(GContext *ctx, const GRect *zone_rect, }, }, { - // Right side vertical line (needed for the draw outline function to draw the verticle lines) + // Right side vertical line (needed for the draw outline function to draw the vertical lines) .type = HealthProgressSegmentType_Corner, .points = { {progress_bar_x + progress_bar_width, progress_bar_y}, diff --git a/src/fw/apps/system_apps/health/health_hr_summary_card.c b/src/fw/apps/system_apps/health/health_hr_summary_card.c index cf44ec64..308edfad 100644 --- a/src/fw/apps/system_apps/health/health_hr_summary_card.c +++ b/src/fw/apps/system_apps/health/health_hr_summary_card.c @@ -134,7 +134,7 @@ static void prv_render_bpm(GContext *ctx, Layer *base_layer) { graphics_text_node_destroy(&container->node); } -static void prv_render_timstamp(GContext *ctx, Layer *base_layer) { +static void prv_render_timestamp(GContext *ctx, Layer *base_layer) { HealthHrSummaryCardData *data = layer_get_data(base_layer); if (data->last_updated <= 0 || data->now_bpm == 0) { @@ -189,7 +189,7 @@ static void prv_base_layer_update_proc(Layer *base_layer, GContext *ctx) { prv_render_bpm(ctx, base_layer); - prv_render_timstamp(ctx, base_layer); + prv_render_timestamp(ctx, base_layer); } static void prv_hr_detail_card_unload_callback(Window *window) { diff --git a/src/fw/apps/system_apps/health/health_hr_summary_card_segments.h b/src/fw/apps/system_apps/health/health_hr_summary_card_segments.h index 90dbd10c..2f1c5863 100644 --- a/src/fw/apps/system_apps/health/health_hr_summary_card_segments.h +++ b/src/fw/apps/system_apps/health/health_hr_summary_card_segments.h @@ -19,7 +19,7 @@ #include "health_progress.h" //! 4 main segments + 4 real corners -//! Each of the 4 non-corener segments get 25% of the total +//! Each of the 4 non-corner segments get 25% of the total #define AMOUNT_PER_SEGMENT (HEALTH_PROGRESS_BAR_MAX_VALUE * 25 / 100) // The shape is the same, but the offsets are different diff --git a/src/fw/apps/system_apps/health/health_sleep_summary_card_segments.h b/src/fw/apps/system_apps/health/health_sleep_summary_card_segments.h index e2f5c087..643341e4 100644 --- a/src/fw/apps/system_apps/health/health_sleep_summary_card_segments.h +++ b/src/fw/apps/system_apps/health/health_sleep_summary_card_segments.h @@ -29,7 +29,7 @@ #define X_SHIFT (PBL_IF_ROUND_ELSE(23, PBL_IF_BW_ELSE(1, 0))) #define Y_SHIFT (PBL_IF_ROUND_ELSE(8, PBL_IF_BW_ELSE(3, 0))) -// Used to shrink the thinkness of the bars +// Used to shrink the thickness of the bars #define X_SHRINK (PBL_IF_BW_ELSE(2, 0)) // These are used to shrink the shape for round diff --git a/src/fw/apps/system_apps/launcher/default/launcher_app_glance_structured.c b/src/fw/apps/system_apps/launcher/default/launcher_app_glance_structured.c index 7921b646..280c5c18 100644 --- a/src/fw/apps/system_apps/launcher/default/launcher_app_glance_structured.c +++ b/src/fw/apps/system_apps/launcher/default/launcher_app_glance_structured.c @@ -72,7 +72,7 @@ typedef struct GenericGlanceIconBitmapProcessor { GColor desired_tint_color; } GenericGlanceIconBitmapProcessor; -static void prv_strucutred_glance_icon_bitmap_processor_pre_func( +static void prv_structured_glance_icon_bitmap_processor_pre_func( GBitmapProcessor *processor, GContext *ctx, UNUSED const GBitmap **bitmap_to_use, UNUSED GRect *global_grect_to_use) { GenericGlanceIconBitmapProcessor *processor_with_data = @@ -108,7 +108,7 @@ void launcher_app_glance_structured_draw_icon(LauncherAppGlanceStructured *struc GenericGlanceIconBitmapProcessor structured_glance_icon_bitmap_processor = { .bitmap_processor = { - .pre = prv_strucutred_glance_icon_bitmap_processor_pre_func, + .pre = prv_structured_glance_icon_bitmap_processor_pre_func, .post = prv_structured_glance_icon_bitmap_processor_post_func, }, .desired_tint_color = desired_tint_color, @@ -117,7 +117,7 @@ void launcher_app_glance_structured_draw_icon(LauncherAppGlanceStructured *struc GColor8 luminance_tint_lookup_table[GCOLOR8_COMPONENT_NUM_VALUES] = {}; gcolor_tint_luminance_lookup_table_init(desired_tint_color, luminance_tint_lookup_table); - GenericGlanceIconDrawCommandProcessor strucutred_glance_icon_draw_command_processor = { + GenericGlanceIconDrawCommandProcessor structured_glance_icon_draw_command_processor = { .draw_command_processor.command = prv_structured_glance_icon_draw_command_processor_process_command, .luminance_tint_lookup_table = luminance_tint_lookup_table, @@ -126,7 +126,7 @@ void launcher_app_glance_structured_draw_icon(LauncherAppGlanceStructured *struc KinoReelProcessor structured_glance_icon_processor = { .bitmap_processor = &structured_glance_icon_bitmap_processor.bitmap_processor, .draw_command_processor = - &strucutred_glance_icon_draw_command_processor.draw_command_processor, + &structured_glance_icon_draw_command_processor.draw_command_processor, }; // Draw the glance's icon, luminance tinting its colors according to the glance's highlight diff --git a/src/fw/apps/system_apps/music_app.c b/src/fw/apps/system_apps/music_app.c index bbfcac65..18c724b7 100644 --- a/src/fw/apps/system_apps/music_app.c +++ b/src/fw/apps/system_apps/music_app.c @@ -376,7 +376,7 @@ static void prv_flip_animated_text(Animation *animation, bool finished, void *co data->length_text_layer.layer.bounds.origin.y = -TIME_BOUNDS_OFFSET; } -static inline bool prv_should_animate_casssette(void) { +static inline bool prv_should_animate_cassette(void) { return music_get_playback_state() != MusicPlayStatePaused; } @@ -401,7 +401,7 @@ static Animation *prv_create_cassette_animation(MusicAppData *data) { animation_set_curve(cassette_bounceback, AnimationCurveEaseOut); Animation *sequence = animation_sequence_create(cassette_left, cassette_right, cassette_bounceback, NULL); - if (!prv_should_animate_casssette()) { + if (!prv_should_animate_cassette()) { animation_set_play_count(sequence, 0); } return sequence; diff --git a/src/fw/apps/system_apps/reminders/reminder_app.c b/src/fw/apps/system_apps/reminders/reminder_app.c index ca82696d..58445711 100644 --- a/src/fw/apps/system_apps/reminders/reminder_app.c +++ b/src/fw/apps/system_apps/reminders/reminder_app.c @@ -166,7 +166,7 @@ static void prv_build_transcription_dialog_text(ReminderAppData *data) { int buf_space_remaining = required_buf_size - 1 /*for the final \0 */; strncpy(data->dialog_text, data->reminder_str, sentence_len); - // Having to call MAX everytime is a bit silly, but the strn function expect a size_t (unsigned). + // Having to call MAX every time is a bit silly, but the strn function expect a size_t (unsigned). // Calling MAX ensures that a negative value isn't passed in which gets cast to something positive buf_space_remaining = MAX(buf_space_remaining - sentence_len, 0); diff --git a/src/fw/apps/system_apps/settings/settings_activity_tracker.c b/src/fw/apps/system_apps/settings/settings_activity_tracker.c index eba74d9b..fd567e06 100644 --- a/src/fw/apps/system_apps/settings/settings_activity_tracker.c +++ b/src/fw/apps/system_apps/settings/settings_activity_tracker.c @@ -144,7 +144,7 @@ static void prv_draw_no_activities_cell_rect(GContext *ctx, const Layer *cell_la const GSize text_size = graphics_text_layout_get_max_used_size(ctx, no_activities_string, font, box, overflow, alignment, NULL); - // We want to position the text in the center of the cell veritically, + // We want to position the text in the center of the cell vertically, // we divide the height of the cell by two and subtract half of the text size. // However, that just puts the TOP of a line vertically aligned. // So we also have to subtract half of a single line's width. diff --git a/src/fw/apps/system_apps/settings/settings_certifications.h b/src/fw/apps/system_apps/settings/settings_certifications.h index 8c2d9309..70ae9dda 100644 --- a/src/fw/apps/system_apps/settings/settings_certifications.h +++ b/src/fw/apps/system_apps/settings/settings_certifications.h @@ -62,7 +62,7 @@ typedef struct CertificationIds { static const RegulatoryFlags s_regulatory_flags_fallback = { }; -// Certifiation ID strings used for bigboards and such. +// Certification ID strings used for bigboards and such. static const CertificationIds s_certification_ids_fallback = { .canada_ic_id = "XXXXXX-YYY", .china_cmiit_id = "ABCDEFGHIJ", diff --git a/src/fw/apps/system_apps/settings/settings_notifications_private.h b/src/fw/apps/system_apps/settings/settings_notifications_private.h index 01441133..c2c6ddb2 100644 --- a/src/fw/apps/system_apps/settings/settings_notifications_private.h +++ b/src/fw/apps/system_apps/settings/settings_notifications_private.h @@ -20,7 +20,7 @@ #include "applib/preferred_content_size.h" -//! TODO PBL-41920: This mapping should be an opt in set in a platform specific location +//! TODO PBL-41920: This mapping should be an opt-in set in a platform specific location typedef enum SettingsContentSize { SettingsContentSize_Small, SettingsContentSize_Default, diff --git a/src/fw/apps/system_apps/settings/settings_quick_launch.c b/src/fw/apps/system_apps/settings/settings_quick_launch.c index 9b757f20..ca067931 100644 --- a/src/fw/apps/system_apps/settings/settings_quick_launch.c +++ b/src/fw/apps/system_apps/settings/settings_quick_launch.c @@ -17,7 +17,7 @@ //! This file displays the main Quick Launch menu that is found in our settings menu //! It allows the feature to be enabled or for an app to be set //! The list of apps that the user can choose from is found in settings_quick_launch_app_menu.c -//! This file is also responsible for saving / storing the uuid of each quichlaunch app as well as +//! This file is also responsible for saving / storing the uuid of each quicklaunch app as well as //! whether or not the quicklaunch app is enabled. #include "settings_menu.h" diff --git a/src/fw/apps/system_apps/settings/settings_system.c b/src/fw/apps/system_apps/settings/settings_system.c index b9d1bf4f..77c8954a 100644 --- a/src/fw/apps/system_apps/settings/settings_system.c +++ b/src/fw/apps/system_apps/settings/settings_system.c @@ -92,7 +92,7 @@ typedef struct SystemCertificationData { GBitmap **regulatory_marks; uint8_t regulatory_marks_count; - // For buiding up regulatory marks cells when constructing the menu + // For building up regulatory marks cells when constructing the menu uint8_t current_regulatory_marks_cell_start_idx; uint8_t num_regulatory_marks_in_current_cell; uint16_t current_regulatory_marks_cell_width; diff --git a/src/fw/apps/system_apps/timeline/timeline.c b/src/fw/apps/system_apps/timeline/timeline.c index fdd3ba89..c668b84e 100644 --- a/src/fw/apps/system_apps/timeline/timeline.c +++ b/src/fw/apps/system_apps/timeline/timeline.c @@ -338,7 +338,7 @@ static void prv_exit(TimelineAppData *data) { #endif } -static void prv_inactive_timer_callack(void *data) { +static void prv_inactive_timer_callback(void *data) { prv_set_state(data, TimelineAppStateInactive); prv_exit(data); } @@ -346,7 +346,7 @@ static void prv_inactive_timer_callack(void *data) { static void prv_inactive_timer_refresh(TimelineAppData *data) { static const uint32_t INACTIVITY_TIMEOUT_MS = 30 * 1000; s_app_data->inactive_timer_id = evented_timer_register_or_reschedule( - s_app_data->inactive_timer_id, INACTIVITY_TIMEOUT_MS, prv_inactive_timer_callack, data); + s_app_data->inactive_timer_id, INACTIVITY_TIMEOUT_MS, prv_inactive_timer_callback, data); } ///////////////////////////////////// diff --git a/src/fw/apps/system_apps/weather/weather_app_layout.c b/src/fw/apps/system_apps/weather/weather_app_layout.c index 63fb2d74..bec45a2b 100644 --- a/src/fw/apps/system_apps/weather/weather_app_layout.c +++ b/src/fw/apps/system_apps/weather/weather_app_layout.c @@ -87,7 +87,7 @@ static void prv_fill_high_low_temp_buffer(const int high, const int low, char *b /// Shown when only the day's low temperature is known (e.g. "--° / 52°") snprintf(buffer, buffer_size, i18n_get("--° / %i°", i18n_owner), low); } else { - /// A day's high and low temperature, separated by a foward slash (e.g. "68° / 52°") + /// A day's high and low temperature, separated by a forward slash (e.g. "68° / 52°") snprintf(buffer, buffer_size, i18n_get("%i° / %i°", i18n_owner), high, low); } } diff --git a/src/fw/apps/watch/kickstart/kickstart.c b/src/fw/apps/watch/kickstart/kickstart.c index e858258a..17e4e656 100644 --- a/src/fw/apps/watch/kickstart/kickstart.c +++ b/src/fw/apps/watch/kickstart/kickstart.c @@ -242,7 +242,7 @@ static void prv_draw_goal_line(GContext *ctx, int32_t current_progress, int32_t } #if ROBERT_SCREEN_RES -static void prv_draw_seperator(GContext *ctx, GRect bounds, GColor color) { +static void prv_draw_separator(GContext *ctx, GRect bounds, GColor color) { bounds.origin.y += 111; // top offset GPoint p1 = bounds.origin; @@ -274,7 +274,7 @@ static void prv_draw_steps_and_shoe(GContext *ctx, const char *steps_buffer, GFo icon_bounds.origin.x += 23; // icon left offset icon_bounds.origin.y += 9; // icon top offset #elif ROBERT_SCREEN_RES - icon_bounds.origin.y += (46 - icon_bounds.size.h); // icon top offest + icon_bounds.origin.y += (46 - icon_bounds.size.h); // icon top offset #elif SNOWY_SCREEN_RES icon_bounds.origin.x = screen_is_obstructed ? bounds.origin.x // icon_left offset : (bounds.size.w / 2) - (icon_bounds.size.w / 2); @@ -442,9 +442,9 @@ static void prv_base_layer_update_proc(Layer *layer, GContext *ctx) { #if ROBERT_SCREEN_RES bounds = grect_inset(bounds, GEdgeInsets(0, 25)); - // draw deperator + // draw separator if (!screen_is_obstructed) { - prv_draw_seperator(ctx, bounds, GColorWhite); + prv_draw_separator(ctx, bounds, GColorWhite); } #endif @@ -468,7 +468,7 @@ static void prv_update_steps_buffer(KickstartData *data) { const int thousands = data->current_steps / 1000; const int hundreds = data->current_steps % 1000; if (thousands) { - /// Step count greater than 1000 with a thousands seperator + /// Step count greater than 1000 with a thousands separator snprintf(data->steps_buffer, sizeof(data->steps_buffer), i18n_get("%d,%03d", data), thousands, hundreds); } else { diff --git a/src/fw/apps/watch/tictoc/spalding/tictoc_spalding.c b/src/fw/apps/watch/tictoc/spalding/tictoc_spalding.c index 9919cc70..f2d3f884 100644 --- a/src/fw/apps/watch/tictoc/spalding/tictoc_spalding.c +++ b/src/fw/apps/watch/tictoc/spalding/tictoc_spalding.c @@ -146,7 +146,7 @@ static void prv_draw_clock_face(GContext *ctx, ClockFace *face) { const GPointPrecise center = prv_get_clock_center_point(face->location, bounds); // Draw hands. - // TODO: Need to do something about the static GPaths used for watchands. This is very inflexible. + // TODO: Need to do something about the static GPaths used for watchbands. This is very inflexible. prv_draw_watch_hand(ctx, &face->hour_hand, center, data->hour_path); prv_draw_watch_hand(ctx, &face->minute_hand, center, data->minute_path); diff --git a/src/fw/apps/watch/tictoc/spalding/watch_model.h b/src/fw/apps/watch/tictoc/spalding/watch_model.h index 8b60cde5..398d79c7 100644 --- a/src/fw/apps/watch/tictoc/spalding/watch_model.h +++ b/src/fw/apps/watch/tictoc/spalding/watch_model.h @@ -91,7 +91,7 @@ typedef struct { typedef struct { ClockFace face; char buffer[4]; - int32_t utc_offest; + int32_t utc_offset; GColor text_color; } NonLocalClockFace; diff --git a/src/fw/board/board.h b/src/fw/board/board.h index 80de9a56..b6abdbdb 100644 --- a/src/fw/board/board.h +++ b/src/fw/board/board.h @@ -34,7 +34,7 @@ //! Guaranteed invalid IRQ priority #define IRQ_PRIORITY_INVALID (1 << __NVIC_PRIO_BITS) -// This is generated in order to faciliate the check within the IRQ_MAP macro below +// This is generated in order to facilitate the check within the IRQ_MAP macro below enum { #define IRQ_DEF(num, irq) IS_VALID_IRQ__##irq, #include "irq_stm32.def" @@ -216,7 +216,7 @@ typedef struct { const OutputConfig power_ctl_5v0; const uint8_t backlight_on_percent; // percent of max possible brightness - const uint8_t backlight_max_duty_cycle_percent; // Calibrated such that the preceived brightness + const uint8_t backlight_max_duty_cycle_percent; // Calibrated such that the perceived brightness // of "backlight_on_percent = 100" (and all other values, to a reasonable // tolerance) is identical across all platforms. >100% isn't possible, so // future backlights must be at least as bright as Tintin's. diff --git a/src/fw/board/boards/board_silk.c b/src/fw/board/boards/board_silk.c index 2f72405f..3782dadb 100644 --- a/src/fw/board/boards/board_silk.c +++ b/src/fw/board/boards/board_silk.c @@ -63,7 +63,7 @@ CREATE_DMA_STREAM(2, 6); // DMA2_STREAM4_DEVICE - DFSDM CREATE_DMA_STREAM(2, 7); // DMA2_STREAM7_DEVICE - QSPI // DMA Requests -// - On DMA1 we just have have "Sharp SPI TX" so just set its priority to "High" since it doesn't +// - On DMA1 we just have "Sharp SPI TX" so just set its priority to "High" since it doesn't // matter. // - On DMA2 we have "Accessory UART RX", "Debug UART RX", "Dialog SPI RX", "DIALOG SPI TX", // "DFSDM", and "QSPI". We want "DFSDM", "Accessory UART RX", "Debug UART RX", and "Dialog SPI RX" diff --git a/src/fw/board/boards/board_silk.h b/src/fw/board/boards/board_silk.h index 6bd52b52..ad92e5ed 100644 --- a/src/fw/board/boards/board_silk.h +++ b/src/fw/board/boards/board_silk.h @@ -115,7 +115,7 @@ static const BoardConfigAccel BOARD_CONFIG_ACCEL = { .axes_inverts[AXIS_Y] = true, .axes_inverts[AXIS_Z] = true, #endif - // This is affected by the acceleromter's configured ODR, so this value + // This is affected by the accelerometer's configured ODR, so this value // will need to be tuned again once we stop locking the BMA255 to an ODR of // 125 Hz. .shake_thresholds[AccelThresholdHigh] = 64, diff --git a/src/fw/comm/ble/gap_le_advert.c b/src/fw/comm/ble/gap_le_advert.c index 01ff4580..196a6acf 100644 --- a/src/fw/comm/ble/gap_le_advert.c +++ b/src/fw/comm/ble/gap_le_advert.c @@ -56,7 +56,7 @@ //! To-Do's: //! -------- //! - ble_discoverability/pairability.c -//! - Use private addresses for privacy / harder tracebility. +//! - Use private addresses for privacy / harder traceability. #define GAP_LE_ADVERT_LOG_LEVEL LOG_LEVEL_DEBUG @@ -321,7 +321,7 @@ static void prv_timer_stop(void) { //! connectability mode has changed. static void prv_perform_next_job(bool force_refresh) { - // Part of work-around for CC2564 bug (see comment with prv_work_around_should_not_cycle). + // Part of workaround for CC2564 bug (see comment with prv_work_around_should_not_cycle). // When forced, we've just connected or disconnected, in that case cycle as well, because // otherwise we'll continue to advertise non-connectable if we've just disconnected and there // was already a job being advertised. diff --git a/src/fw/comm/ble/gap_le_advert.h b/src/fw/comm/ble/gap_le_advert.h index d3290ae0..bc7b704c 100644 --- a/src/fw/comm/ble/gap_le_advert.h +++ b/src/fw/comm/ble/gap_le_advert.h @@ -92,7 +92,7 @@ typedef void (*GAPLEAdvertisingJobUnscheduleCallback)(GAPLEAdvertisingJobRef job //! payload. //! @param terms A combination of minimum advertisement interval, maximum advertisement //! interval and duration. Each term is run in the order that they appear in the terms array. -//! The minimum advertisement interval for each term must be at minumum 32 slots (20ms), or +//! The minimum advertisement interval for each term must be at minimum 32 slots (20ms), or //! 160 slots (100ms) when there is a scan response. The maximum advertisement interval must //! be larger than or equal to its corresponding min_interval_slots. The duration is the //! minimum number of seconds that the term will be active. The sum of all the durations is diff --git a/src/fw/comm/ble/gap_le_connect.c b/src/fw/comm/ble/gap_le_connect.c index f0af984e..29ac604d 100644 --- a/src/fw/comm/ble/gap_le_connect.c +++ b/src/fw/comm/ble/gap_le_connect.c @@ -156,8 +156,8 @@ static const GAPLERole s_current_role = GAPLERoleSlave; // Function prototypes typedef void (*IntentApply)(GAPLEConnectionIntent *intent, void *data); -static void prv_apply_fuction_to_intents_matching_connection(const GAPLEConnection *connection, - IntentApply fp, void *data); +static void prv_apply_function_to_intents_matching_connection(const GAPLEConnection *connection, + IntentApply fp, void *data); static bool prv_intent_matches_connection(const GAPLEConnectionIntent *intent, const GAPLEConnection *connection); @@ -238,7 +238,7 @@ static void prv_build_task_mask_cb(GAPLEConnectionIntent *intent, void *data) { PebbleTaskBitset gap_le_connect_task_mask_for_connection(const GAPLEConnection *connection) { const PebbleTaskBitset task_mask_none = ~0; PebbleTaskBitset task_mask = task_mask_none; - prv_apply_fuction_to_intents_matching_connection(connection, prv_build_task_mask_cb, &task_mask); + prv_apply_function_to_intents_matching_connection(connection, prv_build_task_mask_cb, &task_mask); return task_mask; } @@ -317,7 +317,7 @@ void bt_driver_handle_le_connection_handle_update_address_and_irk(const BleAddre GAPLEConnection *connection = gap_le_connection_by_device(&e->device); if (!connection) { PBL_LOG(LOG_LEVEL_ERROR, - "Got address & IRK update for non-existent connection. " + "Got address & IRK update for nonexistent connection. " "Old addr:"BT_DEVICE_ADDRESS_FMT, BT_DEVICE_ADDRESS_XPLODE(e->device.address)); goto unlock; } @@ -542,8 +542,8 @@ void bt_driver_handle_le_disconnection_complete_event(const BleDisconnectionComp // ------------------------------------------------------------------------------------------------- //! Convenience function to apply a function to each intent matching or resolving to a device //! bt_lock is assumed to be taken before calling this function. -static void prv_apply_fuction_to_intents_matching_connection(const GAPLEConnection *connection, - IntentApply fp, void *data) { +static void prv_apply_function_to_intents_matching_connection(const GAPLEConnection *connection, + IntentApply fp, void *data) { GAPLEConnectionIntent *intent = s_intents; while (intent) { GAPLEConnectionIntent *next = (GAPLEConnectionIntent *) intent->node.next; @@ -590,8 +590,8 @@ void bt_driver_handle_le_encryption_change_event(const BleEncryptionChange *even bt_driver_pebble_pairing_service_handle_status_change(connection); } - prv_apply_fuction_to_intents_matching_connection(connection, - prv_send_clients_encrypted_event, NULL); + prv_apply_function_to_intents_matching_connection(connection, + prv_send_clients_encrypted_event, NULL); unlock: bt_unlock(); } diff --git a/src/fw/comm/ble/gap_le_connect_params.c b/src/fw/comm/ble/gap_le_connect_params.c index 2304cdf0..2d1609c9 100644 --- a/src/fw/comm/ble/gap_le_connect_params.c +++ b/src/fw/comm/ble/gap_le_connect_params.c @@ -73,10 +73,10 @@ // to zero). It can be calculated using the formula: // Effective Connection Interval = (Connection Interval) * (1+(Slave Latency)) -//! This module contains a work-around for parameter update requests not being applied by +//! This module contains a workaround for parameter update requests not being applied by //! iOS / Apple's BT controller, even though they get "accepted" by the host. //! @see gap_le_connect_params_handle_connection_parameter_update_response below for more -//! commentary about the erronous behavior. +//! commentary about the erroneous behavior. //! Apple bugs / shortcomings: http://www.openradar.me/21400278 and http://www.openradar.me/21400457 //! It seems that if we start hammering the iOS device with more change requests, things don't get //! better. This timeout value is empirically established using the "ble mode_monkey" prompt diff --git a/src/fw/comm/ble/gap_le_scan.h b/src/fw/comm/ble/gap_le_scan.h index a87c1efa..8d148393 100644 --- a/src/fw/comm/ble/gap_le_scan.h +++ b/src/fw/comm/ble/gap_le_scan.h @@ -22,7 +22,7 @@ //! @internal //! The number of reports that the circular reports buffer can contain. -//! Accomodate for 4 reports with advertisment and scan reponse data: +//! Accomodate for 4 reports with advertisement and scan response data: #define GAP_LE_SCAN_REPORTS_BUFFER_SIZE (4 * (sizeof(GAPLERawAdReport) + \ (2 * GAP_LE_AD_REPORT_DATA_MAX_LENGTH))) @@ -52,12 +52,12 @@ typedef struct { //! reports and scan responses will be buffered. A PEBBLE_BLE_SCAN_EVENT will //! be generated when there is data to be collected. //! @see gap_le_consume_scan_results -//! @return 0 if scanning started succesfully or an error code otherwise. +//! @return 0 if scanning started successfully or an error code otherwise. bool gap_le_start_scan(void); //! @internal //! Stops scanning. -//! @return 0 if scanning stopped succesfully or an error code otherwise. +//! @return 0 if scanning stopped successfully or an error code otherwise. bool gap_le_stop_scan(void); //! @internal @@ -79,6 +79,6 @@ bool gap_le_consume_scan_results(uint8_t *buffer, uint16_t *size_in_out); void gap_le_scan_init(void); //! @internal -//! Stops any ongoing scanning and related activitie and cleans up anything that +//! Stops any ongoing scanning and related activities and cleans up anything that //! had been created by gap_le_scan_init() void gap_le_scan_deinit(void); diff --git a/src/fw/comm/ble/gap_le_slave_discovery.h b/src/fw/comm/ble/gap_le_slave_discovery.h index d122986c..524d385e 100644 --- a/src/fw/comm/ble/gap_le_slave_discovery.h +++ b/src/fw/comm/ble/gap_le_slave_discovery.h @@ -17,22 +17,22 @@ #pragma once //! @file gap_le_slave_discovery.h -//! This sub-module is responsible for advertising explicitely for device +//! This sub-module is responsible for advertising explicitly for device //! discovery purposes. The advertisement will contain the device name, //! transmit power level (to be able to order devices by estimated proximity), //! Pebble Service UUID and discoverability flags. -//! Advertising devices will implicitely become the slave when being connected +//! Advertising devices will implicitly become the slave when being connected //! to, so the "slave" part in the file name is redundant, but kept for //! the sake of completeness. #include #include -//! @return True is Pebble is currently explicitely discoverable as BLE slave +//! @return True is Pebble is currently explicitly discoverable as BLE slave //! or false if not. bool gap_le_slave_is_discoverable(void); -//! @param discoverable True to make Pebble currently explicitely discoverable +//! @param discoverable True to make Pebble currently explicitly discoverable //! as BLE slave. Initially, Pebble will advertise at a relatively high rate for //! a few seconds. After this, the rate will drop to save battery life. void gap_le_slave_set_discoverable(bool discoverable); diff --git a/src/fw/comm/ble/gap_le_slave_reconnect.c b/src/fw/comm/ble/gap_le_slave_reconnect.c index 2f74fd5f..3cb5d239 100644 --- a/src/fw/comm/ble/gap_le_slave_reconnect.c +++ b/src/fw/comm/ble/gap_le_slave_reconnect.c @@ -107,9 +107,9 @@ static void prv_evaluate(ReconnectType prev_type) { // include the SIMULTANEOUS_LE_BR_EDR_TO_SAME_DEVICE_CONTROLLER and // SIMULTANEOUS_LE_BR_EDR_TO_SAME_DEVICE_HOST flags. However, we have never // done this (ignorance) and gotten by, by using a "random" address (the - // public address, but then inverted) as a work-around for the problems + // public address, but then inverted) as a workaround for the problems // leaving out these flags caused with Android. - // I intend to use use the "Peripheral privacy feature" some time in the + // I intend to use the "Peripheral privacy feature" some time in the // near future. With this, these flags and the issues on Android become // a non-issue (because addresses will be private). Therefore I decided to // still leave out the flags. diff --git a/src/fw/comm/ble/gatt_client_discovery.c b/src/fw/comm/ble/gatt_client_discovery.c index dad668a7..3783871d 100644 --- a/src/fw/comm/ble/gatt_client_discovery.c +++ b/src/fw/comm/ble/gatt_client_discovery.c @@ -440,7 +440,7 @@ unlock: return ret_val; } -//! extern for gap_le_connnection.c +//! extern for gap_le_connection.c //! Cleans up any state and frees the associated memory of all the things this module might have //! created for a given connection. //! bt_lock() is assumed to be taken by the caller diff --git a/src/fw/comm/ble/gatt_client_operations.c b/src/fw/comm/ble/gatt_client_operations.c index 17f09b89..e1aa33d9 100644 --- a/src/fw/comm/ble/gatt_client_operations.c +++ b/src/fw/comm/ble/gatt_client_operations.c @@ -91,7 +91,7 @@ static void prv_internal_write_cccd_response_cb(GattClientOpResponseHdr *event) gatt_client_subscriptions_handle_write_cccd_response(cccd, error); } -static BLEGATTError prv_handle_response(const GattClientOpReadReponse *resp, +static BLEGATTError prv_handle_response(const GattClientOpReadResponse *resp, const GattClientEventContext *data, uint16_t *gatt_value_length) { uint16_t val_len = resp->value_length; @@ -154,7 +154,7 @@ void bt_driver_cb_gatt_client_operations_handle_response(GattClientOpResponseHdr } else { switch (event->type) { case GattClientOpResponseRead: { - const GattClientOpReadReponse *resp = (GattClientOpReadReponse *)event; + const GattClientOpReadResponse *resp = (GattClientOpReadResponse *)event; PBL_ASSERTN(data->subtype == PebbleBLEGATTClientEventTypeCharacteristicRead || data->subtype == PebbleBLEGATTClientEventTypeDescriptorRead); gatt_err_code = prv_handle_response(resp, data, &gatt_value_length); diff --git a/src/fw/comm/ble/gatt_client_operations.h b/src/fw/comm/ble/gatt_client_operations.h index 14585d72..6d2cb11f 100644 --- a/src/fw/comm/ble/gatt_client_operations.h +++ b/src/fw/comm/ble/gatt_client_operations.h @@ -17,7 +17,7 @@ #pragma once //! @file This file contains adapter code between Bluetopia's GATT APIs and -//! Pebble's GATT/API code. The functions in this file take the the internal +//! Pebble's GATT/API code. The functions in this file take the internal //! reference types BLECharacteristic and BLEDescriptor to perform operations //! upon those remote resources. The implementation uses the functions //! gatt_client_characteristic_get_handle_and_connection_id and diff --git a/src/fw/comm/ble/gatt_client_subscriptions.c b/src/fw/comm/ble/gatt_client_subscriptions.c index 181a8cfa..2058b0af 100644 --- a/src/fw/comm/ble/gatt_client_subscriptions.c +++ b/src/fw/comm/ble/gatt_client_subscriptions.c @@ -86,7 +86,7 @@ extern BLECharacteristic gatt_client_descriptor_get_characteristic_and_connectio // Function implemented by the gatt_client_operations module to write the CCCD (to alter the remote // subscription state). The big difference with gatt_client_op_write_descriptor() is that this // function calls back to the gatt_client_subscriptions module when the result of the write is -// received, so that that module can take care of sending the appropriate events to the clients. +// received, so that module can take care of sending the appropriate events to the clients. extern BTErrno gatt_client_op_write_descriptor_cccd(BLEDescriptor cccd_ref, const uint16_t *cccd_value); diff --git a/src/fw/comm/ble/gatt_client_subscriptions.h b/src/fw/comm/ble/gatt_client_subscriptions.h index a3dab112..9583ffdf 100644 --- a/src/fw/comm/ble/gatt_client_subscriptions.h +++ b/src/fw/comm/ble/gatt_client_subscriptions.h @@ -42,7 +42,7 @@ sizeof(GATTBufferedNotificationHeader)) * 4) #endif //! Data structure representing a subscription of a specific client for -//! noticications or indications of a GATT characteristic for a specific +//! notifications or indications of a GATT characteristic for a specific //! client (GAPLEClientApp or GAPLEClientKernel). The GAPLEConnection struct has //! the head for each BLE connection. typedef struct { @@ -87,7 +87,7 @@ bool gatt_client_subscriptions_get_notification_header(GAPLEClient client, //! @param[in,out] value_length_in_out Cannot be NULL. In: the size of the value_out buffer. //! Out: the number of bytes copied into the value_out buffer. //! @param[out] has_more_out Cannot be NULL. Will be set to true if there are more notifications -//! in the buffer, or to false if there are no more notifiations in the buffer. +//! in the buffer, or to false if there are no more notifications in the buffer. //! @return The length of the next notification's payload, if there is any (has_more_out is true), //! undefined otherwise. uint16_t gatt_client_subscriptions_consume_notification(BLECharacteristic *characteristic_ref_out, diff --git a/src/fw/comm/ble/gatt_service_changed.h b/src/fw/comm/ble/gatt_service_changed.h index aa39c750..5a3ab88d 100644 --- a/src/fw/comm/ble/gatt_service_changed.h +++ b/src/fw/comm/ble/gatt_service_changed.h @@ -41,7 +41,7 @@ struct GAPLEConnection; //! Optionally handles GATT Value Indications, in case the ATT handle matches the GATT Service -//! Changed characteristic value for the connection. When it matches, it will autonomously iniate +//! Changed characteristic value for the connection. When it matches, it will autonomously initiate //! GATT Service Discovery to refresh the local GATT cache. //! @note bt_lock is assumed to be taken by the caller bool gatt_service_changed_client_handle_indication(struct GAPLEConnection *connection, diff --git a/src/fw/comm/ble/kernel_le_client/ams/ams_types.h b/src/fw/comm/ble/kernel_le_client/ams/ams_types.h index eafaa5e4..4c489f41 100644 --- a/src/fw/comm/ble/kernel_le_client/ams/ams_types.h +++ b/src/fw/comm/ble/kernel_le_client/ams/ams_types.h @@ -122,7 +122,7 @@ typedef enum { //! A string containing the integer value of the shuffle mode. See AMSShuffleMode. AMSQueueAttributeIDShuffleMode = 2, - //! A string containing the integer value value of the repeat mode. See AMSRepeatMode. + //! A string containing the integer value of the repeat mode. See AMSRepeatMode. AMSQueueAttributeIDRepeatMode = 3, NumAMSQueueAttributeID, diff --git a/src/fw/comm/ble/kernel_le_client/ams/ams_util.h b/src/fw/comm/ble/kernel_le_client/ams/ams_util.h index 95370a22..7541be64 100644 --- a/src/fw/comm/ble/kernel_le_client/ams/ams_util.h +++ b/src/fw/comm/ble/kernel_le_client/ams/ams_util.h @@ -25,8 +25,8 @@ //! The string does not have to be zero-terminated, since the length is passed as an argument. //! @param number_str_length The length of the number_str buffer. //! @param multiplier The factor by which to multiply the parsed number. -//! @param[out] number_out If the parsing was succesfull, the result will be stored here. -//! @return True if the string was parsed succesfully. +//! @param[out] number_out If the parsing was successful, the result will be stored here. +//! @return True if the string was parsed successfully. //! @note The first comma or period found is treated as decimal separator. Any subsequent comma or //! period that is found will cause parsing to be aborted and return false. //! @note An empty / zero-length string still will fail to parse and return false. diff --git a/src/fw/comm/ble/kernel_le_client/ancs/ancs.c b/src/fw/comm/ble/kernel_le_client/ancs/ancs.c index 3f11e52a..136350aa 100644 --- a/src/fw/comm/ble/kernel_le_client/ancs/ancs.c +++ b/src/fw/comm/ble/kernel_le_client/ancs/ancs.c @@ -405,8 +405,8 @@ static void prv_is_ancs_alive_cb(void *data) { } // ----------------------------------------------------------------------------- -//! With iOS 8.2 the pre-existing flag seems to be broken. Don't allow notifications for a bit after -//! reconnection so that all the "real" pre-existing notification don't come through again. +//! With iOS 8.2 the preexisting flag seems to be broken. Don't allow notifications for a bit after +//! reconnection so that all the "real" preexisting notification don't come through again. static RegularTimerInfo s_notification_connection_delay_timer; static bool s_just_connected = false; @@ -893,9 +893,9 @@ static void prv_handle_ns_notification(uint32_t length, const uint8_t *notificat // Handle the EventID switch (nsnotification->event_id) { case EventIDNotificationAdded: - // In iOS 8.2 several apps (especially mail.app) seem to be setting the pre-existing flag + // In iOS 8.2 several apps (especially mail.app) seem to be setting the preexisting flag // when they shouldn't. This appeared to be fixed in iOS 9 beta 1. - // By skipping the pre-existing check we will re-recieve all the notifications + // By skipping the preexisting check we will re-receive all the notifications // we got in the past 2 hours. To get past this ignore notifications for the first couple // seconds after connecting if (s_just_connected && (nsnotification->event_flags & EventFlagPreExisting)) { @@ -973,7 +973,7 @@ void ancs_handle_write_response(BLECharacteristic characteristic, BLEGATTError e prv_ancs_is_alive(); } - // We asked for a non-existent notification, go to the next one + // We asked for a nonexistent notification, go to the next one prv_reset_and_next(); return; } @@ -1068,7 +1068,7 @@ void ancs_handle_ios9_or_newer_detected(void) { } // ------------------------------------------------------------------------------------------------- -// Lifecyle +// Lifecycle void ancs_create(void) { PBL_ASSERTN(s_ancs_client == NULL); diff --git a/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt.c b/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt.c index d10e623a..95dc4d8a 100644 --- a/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt.c +++ b/src/fw/comm/ble/kernel_le_client/ppogatt/ppogatt.c @@ -561,7 +561,7 @@ static void prv_start_reset(PPoGATTClient *client) { static void prv_handle_reset_request(PPoGATTClient *client) { if (client->state == StateConnectedClosedAwaitingResetCompleteSelfInitiatedReset) { - // Already in self-initated reset procedure, client should ignore the request from the server. + // Already in self-initiated reset procedure, client should ignore the request from the server. PBL_LOG(LOG_LEVEL_INFO, "Ignoring reset request because local client already requested."); return; } diff --git a/src/fw/comm/bt_conn_mgr.h b/src/fw/comm/bt_conn_mgr.h index d0509672..3203c07e 100644 --- a/src/fw/comm/bt_conn_mgr.h +++ b/src/fw/comm/bt_conn_mgr.h @@ -66,8 +66,8 @@ void conn_mgr_set_ble_conn_response_time( //! Informs the BT manager module that we want to run the provided classic //! connection at the requested rate. //! -//! Note: This currently supports two modes. ResponseTimeMax maps to BT clasic sniff mode -//! and anything fatser maps to BT classic active mode +//! Note: This currently supports two modes. ResponseTimeMax maps to BT classic sniff mode +//! and anything faster maps to BT classic active mode //! //! @param[in] remote The BT Classic connection requesting the rate change //! @param[in] consumer The consumer requesting the rate change diff --git a/src/fw/comm/internals/bt_conn_mgr.c b/src/fw/comm/internals/bt_conn_mgr.c index 442821e4..5912d24f 100644 --- a/src/fw/comm/internals/bt_conn_mgr.c +++ b/src/fw/comm/internals/bt_conn_mgr.c @@ -249,7 +249,7 @@ void conn_mgr_set_ble_conn_response_time_ext( uint16_t max_period_secs, ResponsivenessGrantedHandler granted_handler) { ConnectionMgrInfo *conn_mgr_info; if (!hdl || !((conn_mgr_info = hdl->conn_mgr_info))) { - PBL_LOG(LOG_LEVEL_ERROR, "GAP Handle not properly intialized"); + PBL_LOG(LOG_LEVEL_ERROR, "GAP Handle not properly initialized"); return; } diff --git a/src/fw/console/dbgserial_input.c b/src/fw/console/dbgserial_input.c index b2d2c33f..bb745d12 100644 --- a/src/fw/console/dbgserial_input.c +++ b/src/fw/console/dbgserial_input.c @@ -36,7 +36,7 @@ static void dbgserial_interrupt_handler(bool *should_context_switch); static DbgSerialCharacterCallback s_character_callback; static TimerID s_stop_mode_timeout_timer; -//! Use a seperate variable so it's safe to check from the ISR. +//! Use a separate variable so it's safe to check from the ISR. static bool s_stop_mode_inhibited = false; //! We DMA into this buffer as a circular buffer @@ -64,7 +64,7 @@ static bool prv_uart_irq_handler(UARTDevice *dev, uint8_t data, const UARTRXErro void dbgserial_input_init(void) { exti_configure_pin(BOARD_CONFIG.dbgserial_int, ExtiTrigger_Falling, dbgserial_interrupt_handler); - // some platforms have a seperate pin for the EXTI int and the USART + // some platforms have a separate pin for the EXTI int and the USART if (BOARD_CONFIG.dbgserial_int_gpio.gpio != NULL) { gpio_input_init(&BOARD_CONFIG.dbgserial_int_gpio); } diff --git a/src/fw/console/prompt.h b/src/fw/console/prompt.h index a61150dc..563d5343 100644 --- a/src/fw/console/prompt.h +++ b/src/fw/console/prompt.h @@ -40,7 +40,7 @@ typedef struct PromptContext { //! Function to call when the command has completed. PromptCommandCompleteCallback command_complete_callback; - //! Which index we were currently writing to, should never be higher than + //! Which index we were currently writing to, should never be greater than //! PROMPT_BUFFER_SIZE_BYTES - 1. unsigned int write_index; diff --git a/src/fw/console/prompt_commands.c b/src/fw/console/prompt_commands.c index 25000781..af51d621 100644 --- a/src/fw/console/prompt_commands.c +++ b/src/fw/console/prompt_commands.c @@ -918,7 +918,7 @@ void command_audit_delay_us(void) { } // Simply parks the chip permanently in stop mode in whatever state it's currently in. This can be -// pretty handy when trying to profile power of the chip under certains states +// pretty handy when trying to profile power of the chip under certain states // NOTE: If you did not configure with `--nowatchdog`, the HW watchdog will reboot you in ~8s void command_enter_stop(void) { dbgserial_putstr("Entering stop mode indefinitely ... reboot your board to get out!!"); diff --git a/src/fw/console/reliable_transport.c b/src/fw/console/reliable_transport.c index 8bc17ff7..9e8b3124 100644 --- a/src/fw/console/reliable_transport.c +++ b/src/fw/console/reliable_transport.c @@ -228,7 +228,7 @@ void pulse2_reliable_transport_on_command_packet( } } else { PBL_LOG(LOG_LEVEL_DEBUG, "Received truncated or corrupt info packet " - "field (expeced %" PRIu16 ", got %" PRIu16 " data bytes). " + "field (expected %" PRIu16 ", got %" PRIu16 " data bytes). " "Discarding.", ntoh16(packet->i.length), (uint16_t)length); return; } diff --git a/src/fw/debug/default/flash_logging.c b/src/fw/debug/default/flash_logging.c index a93ff4c5..b70e3d46 100644 --- a/src/fw/debug/default/flash_logging.c +++ b/src/fw/debug/default/flash_logging.c @@ -36,14 +36,14 @@ // // This implements a simple circular logging scheme format. // -// The only assumption it makes is that you have at least two eraseable flash +// The only assumption it makes is that you have at least two erasable flash // units. However, the more units (i.e sectors) that you have, the smaller % of // logs that will be erased when the log buffer fills. // // On each boot, we create a file to hold all the messages for that boot. This // file is called a log generation or log. // -// Within each eraseable unit multiple 'pages' exist. A log generation can span +// Within each erasable unit multiple 'pages' exist. A log generation can span // one or more pages. Multiple log generations can be stored at any given // time. The oldest pages will be removed as the log buffer wraps around. // @@ -138,7 +138,7 @@ _Static_assert((MAX_POSSIBLE_LOG_GENS >= 4) && _Static_assert(MAX_POSSIBLE_LOG_GENS < MAX_PAGE_CHUNK_ID, "Invalid number of chunk ids for serial distance to work"); _Static_assert((LOG_REGION_SIZE / ERASE_UNIT_SIZE) >= 2, - "Need to have at least 2 eraseable units for flash logging to work"); + "Need to have at least 2 erasable units for flash logging to work"); _Static_assert((LOG_REGION_SIZE % LOG_PAGE_SIZE) == 0, "The log page size must be divisible by the log region size"); _Static_assert(((FLASH_REGION_DEBUG_DB_END % ERASE_UNIT_SIZE) == 0) && diff --git a/src/fw/debug/legacy/debug_db.c b/src/fw/debug/legacy/debug_db.c index b45d2585..2bb9cc03 100644 --- a/src/fw/debug/legacy/debug_db.c +++ b/src/fw/debug/legacy/debug_db.c @@ -181,7 +181,7 @@ bool debug_db_is_generation_valid(int file_generation) { } if (file_header.file_id != (s_current_file_id - file_generation)) { - PBL_LOG(LOG_LEVEL_DEBUG, "Id: %"PRIu8" Expected: %u", file_header.file_id, (s_current_file_id - file_generation)); + PBL_LOG(LOG_LEVEL_DEBUG, "ID: %"PRIu8" Expected: %u", file_header.file_id, (s_current_file_id - file_generation)); return false; } diff --git a/src/fw/debug/legacy/flash_logging.c b/src/fw/debug/legacy/flash_logging.c index 720aff78..efa58873 100644 --- a/src/fw/debug/legacy/flash_logging.c +++ b/src/fw/debug/legacy/flash_logging.c @@ -33,14 +33,14 @@ #include //! @file flash_logging.c -//! Logs messages to SPI flash for later retreival. +//! Logs messages to SPI flash for later retrieval. //! //! The different chunks allow us to implement a rolling log, where if we fill up all the chunks, we can erase the oldest -//! chunk to find us some more space. Each chunk gets it's own header at the top of the chunk to indicate the order in +//! chunk to find us some more space. Each chunk gets its own header at the top of the chunk to indicate the order in //! which the chunks should be reassembled. //! Make sure chunks are still an even number of flash subsectors. Our log space is 7 subsectors, so our NUM_CHUNKS -//! makes it so each chunk has it's own subsector. +//! makes it so each chunk has its own subsector. #define NUM_CHUNKS 7 #define CHUNK_SIZE_BYTES (SECTION_LOGS_SIZE_BYTES / NUM_CHUNKS) diff --git a/src/fw/debug/power_tracking.h b/src/fw/debug/power_tracking.h index 947886bd..1c4d8cd0 100644 --- a/src/fw/debug/power_tracking.h +++ b/src/fw/debug/power_tracking.h @@ -24,7 +24,7 @@ /** Power Profiling * =============== * There are two main types of power consumers on the Pebble Smartwatch: - * - Discrete systems (one more more independent power states). + * - Discrete systems (one or more independent power states). * - Continuous systems (a continuum of power draw eg. the PWM-ed backlight). * * The discrete systems will have their power profiled in a time-binned manner diff --git a/src/fw/drivers/accessory.c b/src/fw/drivers/accessory.c index d958af9a..e9f71ae6 100644 --- a/src/fw/drivers/accessory.c +++ b/src/fw/drivers/accessory.c @@ -39,7 +39,7 @@ #include "util/likely.h" #include "util/size.h" -#include "FreeRTOS.h" /* FreeRTOS Kernal Prototypes/Constants. */ +#include "FreeRTOS.h" /* FreeRTOS Kernel Prototypes/Constants. */ #include "semphr.h" #define STM32F4_COMPATIBLE @@ -302,7 +302,7 @@ void accessory_send_byte(uint8_t data) { portENTER_CRITICAL(); if (s_send_history.has_data) { // The send buffer is full. This means that the receive interrupt hasn't fired to clear the - // buffer which indicates that there is bus contention preventing a stop bit from occuring. + // buffer which indicates that there is bus contention preventing a stop bit from occurring. s_bus_contention_detected = true; } else { s_send_history.data = data; diff --git a/src/fw/drivers/accessory.h b/src/fw/drivers/accessory.h index bfd1208b..1b2a614a 100644 --- a/src/fw/drivers/accessory.h +++ b/src/fw/drivers/accessory.h @@ -76,7 +76,7 @@ bool accessory_send_stream(AccessoryDataStreamCallback stream_callback, void *co void accessory_send_stream_stop(void); //! Stop the driver from reading any input on the accessory port. When input is disabled we can -//! write out the accessory port at higher rates as we don't have to worry about supressing +//! write out the accessory port at higher rates as we don't have to worry about suppressing //! reading back our own output. void accessory_disable_input(void); @@ -101,7 +101,7 @@ bool accessory_manager_handle_break_from_isr(void); //! was last called. bool accessory_bus_contention_detected(void); -//! Checks if the pull-up resistor which is required for smarstraps is present +//! Checks if the pull-up resistor which is required for smartstraps is present bool accessory_is_present(void); //! Uses DMA for receiving from the peripheral diff --git a/src/fw/drivers/debounced_button.c b/src/fw/drivers/debounced_button.c index 196ff723..7f1c03b1 100644 --- a/src/fw/drivers/debounced_button.c +++ b/src/fw/drivers/debounced_button.c @@ -58,7 +58,7 @@ static void initialize_button_timer(void) { periph_config_enable(TIM4, RCC_APB1Periph_TIM4); NVIC_InitTypeDef NVIC_InitStructure; - /* Enable the TIM4 gloabal Interrupt */ + /* Enable the TIM4 global Interrupt */ TIM_ClearITPendingBit(TIM4, TIM_IT_Update); NVIC_InitStructure.NVIC_IRQChannel = TIM4_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0b; diff --git a/src/fw/drivers/display/sharp_ls013b7dh01/sharp_ls013b7dh01.c b/src/fw/drivers/display/sharp_ls013b7dh01/sharp_ls013b7dh01.c index a2cf680e..45d1eba9 100644 --- a/src/fw/drivers/display/sharp_ls013b7dh01/sharp_ls013b7dh01.c +++ b/src/fw/drivers/display/sharp_ls013b7dh01/sharp_ls013b7dh01.c @@ -304,7 +304,7 @@ static void prv_memcpy_backwards(uint32_t* dst, uint32_t* src, int length) { //! //! Write a single byte synchronously to the display. Use this -//! sparingly, as it will tie up the micro duing the write. +//! sparingly, as it will tie up the micro during the write. //! static void prv_display_write_byte(uint8_t d) { // Block until the tx buffer is empty diff --git a/src/fw/drivers/dma.h b/src/fw/drivers/dma.h index 53a4dfc0..d4b0c04f 100644 --- a/src/fw/drivers/dma.h +++ b/src/fw/drivers/dma.h @@ -41,7 +41,7 @@ void dma_request_start_direct(DMARequest *this, void *dst, const void *src, uint //! Starts a circular DMA transfer which calls the callback for when the transfer is both complete //! and half complete. The length should be specified in bytes. -//! @note The destination address must not be in a cachable region of memory (i.e. SRAM on the F7). +//! @note The destination address must not be in a cacheable region of memory (i.e. SRAM on the F7). //! See the comment within dma.c for more info. void dma_request_start_circular(DMARequest *this, void *dst, const void *src, uint32_t length, DMACircularRequestHandler handler, void *context); diff --git a/src/fw/drivers/flash.h b/src/fw/drivers/flash.h index ba93b886..d01cfefc 100644 --- a/src/fw/drivers/flash.h +++ b/src/fw/drivers/flash.h @@ -35,7 +35,7 @@ void flash_init(void); void flash_stop(void); /** - * Retreieve the first 3 bytes of the flash's device id. This ID + * Retrieve the first 3 bytes of the flash's device id. This ID * should remain fixed across all chips. */ uint32_t flash_whoami(void); diff --git a/src/fw/drivers/flash/flash_api.c b/src/fw/drivers/flash/flash_api.c index 4576efde..339b4104 100644 --- a/src/fw/drivers/flash/flash_api.c +++ b/src/fw/drivers/flash/flash_api.c @@ -187,7 +187,7 @@ TimerID flash_api_get_erase_poll_timer_for_test(void) { //! Assumes that s_flash_lock is held. static void prv_erase_pause(void) { if (s_erase.in_progress && !s_erase.suspended) { - // If an erase is in progress, make sure it gets at least a mininum time slice to progress. + // If an erase is in progress, make sure it gets at least a minimum time slice to progress. // If not, the successive kicking of the suspend timer could starve it out completely psleep(100); task_watchdog_bit_set(s_erase.task); diff --git a/src/fw/drivers/flash/micron_n25q/flash.c b/src/fw/drivers/flash/micron_n25q/flash.c index 032d0b26..faf1676a 100644 --- a/src/fw/drivers/flash/micron_n25q/flash.c +++ b/src/fw/drivers/flash/micron_n25q/flash.c @@ -375,7 +375,7 @@ void flash_read_bytes(uint8_t* buffer, uint32_t start_addr, uint32_t buffer_size flash_send_24b_address(start_addr); // There is delay associated with setting up the stm32 dma, using FreeRTOS - // sempahores, handling ISRs, etc. Thus for short reads, the cost of using + // semaphores, handling ISRs, etc. Thus for short reads, the cost of using // DMA is far more expensive than the read being performed. Reads greater // than 34 was empirically determined to be the point at which using the DMA // engine is advantageous @@ -646,7 +646,7 @@ size_t flash_get_size(void) { return 0; } - // capcity_megabytes = 2^(capacity in whoami) + // capacity_megabytes = 2^(capacity in whoami) uint32_t capacity = spi_flash_id & 0x000000FF; // get the capacity of the flash in bytes return 1 << capacity; diff --git a/src/fw/drivers/flash/micron_n25q/flash_private.h b/src/fw/drivers/flash/micron_n25q/flash_private.h index a17fa539..64bd6b87 100644 --- a/src/fw/drivers/flash/micron_n25q/flash_private.h +++ b/src/fw/drivers/flash/micron_n25q/flash_private.h @@ -37,7 +37,7 @@ static const uint32_t FLASH_SPI_CLOCK = RCC_APB2Periph_SPI1; static const SpiPeriphClock FLASH_SPI_CLOCK_PERIPH = SpiPeriphClockAPB2; -/* Pin Defintions */ +/* Pin Definitions */ static const uint32_t FLASH_PIN_SCS = GPIO_Pin_4; static const uint32_t FLASH_PIN_SCLK = GPIO_Pin_5; static const uint32_t FLASH_PIN_MISO = GPIO_Pin_6; diff --git a/src/fw/drivers/flash/mt25q.c b/src/fw/drivers/flash/mt25q.c index 87d7fe5c..76f0d92b 100644 --- a/src/fw/drivers/flash/mt25q.c +++ b/src/fw/drivers/flash/mt25q.c @@ -129,7 +129,7 @@ status_t flash_impl_unprotect(void) { static void prv_set_high_drive_strength(void) { // Match the impedance of the traces (~50 ohms) by configuring the drive strength of the data - // output pins on the MT25Q to the 45 ohm setting This avoids signal integreity issues. This is + // output pins on the MT25Q to the 45 ohm setting This avoids signal integrity issues. This is // done by setting bits 2:0 in the "Enhanced Volatile Configuration Register" to 101b. const uint8_t read_instruction = 0x65; const uint8_t write_instruction = 0x61; diff --git a/src/fw/drivers/flash/qspi_flash.c b/src/fw/drivers/flash/qspi_flash.c index 790798ac..c075549a 100644 --- a/src/fw/drivers/flash/qspi_flash.c +++ b/src/fw/drivers/flash/qspi_flash.c @@ -303,7 +303,7 @@ void qspi_flash_set_lower_power_mode(QSPIFlash *dev, bool active) { } #if TARGET_QEMU -// While this works with normal hardware, it has a large stack requirment and I can't +// While this works with normal hardware, it has a large stack requirement and I can't // see a compelling reason to use it over the mmap blank check variant static bool prv_blank_check_poll(QSPIFlash *dev, uint32_t addr, bool is_subsector) { const uint32_t size_bytes = is_subsector ? SUBSECTOR_SIZE_BYTES : SECTOR_SIZE_BYTES; @@ -656,7 +656,7 @@ void command_flash_apicheck(const char *len_str) { } if (failures == 0) { - prompt_send_response_fmt(buf, buf_size, "SUCCESS: run %d tests and all passeed", passes); + prompt_send_response_fmt(buf, buf_size, "SUCCESS: run %d tests and all passed", passes); } else { prompt_send_response_fmt(buf, buf_size, "FAILED: run %d tests and %d failed", diff --git a/src/fw/drivers/flash/spansion_s29vs.c b/src/fw/drivers/flash/spansion_s29vs.c index 4206b7c9..aa8d0cde 100644 --- a/src/fw/drivers/flash/spansion_s29vs.c +++ b/src/fw/drivers/flash/spansion_s29vs.c @@ -57,10 +57,10 @@ typedef enum S29VSCommand { } S29VSCommand; //! Arguments to the S29VSCommand_EraseSetup command -typedef enum S29VSCommandEraseAguments { - S29VSCommandEraseAguments_ChipErase = 0x10, - S29VSCommandEraseAguments_SectorErase = 0x30 -} S29VSCommandEraseAguments; +typedef enum S29VSCommandEraseArguments { + S29VSCommandEraseArguments_ChipErase = 0x10, + S29VSCommandEraseArguments_SectorErase = 0x30 +} S29VSCommandEraseArguments; //! The bitset stored in the status register, see prv_read_status_register typedef enum S29VSStatusBit { @@ -422,7 +422,7 @@ status_t flash_impl_erase_sector_begin(FlashAddress sector_addr) { prv_issue_command(sector_addr, S29VSCommand_EraseSetup); prv_issue_command_argument(sector_addr, - S29VSCommandEraseAguments_SectorErase); + S29VSCommandEraseArguments_SectorErase); prv_allow_write_if_sector_is_not_protected(true, sector_addr); // Check the status register to make sure that the erase has started. @@ -508,7 +508,7 @@ status_t flash_impl_erase_bulk_begin(void) { flash_s29vs_use(); prv_issue_command(0, S29VSCommand_EraseSetup); - prv_issue_command_argument(0, S29VSCommandEraseAguments_ChipErase); + prv_issue_command_argument(0, S29VSCommandEraseArguments_ChipErase); flash_s29vs_release(); } diff --git a/src/fw/drivers/imu/bma255/bma255.c b/src/fw/drivers/imu/bma255/bma255.c index 94413179..429ffd78 100644 --- a/src/fw/drivers/imu/bma255/bma255.c +++ b/src/fw/drivers/imu/bma255/bma255.c @@ -76,7 +76,7 @@ static void prv_set_accel_power_mode(BMA255PowerMode mode); // The BMA255 reports each G in powers of 2 with full deflection at +-2^11 // So scale all readings by (scale)/(2^11) to get G -// And scale the result by 1000 to allow for easier interger math +// And scale the result by 1000 to allow for easier integer math typedef enum { BMA255Scale_2G = 980, // 2000/2048 BMA255Scale_4G = 1953, // 4000/2048 @@ -658,7 +658,7 @@ static void prv_enable_shake_detection(void) { bma255_write_register(BMA255Register_INT_MAP_0, BMA255_INT_MAP_0_INT1_SLOPE); // configure the anymotion interrupt to fire after 4 successive - // samples are over the threhold specified + // samples are over the threshold specified accel_set_shake_sensitivity_high(false /* sensitivity_high */); bma255_write_register(BMA255Register_INT_5, BMA255_INT_5_SLOPE_DUR_MASK << BMA255_INT_5_SLOPE_DUR_SHIFT); diff --git a/src/fw/drivers/imu/bma255/bma255.h b/src/fw/drivers/imu/bma255/bma255.h index be5757e3..5ddd86ed 100644 --- a/src/fw/drivers/imu/bma255/bma255.h +++ b/src/fw/drivers/imu/bma255/bma255.h @@ -60,7 +60,7 @@ typedef enum { //! These are the natively supported filter bandwidths of the bma255. //! Note that power consumption is tightly tied to the filter bandwidth. In //! order to run acceptably, we need to keep a bandwidth up in the 500Hz ~ 1kHz range. -//! Please see discussion below for more information on Bandwith, TSleep and ODR. +//! Please see discussion below for more information on Bandwidth, TSleep and ODR. typedef enum { BMA255Bandwidth_7p81HZ = 8, BMA255Bandwidth_15p63HZ = 9, @@ -74,7 +74,7 @@ typedef enum { BMA255BandwidthCount } BMA255Bandwidth; -//! In order to acheive low power consumptions, the BMA255 Output Data Rate (ODR) +//! In order to achieve low power consumptions, the BMA255 Output Data Rate (ODR) //! is determined by a combination of: //! - high-bandwidth operating rate: //! Less filtering is done on the bma255, which has a direct impact on power consumption. diff --git a/src/fw/drivers/imu/bmi160/bmi160.c b/src/fw/drivers/imu/bmi160/bmi160.c index 8d9c1fef..ba89a839 100644 --- a/src/fw/drivers/imu/bmi160/bmi160.c +++ b/src/fw/drivers/imu/bmi160/bmi160.c @@ -112,7 +112,7 @@ static void prv_write_reg(uint8_t reg, uint8_t value) { // Wait 2 us (active mode) or 450 us (suspend mode) // before issuing the next read or write command. // - // TODO: I'm pretty sure if commands are specifically targetting + // TODO: I'm pretty sure if commands are specifically targeting // a unit in suspend mode, we will need to delay for 450us even if // the other unit is powered up in Normal mode if (s_accel_power_mode == BMI160_Accel_Mode_Normal @@ -262,7 +262,7 @@ static bool prv_new_sample_collected(uint8_t sensor_timestamp_before[3], uint32_t sample_time_bit = prv_get_sample_collection_bit(); - // see if the upper bits oveflowed + // see if the upper bits overflowed uint32_t upper_bits_mask = ~((0x1 << sample_time_bit) - 1); start_time &= upper_bits_mask; end_time &= upper_bits_mask; @@ -958,8 +958,8 @@ static void prv_enable_shake_detection(void) { BMI160_INT_EN_0_ANYMOTION_Y_EN | BMI160_INT_EN_0_ANYMOTION_X_EN); prv_read_modify_write(BMI160_REG_INT_EN_0, int_en, int_en); - // configure the anymotion interrupt to fire after 4 successcive - // samples are over the threhold specified + // configure the anymotion interrupt to fire after 4 successive + // samples are over the threshold specified accel_set_shake_sensitivity_high(false /* sensitivity_high */); prv_write_reg(BMI160_REG_INT_MOTION_0, 0x3 << BMI160_INT_MOTION_1_ANYM_DUR_SHIFT); diff --git a/src/fw/drivers/imu/lis3dh/config.c b/src/fw/drivers/imu/lis3dh/config.c index 27211405..75b41140 100644 --- a/src/fw/drivers/imu/lis3dh/config.c +++ b/src/fw/drivers/imu/lis3dh/config.c @@ -340,7 +340,7 @@ void lis3dh_exit_self_test_mode(void) { //! factory. Useful as a sanity check to make sure everything came up properly. bool lis3dh_sanity_check(void) { uint8_t whoami = prv_read_reg(LIS3DH_WHO_AM_I); - PBL_LOG(LOG_LEVEL_DEBUG, "Read accel whomai byte 0x%x, expecting 0x%x", whoami, LIS3DH_WHOAMI_BYTE); + PBL_LOG(LOG_LEVEL_DEBUG, "Read accel whoami byte 0x%x, expecting 0x%x", whoami, LIS3DH_WHOAMI_BYTE); return (whoami == LIS3DH_WHOAMI_BYTE); } @@ -353,7 +353,7 @@ bool lis3dh_config_set_defaults() { { LIS3DH_CTRL_REG4, (BDU | FS0 | HR) }, // Block Read, +/- 4g sensitivity { LIS3DH_CTRL_REG6, I2_CLICK }, // Click on INT2 - { LIS3DH_INT1_THS, 0x20 }, // intertial threshold (MAX 0x7f) + { LIS3DH_INT1_THS, 0x20 }, // inertial threshold (MAX 0x7f) { LIS3DH_INT1_DURATION, 0x10 }, // interrupt duration (units of 1/(update frequency) [See CTRL_REG1]) { LIS3DH_INT1_CFG, 0x00 }, // no inertial interrupts diff --git a/src/fw/drivers/imu/lis3dh/lis3dh.c b/src/fw/drivers/imu/lis3dh/lis3dh.c index 9e2a64f0..109c0f44 100644 --- a/src/fw/drivers/imu/lis3dh/lis3dh.c +++ b/src/fw/drivers/imu/lis3dh/lis3dh.c @@ -570,7 +570,7 @@ bool accel_is_idle(void) { return false; } - // It was idle recently, see if it's still idle. Note we are avoiding reading the accel hardwware again here + // It was idle recently, see if it's still idle. Note we are avoiding reading the accel hardware again here // to keep this call as lightweight as possible. Instead we are just comparing the last read value with // the value last captured by analytics (which does so on an hourly heartbeat). AccelRawData accel_data; diff --git a/src/fw/drivers/mpu.c b/src/fw/drivers/mpu.c index dc0795b6..2a9bf0b7 100644 --- a/src/fw/drivers/mpu.c +++ b/src/fw/drivers/mpu.c @@ -209,11 +209,11 @@ void mpu_set_task_configurable_regions(MemoryRegion_t *memory_regions, } -bool mpu_memory_is_cachable(const void *addr) { +bool mpu_memory_is_cacheable(const void *addr) { if (!dcache_is_enabled()) { return false; } - // TODO PBL-37601: We're assuming only SRAM is cachable for now for simplicity sake. We should + // TODO PBL-37601: We're assuming only SRAM is cacheable for now for simplicity sake. We should // account for MPU configuration and also the fact that memory-mapped QSPI access goes through the // cache. return ((uint32_t)addr >= SRAM_BASE) && ((uint32_t)addr < SRAM_END); diff --git a/src/fw/drivers/mpu.h b/src/fw/drivers/mpu.h index ca7da0b0..e960efec 100644 --- a/src/fw/drivers/mpu.h +++ b/src/fw/drivers/mpu.h @@ -59,6 +59,6 @@ void mpu_get_register_settings(const MpuRegion* region, uint32_t *base_address_r void mpu_set_task_configurable_regions(MemoryRegion_t *memory_regions, const MpuRegion **region_ptrs); -bool mpu_memory_is_cachable(const void *addr); +bool mpu_memory_is_cacheable(const void *addr); void mpu_init_region_from_region(MpuRegion *copy, const MpuRegion *from, bool allow_user_access); diff --git a/src/fw/drivers/pmic/max14690_pmic.c b/src/fw/drivers/pmic/max14690_pmic.c index 45d814af..ad37b518 100644 --- a/src/fw/drivers/pmic/max14690_pmic.c +++ b/src/fw/drivers/pmic/max14690_pmic.c @@ -359,7 +359,7 @@ bool pmic_enable_battery_measure(void) { bool pmic_disable_battery_measure(void) { bool result = prv_set_mon_config_register(0); - // Releases the lock that was previously aquired in pmic_enable_battery_measure. + // Releases the lock that was previously acquired in pmic_enable_battery_measure. prv_mon_config_unlock(); return result; @@ -519,7 +519,7 @@ static bool prv_is_alive(void) { return true; } else { PBL_LOG(LOG_LEVEL_DEBUG, - "Error: read max14690 whomai byte 0x%x, expecting 0x%x", val, 0x01); + "Error: read max14690 whoami byte 0x%x, expecting 0x%x", val, 0x01); return false; } } diff --git a/src/fw/drivers/qemu/qemu_accel.c b/src/fw/drivers/qemu/qemu_accel.c index 357dfa30..e066eff3 100644 --- a/src/fw/drivers/qemu/qemu_accel.c +++ b/src/fw/drivers/qemu/qemu_accel.c @@ -161,7 +161,7 @@ static void prv_reschedule_timer(void) { // Called by the qemu_serial driver when we receive an accel packet from the // remote side. This copies the received data into our s_rcv_buffer buffer. It // will gradually be pulled out of that and replayed by the timer callback. -void qemu_accel_msg_callack(const uint8_t *data, uint32_t len) { +void qemu_accel_msg_callback(const uint8_t *data, uint32_t len) { QemuProtocolAccelHeader *hdr = (QemuProtocolAccelHeader *)data; // Validate the packet diff --git a/src/fw/drivers/qemu/qemu_accel.h b/src/fw/drivers/qemu/qemu_accel.h index 7bf26abd..da1692cc 100644 --- a/src/fw/drivers/qemu/qemu_accel.h +++ b/src/fw/drivers/qemu/qemu_accel.h @@ -22,4 +22,4 @@ void qemu_accel_init(void); //! Handler called by qemu_serial driver when we receive a QemuProtocol_Accel message //! over the qemu serial connection. -void qemu_accel_msg_callack(const uint8_t *data, uint32_t len); +void qemu_accel_msg_callback(const uint8_t *data, uint32_t len); diff --git a/src/fw/drivers/qemu/qemu_battery.c b/src/fw/drivers/qemu/qemu_battery.c index d6f381e4..74faf97d 100644 --- a/src/fw/drivers/qemu/qemu_battery.c +++ b/src/fw/drivers/qemu/qemu_battery.c @@ -55,7 +55,7 @@ void battery_set_fast_charge(bool fast_charge_enabled) { } -void qemu_battery_msg_callack(const uint8_t *data, uint32_t len) { +void qemu_battery_msg_callback(const uint8_t *data, uint32_t len) { QemuProtocolBatteryHeader *hdr = (QemuProtocolBatteryHeader *)data; if (len != sizeof(*hdr)) { PBL_LOG(LOG_LEVEL_ERROR, "Invalid packet length"); diff --git a/src/fw/drivers/qemu/qemu_battery.h b/src/fw/drivers/qemu/qemu_battery.h index 5eeaf205..0aeff05f 100644 --- a/src/fw/drivers/qemu/qemu_battery.h +++ b/src/fw/drivers/qemu/qemu_battery.h @@ -20,4 +20,4 @@ //! Handler called by qemu_serial driver when we receive a QemuProtocol_Battery message //! over the qemu serial connection. -void qemu_battery_msg_callack(const uint8_t *data, uint32_t len); +void qemu_battery_msg_callback(const uint8_t *data, uint32_t len); diff --git a/src/fw/drivers/qemu/qemu_serial.c b/src/fw/drivers/qemu/qemu_serial.c index e3bd7013..8d3cf70a 100644 --- a/src/fw/drivers/qemu/qemu_serial.c +++ b/src/fw/drivers/qemu/qemu_serial.c @@ -173,8 +173,8 @@ static const QemuMessageHandler s_qemu_endpoints[] = { { QemuProtocol_Tap, prv_tap_msg_callback }, { QemuProtocol_BluetoothConnection, prv_bluetooth_connection_msg_callback }, { QemuProtocol_Compass, prv_compass_msg_callback }, - { QemuProtocol_Battery, qemu_battery_msg_callack }, - { QemuProtocol_Accel, qemu_accel_msg_callack }, + { QemuProtocol_Battery, qemu_battery_msg_callback }, + { QemuProtocol_Accel, qemu_accel_msg_callback }, { QemuProtocol_TimeFormat, prv_time_format_msg_callback }, { QemuProtocol_TimelinePeek, prv_timeline_peek_msg_callback }, { QemuProtocol_ContentSize, prv_content_size_msg_callback }, @@ -216,7 +216,7 @@ void qemu_serial_init(void) { // ----------------------------------------------------------------------------------------- -// KernelMain callback triggred by our ISR handler when we detect a high water mark on our +// KernelMain callback triggered by our ISR handler when we detect a high water mark on our // receive buffer or a footer signature static void prv_process_receive_buffer(void *context) { uint32_t msg_bytes; diff --git a/src/fw/drivers/qemu/qemu_serial.h b/src/fw/drivers/qemu/qemu_serial.h index d42b2deb..6a02e2df 100644 --- a/src/fw/drivers/qemu/qemu_serial.h +++ b/src/fw/drivers/qemu/qemu_serial.h @@ -61,7 +61,7 @@ typedef struct PACKED { // QemuProtocol_Compass typedef struct PACKED { - uint32_t magnetic_heading; // 0x10000 represents 360 degress + uint32_t magnetic_heading; // 0x10000 represents 360 degrees CompassStatus calib_status:8; // CompassStatus enum } QemuProtocolCompassHeader; diff --git a/src/fw/drivers/qemu/qemu_serial_util.c b/src/fw/drivers/qemu/qemu_serial_util.c index e5b16a58..e8a99ffa 100644 --- a/src/fw/drivers/qemu/qemu_serial_util.c +++ b/src/fw/drivers/qemu/qemu_serial_util.c @@ -50,7 +50,7 @@ void qemu_serial_private_init_state(QemuSerialGlobals *state) // ----------------------------------------------------------------------------------------- -// Helper function triggred by our ISR handler when we detect a high water mark on our receive +// Helper function triggered by our ISR handler when we detect a high water mark on our receive // buffer or a footer signature. // // Parses the ISR's circular buffer and collects assembled message into a message buffer. If diff --git a/src/fw/drivers/qspi.h b/src/fw/drivers/qspi.h index 64a3b7b2..8a140c0f 100644 --- a/src/fw/drivers/qspi.h +++ b/src/fw/drivers/qspi.h @@ -22,7 +22,7 @@ //! Memory mapped region for the QSPI controller #define QSPI_MMAP_BASE_ADDRESS ((uintptr_t) 0x90000000) -//! Timouts for qspi_poll_bit +//! Timeouts for qspi_poll_bit #define QSPI_NO_TIMEOUT (0) typedef const struct QSPIPort QSPIPort; diff --git a/src/fw/drivers/rng.h b/src/fw/drivers/rng.h index 81529e24..163eea1f 100644 --- a/src/fw/drivers/rng.h +++ b/src/fw/drivers/rng.h @@ -20,5 +20,5 @@ #include //! @param rand_out Storage for the 32-bit random number generated by the STM32 -//! @return True if a random number was succesfully generated +//! @return True if a random number was successfully generated bool rng_rand(uint32_t *rand_out); diff --git a/src/fw/drivers/rtc.h b/src/fw/drivers/rtc.h index 3a2b0e4b..e0eeff1e 100644 --- a/src/fw/drivers/rtc.h +++ b/src/fw/drivers/rtc.h @@ -30,11 +30,11 @@ typedef uint64_t RtcTicks; void rtc_init(void); //! Calibrate the RTC driver using the given crystal frequency (in mHz). -//! This is a seperate step because rtc_init needs to run incredibly early in the startup process +//! This is a separate step because rtc_init needs to run incredibly early in the startup process //! and the manufacturing registry won't be initialized yet. void rtc_calibrate_frequency(uint32_t frequency); -//! Initialize any timers the RTC driver may need. This is a seperate step than rtc_init because +//! Initialize any timers the RTC driver may need. This is a separate step than rtc_init because //! rtc_init needs to run incredibly early in the startup process and at that time the timer //! system won't be initialized yet. void rtc_init_timers(void); diff --git a/src/fw/drivers/stm32f2/dma.c b/src/fw/drivers/stm32f2/dma.c index 9e3e23cc..2bbe40e2 100644 --- a/src/fw/drivers/stm32f2/dma.c +++ b/src/fw/drivers/stm32f2/dma.c @@ -264,7 +264,7 @@ void dma_request_init(DMARequest *this) { //////////////////////////////////////////////////////////////////////////////// static void prv_validate_memory(DMARequest *this, void *dst, const void *src, uint32_t length) { - if (mpu_memory_is_cachable(src)) { + if (mpu_memory_is_cacheable(src)) { // Flush the source buffer from cache so that SRAM has the correct data. uintptr_t aligned_src = (uintptr_t)src; size_t aligned_length = length; @@ -273,11 +273,11 @@ static void prv_validate_memory(DMARequest *this, void *dst, const void *src, ui } const uint32_t alignment_mask = prv_get_data_size_bytes(this) - 1; - if (mpu_memory_is_cachable(dst)) { + if (mpu_memory_is_cacheable(dst)) { // If a cache line within the dst gets evicted while we do the transfer, it'll corrupt SRAM, so // just invalidate it now. dcache_invalidate(dst, length); - // since the dst address is cachable, it needs to be aligned to a cache line and + // since the dst address is cacheable, it needs to be aligned to a cache line and // the length must be an even multiple of cache lines const uint32_t dst_alignment_mask = dcache_alignment_mask_minimum(alignment_mask); PBL_ASSERTN(((length & dst_alignment_mask) == 0) && @@ -377,11 +377,11 @@ void dma_request_start_circular(DMARequest *this, void *dst, const void *src, ui PBL_ASSERTN(!this->stream->state->current_request); this->stream->state->current_request = this; - // TODO: We don't currently support DMA'ing into a cachable region of memory (i.e. SRAM) for + // TODO: We don't currently support DMA'ing into a cacheable region of memory (i.e. SRAM) for // circular transfers. The reason is that it gets complicated because the consumer might be // reading from the buffer at any time (as UART does), as opposed to direct transfers where the // consumer is always reading only after the transfer has completed. - PBL_ASSERTN(!mpu_memory_is_cachable(dst)); + PBL_ASSERTN(!mpu_memory_is_cacheable(dst)); prv_request_start(this, dst, src, length, DMARequestTransferType_Circular); } @@ -449,7 +449,7 @@ void dma_stream_irq_handler(DMAStream *stream) { switch (this->state->transfer_type) { case DMARequestTransferType_Direct: if (has_tc) { - if (mpu_memory_is_cachable(this->state->transfer_dst)) { + if (mpu_memory_is_cacheable(this->state->transfer_dst)) { dcache_invalidate(this->state->transfer_dst, this->state->transfer_length); } diff --git a/src/fw/drivers/stm32f2/rtc_calibration.c b/src/fw/drivers/stm32f2/rtc_calibration.c index 5483ce1f..0d1a4ef6 100644 --- a/src/fw/drivers/stm32f2/rtc_calibration.c +++ b/src/fw/drivers/stm32f2/rtc_calibration.c @@ -93,7 +93,7 @@ void rtc_calibration_init_timer(void) { periph_config_enable(TIM7, RCC_APB1Periph_TIM7); NVIC_InitTypeDef NVIC_InitStructure; - /* Enable the TIM7 gloabal Interrupt */ + /* Enable the TIM7 global Interrupt */ TIM_ClearITPendingBit(TIM7, TIM_IT_Update); NVIC_InitStructure.NVIC_IRQChannel = TIM7_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0b; diff --git a/src/fw/drivers/stm32f2/spi.c b/src/fw/drivers/stm32f2/spi.c index 4469ceee..c6ad1703 100644 --- a/src/fw/drivers/stm32f2/spi.c +++ b/src/fw/drivers/stm32f2/spi.c @@ -291,7 +291,7 @@ static void prv_spi_slave_deinit(const SPISlavePort *slave) { //! The assertion and deassertion of the SCS line is automatic // -static bool prv_is_bidrectional(const SPISlavePort *slave) { +static bool prv_is_bidirectional(const SPISlavePort *slave) { bool is_bidirectional = (slave->spi_direction == SpiDirection_2LinesFullDuplex) || (slave->spi_direction == SpiDirection_2LinesRxOnly); @@ -304,7 +304,7 @@ void spi_slave_port_deinit(const SPISlavePort *slave) { return; } prv_spi_slave_deinit(slave); - prv_spi_bus_deinit(slave->spi_bus, prv_is_bidrectional(slave)); + prv_spi_bus_deinit(slave->spi_bus, prv_is_bidirectional(slave)); slave->slave_state->initialized = false; } @@ -316,7 +316,7 @@ void spi_slave_port_init(const SPISlavePort *slave) { slave->slave_state->initialized = true; slave->slave_state->acquired = false; slave->slave_state->scs_selected = false; - prv_spi_bus_init(slave->spi_bus, prv_is_bidrectional(slave)); + prv_spi_bus_init(slave->spi_bus, prv_is_bidirectional(slave)); // SCS gpio_output_init(&slave->spi_scs, GPIO_OType_PP, slave->spi_bus->spi_sclk_speed); diff --git a/src/fw/drivers/stm32f2/uart.c b/src/fw/drivers/stm32f2/uart.c index 6f1520c6..1ea42ed6 100644 --- a/src/fw/drivers/stm32f2/uart.c +++ b/src/fw/drivers/stm32f2/uart.c @@ -138,7 +138,7 @@ void uart_set_baud_rate(UARTDevice *dev, uint32_t baud_rate) { // We need to calculate the divider to get from the clock frequency down to the sampling // frequency (samples * baud_rate) and store it in USART_BBR as a fixed-point number with a - // franctional component equal to the number of samples per symbol. In other words, if OVER8=0, + // fractional component equal to the number of samples per symbol. In other words, if OVER8=0, // the fractional component will be 4 bits, and if OVER8=1, it will be 3 bits. // The formula works out to: DIV = f_clk / (samples * BAUD) diff --git a/src/fw/drivers/stm32f4/rtc.c b/src/fw/drivers/stm32f4/rtc.c index cbe35f2c..0deb5c36 100644 --- a/src/fw/drivers/stm32f4/rtc.c +++ b/src/fw/drivers/stm32f4/rtc.c @@ -46,7 +46,7 @@ void rtc_init(void) { clocksource_lse_configure(); - // Only initialize the RTC periphieral if it's not already enabled. + // Only initialize the RTC peripheral if it's not already enabled. if (!(RCC->BDCR & RCC_BDCR_RTCEN)) { RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE); RCC_RTCCLKCmd(ENABLE); @@ -213,7 +213,7 @@ void rtc_alarm_init(void) { RTC_WakeUpCmd(DISABLE); // Make sure this in in sync with the definition of LSE_FREQUENCY_HZ. This is the lowest setting - // for the highest frequency and therefore the highest accurracy. However, it limits us to only + // for the highest frequency and therefore the highest accuracy. However, it limits us to only // setting wakeup timers for up to 4s~ (2^16 max counter value / (32768 / 2)) in the future. // This is fine for now as we have a regular timer register each second, so we'll never want to // stop for more than a single second. diff --git a/src/fw/drivers/stm32f412/qspi.c b/src/fw/drivers/stm32f412/qspi.c index 00bbca2d..576edd24 100644 --- a/src/fw/drivers/stm32f412/qspi.c +++ b/src/fw/drivers/stm32f412/qspi.c @@ -260,7 +260,7 @@ void qspi_indirect_read_dma(QSPIPort *dev, uint8_t instruction, uint32_t start_a // So this function is broken into 3 parts: // 1. Do reads 1 byte at a time until buffer_ptr is word-aligned // 2. Do 32-bit DMA transfers for as much as possible - // 3. Do reads 1 bytes at a time to deal with non-aligned acceses at the end + // 3. Do reads 1 bytes at a time to deal with non-aligned accesses at the end const uint32_t word_mask = dcache_alignment_mask_minimum(QSPI_DMA_READ_WORD_SIZE); const uintptr_t buffer_address = (uintptr_t)buffer; diff --git a/src/fw/drivers/stm32f7/i2c_timingr.h b/src/fw/drivers/stm32f7/i2c_timingr.h index c7e8b78c..98d10c00 100644 --- a/src/fw/drivers/stm32f7/i2c_timingr.h +++ b/src/fw/drivers/stm32f7/i2c_timingr.h @@ -18,7 +18,7 @@ #include -// This is always invalid because it inclues a value being set in the reserved field. +// This is always invalid because it includes a value being set in the reserved field. #define I2C_TIMINGR_INVALID_VALUE (0xffffffff) typedef enum I2CBusMode { diff --git a/src/fw/drivers/task_watchdog.h b/src/fw/drivers/task_watchdog.h index ff728ae5..c1fb1f8a 100644 --- a/src/fw/drivers/task_watchdog.h +++ b/src/fw/drivers/task_watchdog.h @@ -33,7 +33,7 @@ void task_watchdog_bit_set(PebbleTask task); //! managing their own bits. If you're using this you're probably hacking around something awful. void task_watchdog_bit_set_all(void); -//! @return bool Wether this task is being tracked by the task watchdog. +//! @return bool Whether this task is being tracked by the task watchdog. bool task_watchdog_mask_get(PebbleTask task); //! Starts tracking a particular task using the task watchdog. The task must regularly call diff --git a/src/fw/drivers/uart.h b/src/fw/drivers/uart.h index 264adcae..c30c35be 100644 --- a/src/fw/drivers/uart.h +++ b/src/fw/drivers/uart.h @@ -67,7 +67,7 @@ void uart_set_baud_rate(UARTDevice *dev, uint32_t baud_rate); //! @note This cannot be set at the same time as a raw interrupt handler void uart_set_rx_interrupt_handler(UARTDevice *dev, UARTRXInterruptHandler irq_handler); -//! Sets a transmit IRQ handler for the device which is called whenenver we send a byte (within an +//! Sets a transmit IRQ handler for the device which is called whenever we send a byte (within an //! ISR) //! @note This cannot be set at the same time as a raw interrupt handler void uart_set_tx_interrupt_handler(UARTDevice *dev, UARTTXInterruptHandler irq_handler); diff --git a/src/fw/flash_region/flash_region.h b/src/fw/flash_region/flash_region.h index 4ab70a6e..4135cc37 100644 --- a/src/fw/flash_region/flash_region.h +++ b/src/fw/flash_region/flash_region.h @@ -27,7 +27,7 @@ // be changed. Migrations are likely as well. // // On watches with only 4MB of flash, the region will have a size of zero and be ignored by the - // fileystem. + // filesystem. #if defined(BOARD_V2_0) || defined(BOARD_V1_5) || defined(LARGE_SPI_FLASH) #define BOARD_NOR_FLASH_SIZE 0x600000 #else diff --git a/src/fw/freertos_application.c b/src/fw/freertos_application.c index 321cc42c..6272a74a 100644 --- a/src/fw/freertos_application.c +++ b/src/fw/freertos_application.c @@ -143,7 +143,7 @@ void vApplicationStackOverflowHook(TaskHandle_t task_handle, signed char *name) PebbleTask task = pebble_task_get_task_for_handle(task_handle); // If the task is application or worker, ignore this hook. We have a memory protection region - // setup at the bottom of those stacks and the code that catches MPU violiations to that + // setup at the bottom of those stacks and the code that catches MPU violations to that // area in fault_handling.c has the logic to safely kill those user tasks without forcing // a reboot. if ((task != PebbleTask_App) && (task != PebbleTask_Worker)) { diff --git a/src/fw/fw_common.ld b/src/fw/fw_common.ld index b55f574e..d2842593 100644 --- a/src/fw/fw_common.ld +++ b/src/fw/fw_common.ld @@ -133,7 +133,7 @@ SECTIONS { } >APP_RAM .kernel_data : ALIGN(8) { - __data_start = .; /* This is used by the startup in order to initialize the .data secion */ + __data_start = .; /* This is used by the startup in order to initialize the .data section */ *(.data) *(.data.*) @@ -144,7 +144,7 @@ SECTIONS { __data_load_start = LOADADDR(.kernel_data); .kernel_ro_bss (NOLOAD) : { - __bss_start = .; /* This is used by the startup in order to initialize the .bss secion */ + __bss_start = .; /* This is used by the startup in order to initialize the .bss section */ . = ALIGN(__unpriv_ro_bss_size__); __unpriv_ro_bss_start__ = .; diff --git a/src/fw/kernel/core_dump.c b/src/fw/kernel/core_dump.c index cc572f71..7fe38b5f 100644 --- a/src/fw/kernel/core_dump.c +++ b/src/fw/kernel/core_dump.c @@ -18,7 +18,7 @@ * This module contains the core dump logic which writes the core dump to SPI flash. It operates * under a very limited set of constraints: * 1.) It can NOT use most FreeRTOS functions - * 2.) It can not use the regular flash driver (because that uses FreeRTOS mutexes) + * 2.) It can NOT use the regular flash driver (because that uses FreeRTOS mutexes) * * There is a separate module, core_dump_protocol.c which implements the session endpoint logic for * fetching the core dump over bluetooth. That module is free to use FreeRTOS, regular flash @@ -63,7 +63,7 @@ #define STM32F7_COMPATIBLE #include -#include "FreeRTOS.h" /* FreeRTOS Kernal Prototypes/Constants. */ +#include "FreeRTOS.h" /* FreeRTOS Kernel Prototypes/Constants. */ #include "task.h" /* FreeRTOS Task Prototypes/Constants. */ #include @@ -780,7 +780,7 @@ cleanup: } // -------------------------------------------------------------------------------------------------- -// Used by unit tests in to cause fw/apps/demo_apps/test_core_dump_app to encounter a bus fault during the core dump +// Used by unit tests to cause fw/apps/demo_apps/test_core_dump_app to encounter a bus fault during the core dump void core_dump_test_force_bus_fault(void) { s_test_force_bus_fault = true; } diff --git a/src/fw/kernel/core_dump_private.h b/src/fw/kernel/core_dump_private.h index f153419f..b49f188d 100644 --- a/src/fw/kernel/core_dump_private.h +++ b/src/fw/kernel/core_dump_private.h @@ -80,7 +80,7 @@ typedef struct { uint32_t unformatted; // set of 1 bit flags, bit n set means region n is still unformatted } CoreDumpFlashHeader; -// This comes first in the front of each possibe flash region. It is NOT returned as part of the core dump +// This comes first in the front of each possible flash region. It is NOT returned as part of the core dump // image. typedef struct { uint32_t magic; // set to CORE_DUMP_FLASH_HDR_MAGIC diff --git a/src/fw/kernel/events.c b/src/fw/kernel/events.c index cc6c73d7..0919d24e 100644 --- a/src/fw/kernel/events.c +++ b/src/fw/kernel/events.c @@ -74,7 +74,7 @@ static void prv_queue_dump(QueueHandle_t queue) { void events_init(void) { PBL_ASSERTN(s_system_event_queue_set == NULL); - // This assert is to make sure we don't accidentally bloat our PebbleEvent unecessarily. If you hit this + // This assert is to make sure we don't accidentally bloat our PebbleEvent unnecessarily. If you hit this // assert and you have a good reason for making the event bigger, feel free to relax the restriction. //PBL_LOG(LOG_LEVEL_DEBUG, "PebbleEvent size is %u", sizeof(PebbleEvent)); // FIXME: diff --git a/src/fw/kernel/events.h b/src/fw/kernel/events.h index f4d60c51..1472991d 100644 --- a/src/fw/kernel/events.h +++ b/src/fw/kernel/events.h @@ -637,7 +637,7 @@ typedef struct HRMHRVData { // 3 bytes typedef struct HRMLEDData { // 4 bytes uint16_t current_ua; - uint16_t tia; //!< Transimpendance Amplifier value. + uint16_t tia; //!< Transimpedance Amplifier value. //!< This is used with thresholds (provided by AMS) to verify the part is //!< functioning within specification. @@ -715,7 +715,7 @@ _Static_assert(sizeof(PebbleTimelinePeekEvent) == 8, typedef enum PebbleAppCacheEventType { PebbleAppCacheEvent_Removed, - PebbleAppCacehEventNum + PebbleAppCacheEventNum } PebbleAppCacheEventType; typedef struct PACKED PebbleAppCacheEvent { diff --git a/src/fw/kernel/kernel_applib_state.c b/src/fw/kernel/kernel_applib_state.c index 4bb3604f..8a4fbdb9 100644 --- a/src/fw/kernel/kernel_applib_state.c +++ b/src/fw/kernel/kernel_applib_state.c @@ -128,7 +128,7 @@ void kernel_applib_release_log_state(LogState *state) { mutex_unlock_recursive(s_log_state_mutex); } - // Clear the re-entrancy flag for this task + // Clear the reentrancy flag for this task PebbleTask task = prv_get_current_task(); s_log_state_task_entered[task] = false; } diff --git a/src/fw/kernel/memory_layout.c b/src/fw/kernel/memory_layout.c index f7d9f399..24adfe05 100644 --- a/src/fw/kernel/memory_layout.c +++ b/src/fw/kernel/memory_layout.c @@ -218,7 +218,7 @@ void memory_layout_setup_mpu(void) { mpu_set_region(&s_microflash_region); // RAM parts - // The background memory map only allows privileged access. We need to add aditional regions to + // The background memory map only allows privileged access. We need to add additional regions to // enable access to unprivileged code. mpu_set_region(&s_readonly_bss_region); diff --git a/src/fw/kernel/reset.c b/src/fw/kernel/reset.c index 62e10c91..4639d7a8 100644 --- a/src/fw/kernel/reset.c +++ b/src/fw/kernel/reset.c @@ -50,11 +50,11 @@ NORETURN system_reset(void) { // if we're in a critical section, interrupt or if the scheduler has been suspended if (!already_failed && !mcu_state_is_isr() && !portIN_CRITICAL() && (xTaskGetSchedulerState() == taskSCHEDULER_RUNNING)) { - system_reset_prepare(failure_occurred /* skip BT teardown if failure occured */); + system_reset_prepare(failure_occurred /* skip BT teardown if failure occurred */); reboot_reason_set_restarted_safely(); } - // If a software failure occcured, do a core dump before resetting + // If a software failure occurred, do a core dump before resetting if (failure_occurred) { core_dump_reset(false /* don't force overwrite */); } diff --git a/src/fw/kernel/system_message.h b/src/fw/kernel/system_message.h index 6905270e..35fdfb7f 100644 --- a/src/fw/kernel/system_message.h +++ b/src/fw/kernel/system_message.h @@ -28,7 +28,7 @@ typedef enum SystemMessageType { SysMsgFirmwareComplete = 0x02, SysMsgFirmwareFail = 0x03, SysMsgFirmwareUpToDate = 0x04, - // SysMsgFirmarewOutOfDate = 0x05, DEPRECATED + // SysMsgFirmwareOutOfDate = 0x05, DEPRECATED SysMsgReconnectRequestStop = 0x06, SysMsgReconnectRequestStart = 0x07, SysMsgMAPRetry = 0x08, // MAP is no longer used diff --git a/src/fw/kernel/system_versions.c b/src/fw/kernel/system_versions.c index 62670612..c05ac292 100644 --- a/src/fw/kernel/system_versions.c +++ b/src/fw/kernel/system_versions.c @@ -211,7 +211,7 @@ void command_version_info(void) { char build_id_string[64]; version_copy_current_build_id_hex_string(build_id_string, sizeof(build_id_string)); - prompt_send_response_fmt(buffer, sizeof(buffer), "Build Id:%s", build_id_string); + prompt_send_response_fmt(buffer, sizeof(buffer), "Build ID:%s", build_id_string); char serial_number[MFG_SERIAL_NUMBER_SIZE + 1]; mfg_info_get_serialnumber(serial_number, sizeof(serial_number)); @@ -239,7 +239,7 @@ void command_version_info(void) { pmic_read_chip_info(&chip_id, &chip_revision, &buck1_vset); prompt_send_response_fmt(buffer, sizeof(buffer), - "PMIC Chip Id: 0x%"PRIx8" Chip Rev: 0x%"PRIx8" Buck1 VSET: 0x%"PRIx8, + "PMIC Chip ID: 0x%"PRIx8" Chip Rev: 0x%"PRIx8" Buck1 VSET: 0x%"PRIx8, chip_id, chip_revision, buck1_vset); #endif // CAPABILITY_HAS_PMIC diff --git a/src/fw/kernel/task_timer_manager.h b/src/fw/kernel/task_timer_manager.h index c5040080..9bad41b9 100644 --- a/src/fw/kernel/task_timer_manager.h +++ b/src/fw/kernel/task_timer_manager.h @@ -40,8 +40,8 @@ typedef struct TaskTimerManager { //! Initialize a passed in manager object. -//! @param[in] semaphore a sempahore the TaskTimerManager should give if the next expiring timer -//! has changed. The task event loop should block on this same semphore to +//! @param[in] semaphore a semaphore the TaskTimerManager should give if the next expiring timer +//! has changed. The task event loop should block on this same semaphore to //! handle timer updates in a timely fashion. void task_timer_manager_init(TaskTimerManager *manager, SemaphoreHandle_t semaphore); @@ -50,7 +50,7 @@ void task_timer_manager_init(TaskTimerManager *manager, SemaphoreHandle_t semaph //! returns portMAX_DELAY. TickType_t task_timer_manager_execute_expired_timers(TaskTimerManager *manager); -//! Debugging interface to help understand why the task_timer exuction is stuck and what +//! Debugging interface to help understand why the task_timer execution is stuck and what //! its stuck on. //! @return A pointer to the current callback that's running, NULL if no callback //! is currently running. diff --git a/src/fw/kernel/ui/kernel_ui.c b/src/fw/kernel/ui/kernel_ui.c index edafe74e..a4f80906 100644 --- a/src/fw/kernel/ui/kernel_ui.c +++ b/src/fw/kernel/ui/kernel_ui.c @@ -25,14 +25,14 @@ #include "applib/graphics/graphics.h" #include "applib/ui/animation_private.h" -static GContext s_kernel_grahics_context; +static GContext s_kernel_graphics_context; T_STATIC ContentIndicatorsBuffer s_kernel_content_indicators_buffer; static TimelineItemActionSource s_kernel_current_timeline_item_action_source; void kernel_ui_init(void) { - graphics_context_init(&s_kernel_grahics_context, compositor_get_framebuffer(), + graphics_context_init(&s_kernel_graphics_context, compositor_get_framebuffer(), GContextInitializationMode_System); animation_private_state_init(kernel_applib_get_animation_state()); content_indicator_init_buffer(&s_kernel_content_indicators_buffer); @@ -42,7 +42,7 @@ void kernel_ui_init(void) { GContext* kernel_ui_get_graphics_context(void) { PBL_ASSERT_TASK(PebbleTask_KernelMain); - return &s_kernel_grahics_context; + return &s_kernel_graphics_context; } GContext *graphics_context_get_current_context(void) { diff --git a/src/fw/kernel/ui/modals/modal_manager.h b/src/fw/kernel/ui/modals/modal_manager.h index 01071e7f..e40aa840 100644 --- a/src/fw/kernel/ui/modals/modal_manager.h +++ b/src/fw/kernel/ui/modals/modal_manager.h @@ -135,7 +135,7 @@ void modal_manager_handle_button_event(PebbleEvent *event); void modal_manager_pop_all(void); //! Pops all windows from modal stacks with priorities less than the given priority -//! @param the max priorirty stack to pop all windows from +//! @param the max priority stack to pop all windows from void modal_manager_pop_all_below_priority(ModalPriority priority); //! Called from the kernel event loop between events to handle any changes that have been made diff --git a/src/fw/kernel/util/factory_reset.c b/src/fw/kernel/util/factory_reset.c index f01c5257..3f357d22 100644 --- a/src/fw/kernel/util/factory_reset.c +++ b/src/fw/kernel/util/factory_reset.c @@ -120,7 +120,7 @@ void factory_reset_fast(void *unused) { } #endif // !RECOVERY_FW -//! Used by the mfg flow to kick us out the MFG firmware and into the conumer PRF that's stored +//! Used by the mfg flow to kick us out the MFG firmware and into the consumer PRF that's stored //! on the external flash. void command_enter_consumer_mode(void) { boot_bit_set(BOOT_BIT_FORCE_PRF); diff --git a/src/fw/kernel/util/stop.c b/src/fw/kernel/util/stop.c index 688ff90d..ae711e64 100644 --- a/src/fw/kernel/util/stop.c +++ b/src/fw/kernel/util/stop.c @@ -74,7 +74,7 @@ void enter_stop_mode(void) { //PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI); // We don't use ^^ the above function because of a silicon bug which // causes the processor to skip some instructions upon wake from STOP - // in certain sitations. See the STM32F20x and STM32F21x Errata sheet + // in certain situations. See the STM32F20x and STM32F21x Errata sheet // section 2.1.3 "Debugging Stop mode with WFE entry", or the erratum // of the same name in section 2.1.2 of the STM32F42x and STM32F43x // Errata sheet, for (misleading) details. @@ -93,7 +93,7 @@ void enter_stop_mode(void) { temp &= ~PWR_CR_PDDS; temp |= PWR_CR_LPDS; #if STM32F412xG - // STM32F412xG suports a new "low-power regulator low voltage in deep sleep" mode. + // STM32F412xG supports a new "low-power regulator low voltage in deep sleep" mode. temp |= PWR_CR_LPLVDS; #endif PWR->CR = temp; @@ -108,7 +108,7 @@ void enter_stop_mode(void) { do_wfi(); // Wait for Interrupt (enter sleep mode). Work around F2/F4 errata. __ISB(); // Let the pipeline catch up (force the WFI to activate before moving on). - // Tell the processor not to emter deepsleep mode for future WFIs. + // Tell the processor not to enter deepsleep mode for future WFIs. SCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk; // Stop mode will change our system clock to the HSI. Move it back to the PLL. diff --git a/src/fw/mfg/mfg_apps/mfg_flash_test.c b/src/fw/mfg/mfg_apps/mfg_flash_test.c index 8a1a2a87..09065c70 100644 --- a/src/fw/mfg/mfg_apps/mfg_flash_test.c +++ b/src/fw/mfg/mfg_apps/mfg_flash_test.c @@ -581,7 +581,7 @@ static FlashTestErrorType setup_stress_addr_test(void) { return FLASH_TEST_SUCCESS; } -// Run address read/write stess test - if iterations is 0, then stop only when button is pushed; +// Run address read/write stress test - if iterations is 0, then stop only when button is pushed; // else go until iterations hit static FlashTestErrorType prv_run_stress_addr_test(uint32_t iterations) { PBL_LOG(LOG_LEVEL_DEBUG, ">START - STRESS TEST 1"); @@ -593,7 +593,7 @@ static FlashTestErrorType prv_run_stress_addr_test(uint32_t iterations) { uint32_t stress_addr1 = FLASH_TEST_STRESS_ADDR1; uint16_t stress_data1 = FLASH_TEST_STRESS_DATA1; - // Read/Write from adress 2 + // Read/Write from address 2 uint32_t stress_addr2 = FLASH_TEST_STRESS_ADDR2; uint16_t stress_data2 = FLASH_TEST_STRESS_DATA2; diff --git a/src/fw/mfg/mfg_serials.h b/src/fw/mfg/mfg_serials.h index 3380160c..0c03320a 100644 --- a/src/fw/mfg/mfg_serials.h +++ b/src/fw/mfg/mfg_serials.h @@ -50,7 +50,7 @@ typedef enum MfgSerialsResult { //! zero. Must be 13. //! @param[out] out_index Will contain the OTP index that was used to write the //! serial number, if the return value was OtpWriteSuccess. -//! @return OtpWriteSuccess if the write was successfull or +//! @return OtpWriteSuccess if the write was successful or //! MfgSerialsResultFailNoMoreSpace if all 3 slots were taken already, or //! MfgSerialsResultFailIncorrectLength if the serial_size was not 13. MfgSerialsResult mfg_write_serial_number(const char* serial, size_t serial_size, uint8_t *out_index); diff --git a/src/fw/popups/notifications/notification_window.c b/src/fw/popups/notifications/notification_window.c index e0bd47f6..7d8e25b3 100644 --- a/src/fw/popups/notifications/notification_window.c +++ b/src/fw/popups/notifications/notification_window.c @@ -1250,7 +1250,7 @@ void notification_window_add_notification_by_id(Uuid *id) { prv_notification_window_add_notification(id, NotificationMobile); } -//! The animate mode slides the notificaiton in from the top as if it was a new notification. +//! The animate mode slides the notification in from the top as if it was a new notification. void notification_window_focus_notification(Uuid *id, bool animated) { NotificationWindowData *data = &s_notification_window_data; @@ -1289,7 +1289,7 @@ void notification_window_service_init(void) { ////////////////// -// Event Handers +// Event Handlers ////////////////// static void prv_handle_action_result(PebbleSysNotificationActionResult *action_result) { @@ -1358,7 +1358,7 @@ static void prv_handle_notification_added_common(Uuid *id, NotificationType type const bool should_animate = !do_not_disturb_is_active(); notification_window_focus_notification(id, should_animate); } else { - // If we are inserting into the middle of this list, just reaload the swap layer so the + // If we are inserting into the middle of this list, just reload the swap layer so the // number of notifications displayed is correct prv_reload_swap_layer(data); } diff --git a/src/fw/popups/notifications/notifications_presented_list.h b/src/fw/popups/notifications/notifications_presented_list.h index d21a3c88..b8c65eae 100644 --- a/src/fw/popups/notifications/notifications_presented_list.h +++ b/src/fw/popups/notifications/notifications_presented_list.h @@ -74,7 +74,7 @@ void notifications_presented_list_init(void); typedef void (*NotificationListEachCallback)(Uuid *id, NotificationType type, void *cb_data); -//! Executes the specified callback for each notificaiton in the presented list +//! Executes the specified callback for each notification in the presented list //! @param callback If null this function is a no-op void notifications_presented_list_each(NotificationListEachCallback callback, void *cb_data); diff --git a/src/fw/popups/phone_ui.c b/src/fw/popups/phone_ui.c index c1bec957..ffce8dc3 100644 --- a/src/fw/popups/phone_ui.c +++ b/src/fw/popups/phone_ui.c @@ -803,7 +803,7 @@ static const char *prv_get_app_id(const char *number, PhoneCallSource source) { return NULL; } -// Checks for the existance of a call reply action in the notif pref db and loads it into +// Checks for the existence of a call reply action in the notif pref db and loads it into // a timeline item static bool prv_load_sms_reply_action(const char *number, PhoneCallSource source) { const char *app_id = prv_get_app_id(number, source); @@ -982,7 +982,7 @@ static void prv_window_pop(void) { // The window_stack_remove() call should run the unload handler (which deinits the ui), // but in the rare case that the window never loaded (i.e. a higher priority modal was up) // then we could leak the phone_ui data and assert on the next phone call. - // Deinit again to cover this case (will be a no-op) if the window was alredy deinited. + // Deinit again to cover this case (will be a no-op) if the window was already deinited. prv_phone_ui_deinit(); } diff --git a/src/fw/popups/wakeup_ui.h b/src/fw/popups/wakeup_ui.h index d81f93b2..1f0a8108 100644 --- a/src/fw/popups/wakeup_ui.h +++ b/src/fw/popups/wakeup_ui.h @@ -20,7 +20,7 @@ #include "process_management/app_install_types.h" -//! This function creates a popup window displaying a missed wakeup events notificatoin +//! This function creates a popup window displaying a missed wakeup events notification //! along with the application names that were missed //! Note: missed_apps_ids is free'd by this function //! @param missed_apps_count number of app names to display diff --git a/src/fw/process_management/app_install_manager.h b/src/fw/process_management/app_install_manager.h index a1c312fb..85cf9c12 100644 --- a/src/fw/process_management/app_install_manager.h +++ b/src/fw/process_management/app_install_manager.h @@ -51,7 +51,7 @@ //! have no knowledge of AppInstallId's. //! //! - PebbleProcessMd: This should only be used when launching an application. No piece of code -//! should ask the app_install_manager for a PebbleProcessMd unlesss it plans on +//! should ask the app_install_manager for a PebbleProcessMd unless it plans on //! assisting with the launch of the application (event_loop, app_manager, etc.) //! //! How applications are stored diff --git a/src/fw/process_management/app_install_manager_known_apps.h b/src/fw/process_management/app_install_manager_known_apps.h index 93b4aea4..2536a158 100644 --- a/src/fw/process_management/app_install_manager_known_apps.h +++ b/src/fw/process_management/app_install_manager_known_apps.h @@ -49,7 +49,7 @@ {.uuid = {0x4d, 0x6e, 0xa3, 0xee, 0x0f, 0x2a, 0x4c, 0x33, 0xb0, 0x42, 0xe2, 0xe5, 0x6c, 0xe8, 0x0c, 0xd4}, .color_argb = GColorPurpleARGB8}, // Yo {.uuid = {0x93, 0x6a, 0x77, 0x26, 0x4c, 0x8f, 0x41, 0x67, 0x8c, 0x25, 0x46, 0x68, 0x36, 0x82, 0xb0, 0x6e}, .color_argb = GColorDarkGrayARGB8}, // Pebtris {.uuid = {0x22, 0xe5, 0x53, 0x87, 0x92, 0x3b, 0x41, 0x9f, 0xae, 0x03, 0xad, 0x09, 0xff, 0x7e, 0xa2, 0x95}, .color_argb = GColorMelonARGB8}, // Calendar -{.uuid = {0x86, 0x5a, 0xd5, 0x5a, 0xe0, 0x18, 0x40, 0x70, 0x97, 0x07, 0x98, 0x22, 0x5b, 0x5a, 0x6a, 0x34}, .color_argb = GColorLightGrayARGB8}, // Asteriod +{.uuid = {0x86, 0x5a, 0xd5, 0x5a, 0xe0, 0x18, 0x40, 0x70, 0x97, 0x07, 0x98, 0x22, 0x5b, 0x5a, 0x6a, 0x34}, .color_argb = GColorLightGrayARGB8}, // Asteroid {.uuid = {0x7f, 0xb1, 0xc6, 0x61, 0x04, 0x50, 0x40, 0x92, 0xb4, 0x13, 0x5c, 0xc8, 0x40, 0xfa, 0x09, 0x45}, .color_argb = GColorBlackARGB8}, // 3 Calendar {.uuid = {0x4c, 0x9b, 0x88, 0x5b, 0x40, 0x0d, 0x4f, 0x1c, 0x8e, 0x99, 0x4d, 0x38, 0xa1, 0xb7, 0x96, 0xb4}, .color_argb = GColorBlackARGB8}, // GoPro {.uuid = {0x5c, 0xc7, 0xeb, 0xd1, 0xea, 0x97, 0x49, 0x4c, 0xae, 0x7c, 0xec, 0xd0, 0x5d, 0xd3, 0x3a, 0x5a}, .color_argb = GColorRedARGB8}, // Email to SMS diff --git a/src/fw/process_management/app_manager.c b/src/fw/process_management/app_manager.c index dd1da3f8..e2779330 100644 --- a/src/fw/process_management/app_manager.c +++ b/src/fw/process_management/app_manager.c @@ -214,7 +214,7 @@ static size_t prv_get_app_segment_size(const PebbleProcessMd *app_md) { #if CAPABILITY_HAS_JAVASCRIPT if (app_md->is_rocky_app) { // on Spalding, we didn't have enough applib padding to guarantee both, - // 4.x native app heap + JerryScript statis + increased stack for Rocky. + // 4.x native app heap + JerryScript status + increased stack for Rocky. // For now, we just decrease the amount of available heap as we don't use it. // In the future, we will move the JS stack to the heap PBL-35783, // make byte code swappable PBL-37937,and remove JerryScript's static PBL-40400. @@ -540,7 +540,7 @@ static void prv_app_show_crash_ui(AppInstallId install_id) { //! Switch to the app stored in the s_next_app global. The gracefully flag tells us whether to attempt a graceful //! exit or not. //! -//! For a graceful exit, if the app has not alreeady finished it's de-init, we post a de_init event to the app, set +//! For a graceful exit, if the app has not already finished it's de-init, we post a de_init event to the app, set //! a 3 second timer, and return immediately to the caller. If/when the app finally finishes deinit, it will post a //! PEBBLE_PROCESS_KILL_EVENT (graceful=true), which results in this method being again with graceful=true. We will then //! see that the de_init already finished in that second invocation. diff --git a/src/fw/process_management/app_menu_data_source.h b/src/fw/process_management/app_menu_data_source.h index e0944e43..8920a7eb 100644 --- a/src/fw/process_management/app_menu_data_source.h +++ b/src/fw/process_management/app_menu_data_source.h @@ -93,12 +93,12 @@ typedef struct AppMenuDataSource { bool is_list_loaded; } AppMenuDataSource; -//! Initalize the AppMenuDataSource +//! Initialize the AppMenuDataSource void app_menu_data_source_init(AppMenuDataSource *source, const AppMenuDataSourceCallbacks *handlers, void *callback_context); -//! Deinitalize the AppMenuDataSource +//! Deinitialize the AppMenuDataSource void app_menu_data_source_deinit(AppMenuDataSource *source); //! Will load the icons for each `AppMenuNode`. Will automatically be unloaded when diff --git a/src/fw/process_management/app_run_state.c b/src/fw/process_management/app_run_state.c index 199387b9..0362a12a 100644 --- a/src/fw/process_management/app_run_state.c +++ b/src/fw/process_management/app_run_state.c @@ -90,7 +90,7 @@ void app_run_state_command(CommSession *session, AppRunStateCommand cmd, const U // Determine the running application uuid = &app_manager_get_current_app_md()->uuid; if (session != NULL) { - // We check the session here as to be backwards compatibile with the 0x31 endpoint and + // We check the session here as to be backwards compatible with the 0x31 endpoint and // to avoid repeating code, the endpoint makes use of this function, but since it does // not have an active session (it's session is NULL), it will fall to the else case. AppRunState *app_run_state = kernel_malloc_check(sizeof(AppRunState)); diff --git a/src/fw/process_management/launcher_app_message.h b/src/fw/process_management/launcher_app_message.h index 08741d8d..62dc5123 100644 --- a/src/fw/process_management/launcher_app_message.h +++ b/src/fw/process_management/launcher_app_message.h @@ -21,6 +21,6 @@ //! Launcher App Message is deprecated and on Android >= 2.3 and other devices that pass the //! support flags for the AppRunState endpoint will use that endpoint (0x34) instead. That //! endpoint should be used for sending messages on start/stop status of applications and -//! sending/recieving application states. The LauncherAppMessage endpoint is kept for -//! backwards compability with older mobile applications. +//! sending/receiving application states. The LauncherAppMessage endpoint is kept for +//! backwards compatibility with older mobile applications. void launcher_app_message_send_app_state_deprecated(const Uuid *uuid, bool running); diff --git a/src/fw/process_management/pebble_process_info.h b/src/fw/process_management/pebble_process_info.h index 18f586af..3c498288 100644 --- a/src/fw/process_management/pebble_process_info.h +++ b/src/fw/process_management/pebble_process_info.h @@ -38,7 +38,7 @@ typedef enum { //! Use to hide the process, unless there is ongoing communication with //! the companion smartphone application. PROCESS_INFO_VISIBILITY_SHOWN_ON_COMMUNICATION = 1 << 2, - //! Use to indicate the process allows Javascript API access + //! Use to indicate the process allows JavaScript API access PROCESS_INFO_ALLOW_JS = 1 << 3, //! Use to indicate the process should have a worker.bin installed as well. PROCESS_INFO_HAS_WORKER = 1 << 4, @@ -199,7 +199,7 @@ int version_compare(Version a, Version b); // - tintin/waftools/inject_metadata.py // - iOS/PebblePrivateKit/PebblePrivateKit/PBBundle.m typedef struct __attribute__((__packed__)) { - char header[8]; //!< Sentinal value, should always be 'PBLAPP' + char header[8]; //!< Sentinel value, should always be 'PBLAPP' Version struct_version; //!< version of this structure's format Version sdk_version; //!< version of the SDK used to build this process Version process_version; //!< version of the process @@ -237,7 +237,7 @@ typedef struct __attribute__((__packed__)) { //! @internal typedef struct __attribute__((__packed__)) { - char header[8]; //!< Sentinal value, should always be 'PBLAPP' + char header[8]; //!< Sentinel value, should always be 'PBLAPP' Version struct_version; //!< version of this structure's format Version sdk_version; //!< version of the SDK used to build this process Version process_version; //!< version of the process diff --git a/src/fw/process_management/pebble_process_md.h b/src/fw/process_management/pebble_process_md.h index a6b094d1..342ab55a 100644 --- a/src/fw/process_management/pebble_process_md.h +++ b/src/fw/process_management/pebble_process_md.h @@ -64,7 +64,7 @@ typedef enum { //! This structure is used internally to describe the process. This struct here is actually a polymorphic base //! class, and can be casted to either \ref PebbleProcessMdSystem or \ref PebbleProcessMdFlash depending on the value //! of \ref is_flash_based. Clients shouldn't do this casting themselves though, and instead should use the -//! process_metadata_get_* functions to safely retreive values from this struct. +//! process_metadata_get_* functions to safely retrieve values from this struct. typedef struct PebbleProcessMd { Uuid uuid; @@ -84,7 +84,7 @@ typedef struct PebbleProcessMd { //! Can this process call kernel functionality directly or does it need to go through syscalls? bool is_unprivileged; - //! Allow Javascript applications to access this process + //! Allow JavaScript applications to access this process bool allow_js; //! This process has a sister worker process in flash. diff --git a/src/fw/process_management/process_manager.c b/src/fw/process_management/process_manager.c index ee361887..6d04f6ab 100644 --- a/src/fw/process_management/process_manager.c +++ b/src/fw/process_management/process_manager.c @@ -101,7 +101,7 @@ static bool prv_force_stop_task_if_unprivileged(ProcessContext *context) { uint32_t control_reg = ulTaskDebugGetStackedControl((TaskHandle_t) context->task_handle); if ((control_reg & 0x1) == 0) { - // We're priviledged, it's not safe to just kill the app task. + // We're privileged, it's not safe to just kill the app task. vTaskResume((TaskHandle_t) context->task_handle); return false; } @@ -391,7 +391,7 @@ static void prv_handle_app_stop_analytics(const ProcessContext *const context, //! this time it will see the safe to kill is set and return true //! //! If the task does not exit by itself before the timer expires, then the timer will post another KILL event -//! with graceful set to false. This will result in this method being alled again with gracefully = false. When +//! with graceful set to false. This will result in this method being called again with gracefully = false. When //! we see this, we just try and make sure the app is not stuck in privilege code. If it's not, we return true //! and allow the caller to kill the task. //! @@ -519,7 +519,7 @@ void process_manager_process_setup(PebbleTask task) { // --------------------------------------------------------------------------------------------- -//! Kills the process, giving it no chance to clean things up or exit gracefully. The proces must already be in a +//! Kills the process, giving it no chance to clean things up or exit gracefully. The process must already be in a //! state where it's safe to exit, so the caller must call process_manager_make_process_safe_to_kill() first and only //! call this method if process_manager_make_process_safe_to_kill() returns true; void process_manager_process_cleanup(PebbleTask task) { @@ -530,7 +530,7 @@ void process_manager_process_cleanup(PebbleTask task) { PBL_LOG(LOG_LEVEL_DEBUG, "%s is getting cleaned up", pebble_task_get_name(task)); - // Shutdown services that may be running. Do this before we destory the task and clear the queue + // Shutdown services that may be running. Do this before we destroy the task and clear the queue // just in case other services are still in flight. accel_service_cleanup_task_session(task); animation_service_cleanup(task); @@ -575,7 +575,7 @@ void process_manager_process_cleanup(PebbleTask task) { if (context->to_process_event_queue && pdFAIL == event_queue_cleanup_and_reset(context->to_process_event_queue)) { - PBL_LOG(LOG_LEVEL_ERROR, "The to processs queue could not be reset!"); + PBL_LOG(LOG_LEVEL_ERROR, "The to process queue could not be reset!"); } context->to_process_event_queue = NULL; } diff --git a/src/fw/process_management/process_manager.h b/src/fw/process_management/process_manager.h index 92eb4a83..9fa2cbfa 100644 --- a/src/fw/process_management/process_manager.h +++ b/src/fw/process_management/process_manager.h @@ -118,7 +118,7 @@ bool process_manager_check_SDK_compatible(const AppInstallId id); //! @param id The app to launch. Note that this app may not be cached //! @param args The args to the app //! @param animation The animation that should be used to show the app -//! @prama launch_reason The launch reason for the app starting +//! @param launch_reason The launch reason for the app starting void process_manager_launch_process(const ProcessLaunchConfig *config); //! Close the given process. This is the highest level call which transfers control to the manager of that type of diff --git a/src/fw/process_management/sdk_version.h b/src/fw/process_management/sdk_version.h index 824c2420..a9b924b6 100644 --- a/src/fw/process_management/sdk_version.h +++ b/src/fw/process_management/sdk_version.h @@ -18,7 +18,7 @@ #include "pebble_process_info.h" #include -//! Inspects the app metatdata whether the app supports app messaging. +//! Inspects the app metadata whether the app supports app messaging. //! Only if this returns true, the .messaging_info field of PebbleAppHandlers can be used. //! @return true if the app is built with an SDK that supports app messaging or not bool sdk_version_is_app_messaging_supported(const Version * const sdk_version); diff --git a/src/fw/resource/resource_storage_impl.h b/src/fw/resource/resource_storage_impl.h index 60706d16..8dc2306c 100644 --- a/src/fw/resource/resource_storage_impl.h +++ b/src/fw/resource/resource_storage_impl.h @@ -23,7 +23,7 @@ //! @file resource_storage_impl.h //! -//! Shared functionality that all the different ResourceStoreImplemention's need. +//! Shared functionality that all the different ResourceStoreImplementation's need. // TODO PBL-21382: Abstract these details out of the resource storage implementation. diff --git a/src/fw/services/common/accel_manager.c b/src/fw/services/common/accel_manager.c index 8a4bfaf6..2d18cf5b 100644 --- a/src/fw/services/common/accel_manager.c +++ b/src/fw/services/common/accel_manager.c @@ -171,7 +171,7 @@ static void prv_double_tap_remove_subscriber_cb(PebbleTask task) { //! 200ms, and subscriber B at 250ms, new samples will become available every //! 200ms, so subscriber B's data buffer would not fill until 400ms, resulting //! in a 150ms latency. This is how the legacy implementation worked as well -//! but is potentionally something we could improve in the future if it becomes +//! but is potentially something we could improve in the future if it becomes //! a problem. static uint32_t prv_get_sample_interval_info(uint32_t *lowest_interval_us, uint32_t *max_n_samples) { diff --git a/src/fw/services/common/analytics/analytics_event.h b/src/fw/services/common/analytics/analytics_event.h index a6d56211..f9fa9c59 100644 --- a/src/fw/services/common/analytics/analytics_event.h +++ b/src/fw/services/common/analytics/analytics_event.h @@ -45,8 +45,8 @@ typedef enum { AnalyticsEvent_AppLaunch, AnalyticsEvent_PinOpen, AnalyticsEvent_PinAction, - AnalyticsEvent_CannedReponseSent, - AnalyticsEvent_CannedReponseFailed, + AnalyticsEvent_CannedResponseSent, + AnalyticsEvent_CannedResponseFailed, AnalyticsEvent_VoiceTranscriptionAccepted, AnalyticsEvent_VoiceTranscriptionRejected, AnalyticsEvent_PinAppLaunch, @@ -258,7 +258,7 @@ typedef enum VibePatternFeature { typedef struct PACKED { uint8_t feature; uint8_t vibe_pattern_id; -} AnalyticsEvent_VibeAcessData; +} AnalyticsEvent_VibeAccessData; typedef struct PACKED { uint16_t activity_type; // activity type, one of ActivitySessionType @@ -330,7 +330,7 @@ typedef struct PACKED { AnalyticsEvent_HealthInsightCreatedData health_insight_created; AnalyticsEvent_HealthInsightResponseData health_insight_response; AnalyticsEvent_AppCrashData app_crash_report; - AnalyticsEvent_VibeAcessData vibe_access_data; + AnalyticsEvent_VibeAccessData vibe_access_data; AnalyticsEvent_HealthActivitySessionData health_activity_session; AnalyticsEventPebbleProtocolCommonSessionClose pp_common_session_close; AnalyticsEventPebbleProtocolSystemSessionClose pp_system_session_close; @@ -469,7 +469,7 @@ void analytics_event_health_insight_response(time_t timestamp, ActivityInsightTy ActivitySessionType activity_type, ActivityInsightResponseType response_id); -//! Tracks duration of time it takes to recieve byte transfers over putbytes +//! Tracks duration of time it takes to receive byte transfers over putbytes //! and statistics on the type of transfer and whether the data stored was valid //! @param session the session used to transfer the data //! @param crc_good whether or not the CRC for the blob transferred is valid diff --git a/src/fw/services/common/animation_service.h b/src/fw/services/common/animation_service.h index 6dfab1f0..77012b79 100644 --- a/src/fw/services/common/animation_service.h +++ b/src/fw/services/common/animation_service.h @@ -30,6 +30,6 @@ void animation_service_timer_schedule(uint32_t ms); //! Acknowledge that we received an event sent by the animation timer void animation_service_timer_event_received(void); -//! Destroy the animation resoures used by the given task. Called by the process_manager when a +//! Destroy the animation resources used by the given task. Called by the process_manager when a // process exits void animation_service_cleanup(PebbleTask task); diff --git a/src/fw/services/common/battery/battery_state.c b/src/fw/services/common/battery/battery_state.c index 4268c939..1c0dce46 100644 --- a/src/fw/services/common/battery/battery_state.c +++ b/src/fw/services/common/battery/battery_state.c @@ -122,7 +122,7 @@ static void battery_state_put_change_event(PreciseBatteryChargeState state) { void battery_state_reset_filter(void) { s_last_battery_state.voltage = battery_get_millivolts(); - // Reset the stablization timer in case we encountered a current spike during the reset + // Reset the stabilization timer in case we encountered a current spike during the reset s_last_battery_state.init_time = rtc_get_ticks(); } @@ -213,7 +213,7 @@ static void prv_update_state(void *force_update) { // - We are charging // - We are discharging and: // - The readings have stabilized and the battery percent did not go up - // - The readings have not yet stablized + // - The readings have not yet stabilized // TL;DR: Allow updates unless we're stable and discharging but the % went up. if (!charging && likely_stable && new_charge_percent > s_last_battery_state.percent) { diff --git a/src/fw/services/common/battery/battery_state.h b/src/fw/services/common/battery/battery_state.h index 38a4eea6..3c9a3afb 100644 --- a/src/fw/services/common/battery/battery_state.h +++ b/src/fw/services/common/battery/battery_state.h @@ -50,7 +50,7 @@ typedef struct { //! The battery's percentage as a ratio32 uint32_t charge_percent; //! WARNING: This maps to @see battery_charge_controller_thinks_we_are_charging as opposed to - //! the user-facing defintion of whether we're charging (100% battery). + //! the user-facing definition of whether we're charging (100% battery). bool is_charging; bool is_plugged; } PreciseBatteryChargeState; diff --git a/src/fw/services/common/bluetooth/bluetooth_ctl.h b/src/fw/services/common/bluetooth/bluetooth_ctl.h index eb2a041b..d56676af 100644 --- a/src/fw/services/common/bluetooth/bluetooth_ctl.h +++ b/src/fw/services/common/bluetooth/bluetooth_ctl.h @@ -48,5 +48,5 @@ void bt_ctl_set_enabled(bool enabled); //! Sets the override mode used to stop and start the bluetooth independent of the airplane mode. void bt_ctl_set_override_mode(BtCtlModeOverride override); -//! Reset bluetoosh using sequential calls to comm_stop() and comm_start() +//! Reset bluetooth using sequential calls to comm_stop() and comm_start() void bt_ctl_reset_bluetooth(void); diff --git a/src/fw/services/common/bluetooth/bluetooth_persistent_storage.h b/src/fw/services/common/bluetooth/bluetooth_persistent_storage.h index 981bc968..443c085f 100644 --- a/src/fw/services/common/bluetooth/bluetooth_persistent_storage.h +++ b/src/fw/services/common/bluetooth/bluetooth_persistent_storage.h @@ -93,7 +93,7 @@ bool bt_persistent_storage_has_ble_ancs_bonding(void); bool bt_persistent_storage_has_active_ble_gateway_bonding(void); //! Runs the callback for each BLE pairing -//! The callback is NOT allowed to aquire the bt_lock() (or we could deadlock). +//! The callback is NOT allowed to acquire the bt_lock() (or we could deadlock). void bt_persistent_storage_for_each_ble_pairing(BtPersistBondingDBEachBLE cb, void *context); //! Registers all the existing BLE bondings with the BT driver lib. @@ -125,7 +125,7 @@ BTBondingID bt_persistent_storage_get_bt_classic_pairing_by_addr(BTDeviceAddress bool bt_persistent_storage_has_active_bt_classic_gateway_bonding(void); //! Runs the callback for each BT Classic pairing -//! The callback is NOT allowed to aquire the bt_lock() (or we could deadlock). +//! The callback is NOT allowed to acquire the bt_lock() (or we could deadlock). void bt_persistent_storage_for_each_bt_classic_pairing(BtPersistBondingDBEachBTClassic cb, void *context); diff --git a/src/fw/services/common/bluetooth/pairability.c b/src/fw/services/common/bluetooth/pairability.c index 81750791..eba3dc14 100644 --- a/src/fw/services/common/bluetooth/pairability.c +++ b/src/fw/services/common/bluetooth/pairability.c @@ -47,7 +47,7 @@ static void evaluate_pairing_refcount(void *data) { return; } - PBL_LOG(LOG_LEVEL_DEBUG, "Pairabilty state: LE=%u, Classic=%u", + PBL_LOG(LOG_LEVEL_DEBUG, "Pairability state: LE=%u, Classic=%u", s_allow_ble_pairing_refcount, s_allow_bt_pairing_refcount); bool is_ble_pairable_and_discoverable = (s_allow_ble_pairing_refcount > 0); diff --git a/src/fw/services/common/clock.c b/src/fw/services/common/clock.c index 4241aafc..2feaade8 100644 --- a/src/fw/services/common/clock.c +++ b/src/fw/services/common/clock.c @@ -246,7 +246,7 @@ static TimezoneInfo prv_get_timezone_info_from_data(TimezoneCBData *tz_data) { return tz_info; } - // Else, we couldn't find find the specified timezone. + // Else, we couldn't find the specified timezone. #ifndef RECOVERY_FW TimezoneInfo tz_info = { .dst_id = 0, diff --git a/src/fw/services/common/comm_session/session.h b/src/fw/services/common/comm_session/session.h index 52fd0e36..c54ac057 100644 --- a/src/fw/services/common/comm_session/session.h +++ b/src/fw/services/common/comm_session/session.h @@ -75,7 +75,7 @@ CommSessionCapability comm_session_get_capabilities(CommSession *session); //! @note It is possible that the session becomes disconnected at any point in time. CommSession *comm_session_get_system_session(void); -//! @return a reference to the the third party app communication session for the *currently running* +//! @return a reference to the third party app communication session for the *currently running* //! watch app, or NULL if the session does not exist (is not connected). //! @note It is possible that the session becomes disconnected at any point in time. CommSession *comm_session_get_current_app_session(void); diff --git a/src/fw/services/common/comm_session/session_send_buffer.h b/src/fw/services/common/comm_session/session_send_buffer.h index 9e017ac7..8f1f4db7 100644 --- a/src/fw/services/common/comm_session/session_send_buffer.h +++ b/src/fw/services/common/comm_session/session_send_buffer.h @@ -34,11 +34,11 @@ size_t comm_session_send_buffer_get_max_payload_length(const CommSession *sessio //! is fine if bt_lock() is held. //! @param session The session to which the message should be sent. //! @param endpoint_id The Pebble Protocol endpoint ID to send the message to. -//! @param required_free_length The number of bytes of free space the caller needs at minumum. Once +//! @param required_free_length The number of bytes of free space the caller needs at minimum. Once //! the function returns with `true`, the amount of space (or more) is guaranteed to be available. //! @param timeout_ms The maximum duration to wait for the send buffer to become available with the //! required number of bytes of free space. -//! @return True if the "writer access" was sucessfully acquired, false otherwise. +//! @return True if the "writer access" was successfully acquired, false otherwise. SendBuffer * comm_session_send_buffer_begin_write(CommSession *session, uint16_t endpoint_id, size_t required_free_length, uint32_t timeout_ms); diff --git a/src/fw/services/common/comm_session/session_send_queue.c b/src/fw/services/common/comm_session/session_send_queue.c index 7c0903ba..549ef40c 100644 --- a/src/fw/services/common/comm_session/session_send_queue.c +++ b/src/fw/services/common/comm_session/session_send_queue.c @@ -107,7 +107,7 @@ size_t comm_session_send_queue_get_read_pointer(const CommSession *session, } void comm_session_send_queue_consume(CommSession *session, size_t remaining_length) { - // The data has sucessfully been sent out at this point + // The data has successfully been sent out at this point comm_session_analytics_inc_bytes_sent(session, remaining_length); PBL_ASSERTN(session->send_queue_head); diff --git a/src/fw/services/common/compositor/compositor.h b/src/fw/services/common/compositor/compositor.h index 88769b43..4e5385a8 100644 --- a/src/fw/services/common/compositor/compositor.h +++ b/src/fw/services/common/compositor/compositor.h @@ -127,7 +127,7 @@ void compositor_set_modal_transition_offset(GPoint modal_offset); //! Stops an existing transition in its tracks. void compositor_transition_cancel(void); -//! Don't allow new frames to be pushed to the compostor from either the app or the modal. +//! Don't allow new frames to be pushed to the compositor from either the app or the modal. void compositor_freeze(void); //! Resuming allowing new frames to be pushed to the compositor, undoes the effects of diff --git a/src/fw/services/common/ecompass.c b/src/fw/services/common/ecompass.c index 5455cd6f..f2c47334 100644 --- a/src/fw/services/common/ecompass.c +++ b/src/fw/services/common/ecompass.c @@ -161,7 +161,7 @@ static int32_t prv_correct_for_roll_and_pitch(AccelRawData *accel_data, int32_t mx_rot, my_rot; - // per freescale AN4249, roll is unstable close to verticle but pitch is ok + // per freescale AN4249, roll is unstable close to vertical but pitch is ok int32_t corr = 0; if (TRIGANGLE_TO_DEG(pitch) > 82) { pitch = TRIG_MAX_ANGLE / 4; diff --git a/src/fw/services/common/ecompass_correction.c b/src/fw/services/common/ecompass_correction.c index 88f5e79a..fac9e4dd 100644 --- a/src/fw/services/common/ecompass_correction.c +++ b/src/fw/services/common/ecompass_correction.c @@ -192,7 +192,7 @@ cleanup: // Conceptually, it makes sense that the farther points are from one another (> // t), the less that errors due to noise, fixed point mathematics, & motion // render bad solutions. (empirically, this seems to be the behavior as -// well). However, the greater the the threshold, the more orientations one +// well). However, the greater the threshold, the more orientations one // must put their watch through in order to get solution sets // // For now, select a distance metric that should work out of the box for a diff --git a/src/fw/services/common/hrm/hrm_manager.c b/src/fw/services/common/hrm/hrm_manager.c index 291392cf..3a9b1c8b 100644 --- a/src/fw/services/common/hrm/hrm_manager.c +++ b/src/fw/services/common/hrm/hrm_manager.c @@ -183,7 +183,7 @@ static void prv_handle_accel_data(void * data) { // be ignored. We ignore any reading where the BPM is below HRM_SENSOR_MIN_VALID_BPM_READING. // 3.) Once the quality is "Good", we have to ignore all other quality readings (except off-wrist) // because they don't mean anything in this version of the sensor FW. -// 4.) If we suddently go "off-wrist", wait for another "Good" or better. +// 4.) If we suddenly go "off-wrist", wait for another "Good" or better. // // So, for the first 0 to HRM_SENSOR_SPIN_UP_SEC seconds after turning the sensor on or first // contacting the wrist after being off-wrist, the readings can be unstable and this method will @@ -237,9 +237,9 @@ static bool prv_is_sensor_stable(const HRMData *data) { s_manager_state.off_wrist_when_stable = false; } else { // We haven't yet received a good reading yet. Wait for a timeout... - RtcTicks elapased_ticks = rtc_get_ticks() - s_manager_state.sensor_start_ticks; + RtcTicks elapsed_ticks = rtc_get_ticks() - s_manager_state.sensor_start_ticks; RtcTicks max_startup_time = milliseconds_to_ticks(HRM_SENSOR_SPIN_UP_SEC * MS_PER_SECOND); - if (elapased_ticks >= max_startup_time) { + if (elapsed_ticks >= max_startup_time) { // If it's been past the tolerable startup time, we have a valid reading - even though it // may indicate off-wrist. s_manager_state.sensor_stable = true; diff --git a/src/fw/services/common/hrm/hrm_manager.h b/src/fw/services/common/hrm/hrm_manager.h index ae6385fa..667b785c 100644 --- a/src/fw/services/common/hrm/hrm_manager.h +++ b/src/fw/services/common/hrm/hrm_manager.h @@ -90,7 +90,7 @@ void hrm_manager_handle_prefs_changed(void); //! This should not be used by KernelBG or KernelMain clients. For KernelBG client subscriptions, //! please see \ref hrm_manager_subscribe_with_callback. KernelMain clients are not yet supported. //! If the app/worker is already subscribed, this will update the subscription based on the passed -//! in arguments and return the pre-existing HRMSessionRef. +//! in arguments and return the preexisting HRMSessionRef. //! @param app_id the application's AppInstallId //! @param update_interval_s requested update interval //! @param expire_s after this many seconds, this subscription will automatically expire @@ -99,7 +99,7 @@ void hrm_manager_handle_prefs_changed(void); HRMSessionRef sys_hrm_manager_app_subscribe(AppInstallId app_id, uint32_t update_interval_s, uint16_t expire_s, HRMFeature features); -//! Return the HRMSessionRef for an app or worker subscription, if it exists. This call can not +//! Return the HRMSessionRef for an app or worker subscription, if it exists. This call cannot //! be used for KernelBG subscriptions //! @param app_id the application's AppInstallId //! @return the HRMSessionRef for this subscription, or NULL if no subscription exists @@ -128,8 +128,8 @@ bool sys_hrm_manager_set_update_interval(HRMSessionRef session, uint32_t update_ //! @param[in] session the HRMSessionRef returned by sys_hrm_manager_app_subscribe //! @param[out] app_id if not NULL, the app_id belonging to this subscription is returned here //! @param[out] update_interval_s if not NULL, the requested update interval is returned here -//! @param[out] expire_s if not NULL, the number of seconds that this subcription will expire in -//! @return true if succss, false if subscription was not found +//! @param[out] expire_s if not NULL, the number of seconds that this subscription will expire in +//! @return true if success, false if subscription was not found bool sys_hrm_manager_get_subscription_info(HRMSessionRef session, AppInstallId *app_id, uint32_t *update_interval_s, uint16_t *expire_s, HRMFeature *features); diff --git a/src/fw/services/common/hrm/hrm_manager_private.h b/src/fw/services/common/hrm/hrm_manager_private.h index 7eb17c4d..1e4a67d1 100644 --- a/src/fw/services/common/hrm/hrm_manager_private.h +++ b/src/fw/services/common/hrm/hrm_manager_private.h @@ -98,7 +98,7 @@ struct HRMManagerState { // These variables used to keep track of the sensor reading validity. bool sensor_stable; // True after we receive the first good reading after power-on or off-wrist - bool off_wrist_when_stable; // true if sensor said off-wrist when first stablized + bool off_wrist_when_stable; // true if sensor said off-wrist when first stabilized RtcTicks sensor_start_ticks; // tick count last time sensor was powered on, or last // off-wrist. 0 if still off-wrist or off. }; diff --git a/src/fw/services/common/legacy/factory_registry.h b/src/fw/services/common/legacy/factory_registry.h index 219f9c28..41633b47 100644 --- a/src/fw/services/common/legacy/factory_registry.h +++ b/src/fw/services/common/legacy/factory_registry.h @@ -39,7 +39,7 @@ Record* factory_registry_get(const char* key, const uint8_t key_length, const ui //! Remove a record from the factory settings registry //! -//! @return 0 on sucess, -1 if record not found +//! @return 0 on success, -1 if record not found int factory_registry_remove(const char* key, const uint8_t key_length, const uint8_t* uuid); //! Write the factory settings registry to flash diff --git a/src/fw/services/common/legacy/registry_private.c b/src/fw/services/common/legacy/registry_private.c index 671099c5..7668f0bd 100644 --- a/src/fw/services/common/legacy/registry_private.c +++ b/src/fw/services/common/legacy/registry_private.c @@ -327,7 +327,7 @@ void registry_private_init(Registry* registry) { // active registry can be found when `registry_init()` is called, an empty registry // is written. // - // The flash cursor starts at the begining of the registry's SPIFlash + // The flash cursor starts at the beginning of the registry's SPIFlash // address (`REGISTRY_FLASH_BEGIN`), and is incremented to the next completely // empty subsector every time the registry is written to flash. memset(registry->records, 0, registry->registry_size_bytes); diff --git a/src/fw/services/common/new_timer/new_timer.h b/src/fw/services/common/new_timer/new_timer.h index 8c706f23..b3d65fc9 100644 --- a/src/fw/services/common/new_timer/new_timer.h +++ b/src/fw/services/common/new_timer/new_timer.h @@ -30,7 +30,7 @@ //! callback to send an event to another thread with evented_timer.h. In the future these other //! threads will probably use their own TaskTimerManager instances instead and this thread will //! will get a whole lot less busy and reserved for only high priority work. At that time this -//! thread will probably get renamed something like KernelHighPriortity. +//! thread will probably get renamed something like KernelHighPriority. typedef void (*NewTimerCallback)(void *data); diff --git a/src/fw/services/common/phone_pp.h b/src/fw/services/common/phone_pp.h index 1f920727..1ae63aff 100644 --- a/src/fw/services/common/phone_pp.h +++ b/src/fw/services/common/phone_pp.h @@ -27,6 +27,6 @@ void pp_decline_call(uint32_t cookie); void pp_get_phone_state(void); //! Enables or disables handling the Get Phone State responses. -//! This is part of a work-around to ignore for stray requests that can be in flight after the phone +//! This is part of a workaround to ignore for stray requests that can be in flight after the phone //! call has been declined by the user from the Pebble. void pp_get_phone_state_set_enabled(bool enabled); diff --git a/src/fw/services/common/poll_remote.c b/src/fw/services/common/poll_remote.c index 3f9a708a..966f1340 100644 --- a/src/fw/services/common/poll_remote.c +++ b/src/fw/services/common/poll_remote.c @@ -110,7 +110,7 @@ static void prv_send_request(PollRemoteContext *ctx) { return; } // [MT]: comm_session_send_data() doesn't make the link active, - // which is what we want here. If this this changes in the future + // which is what we want here. If this changes in the future // we need to take measures here to make sure we don't pull the link active. const PollRemoteMessage msg = { .cmd = CMD_POLL, diff --git a/src/fw/services/common/put_bytes/put_bytes_storage.c b/src/fw/services/common/put_bytes/put_bytes_storage.c index 5c0e13cf..2a236cbc 100644 --- a/src/fw/services/common/put_bytes/put_bytes_storage.c +++ b/src/fw/services/common/put_bytes/put_bytes_storage.c @@ -114,7 +114,7 @@ bool pb_storage_get_status(PutBytesObjectType obj_type, PbInstallStatus *status) case ObjectRecovery: case ObjectSysResources: return pb_storage_raw_get_status(obj_type, status); - default: // Partial installs not supported for othe object types today + default: // Partial installs not supported for other object types today return false; } } diff --git a/src/fw/services/common/put_bytes/put_bytes_storage.h b/src/fw/services/common/put_bytes/put_bytes_storage.h index 9712845a..0e433247 100644 --- a/src/fw/services/common/put_bytes/put_bytes_storage.h +++ b/src/fw/services/common/put_bytes/put_bytes_storage.h @@ -72,7 +72,7 @@ uint32_t pb_storage_calculate_crc(PutBytesStorage *storage, PutBytesCrcType crc_ //! @param object_type the type of putbyte object we're about to store //! @param total_size the size of the incoming object, in bytes //! @param append_offset if != 0, this means we are continuing a PB operation that previously failed -//! for some reason. The incomming writes will start at this offset +//! for some reason. The incoming writes will start at this offset //! @param info additional information about the data (see PutBytesStorageInfo). bool pb_storage_init(PutBytesStorage *storage, PutBytesObjectType object_type, uint32_t total_size, PutBytesStorageInfo *info, uint32_t append_offset); @@ -80,7 +80,7 @@ bool pb_storage_init(PutBytesStorage *storage, PutBytesObjectType object_type, //! Deinitialize and free a storage struct after a transaction is over //! @param storage a pointer-to-pointer to where the reference to the storage is currently held //! @param is_success whether the putbyte transfer succeeded or not -//! @note if putbytes is unsuccesful, the data will be deleted +//! @note if putbytes is unsuccessful, the data will be deleted void pb_storage_deinit(PutBytesStorage *storage, bool is_success); //! Some types of storage allow the state of a partial installation to be recovered (today, just diff --git a/src/fw/services/common/regular_timer.c b/src/fw/services/common/regular_timer.c index 37725e87..c1649d3c 100644 --- a/src/fw/services/common/regular_timer.c +++ b/src/fw/services/common/regular_timer.c @@ -109,7 +109,7 @@ static void timer_callback(void* data) { //! Used only once when we first start up. This should be really close to the 0ms point. static void timer_callback_initializing(void* data) { // FIXME: FreeRTOS timers are subject to skew if something else is running on the millisecond. - // We'll need to continously adjust our timer period in really annoying ways. + // We'll need to continuously adjust our timer period in really annoying ways. new_timer_start(s_timer_id, 1000, timer_callback, NULL, TIMER_START_FLAG_REPEATING); timer_callback(data); diff --git a/src/fw/services/common/regular_timer.h b/src/fw/services/common/regular_timer.h index 737f9e95..a4768fda 100644 --- a/src/fw/services/common/regular_timer.h +++ b/src/fw/services/common/regular_timer.h @@ -48,7 +48,7 @@ void regular_timer_add_multiminute_callback(RegularTimerInfo* cb, uint16_t minut //! Remove a callback already registered for either seconds or minutes. //! WARNING: If you call this from your callback procedure, you are NOT allowed to free up the memory used for -//! the RegulartTimerInfo structure until after your callback exits! +//! the RegularTimerInfo structure until after your callback exits! //! @return true iff the timer was successfully stopped (false may indicate no timer was //! scheduled at all or the cb is currently executing) bool regular_timer_remove_callback(RegularTimerInfo* cb); diff --git a/src/fw/services/common/status_led.c b/src/fw/services/common/status_led.c index 3f241a68..c02777ac 100644 --- a/src/fw/services/common/status_led.c +++ b/src/fw/services/common/status_led.c @@ -43,11 +43,11 @@ void status_led_set(StatusLedState state) { s_led_color = new_color; // Tell the battery curve service to account for the updated LED state. - int compenstation_mv = 0; + int compensation_mv = 0; if (s_led_color != LED_BLACK) { - compenstation_mv = BOARD_CONFIG_POWER.charging_status_led_voltage_compensation; + compensation_mv = BOARD_CONFIG_POWER.charging_status_led_voltage_compensation; } - battery_curve_set_compensation(BATTERY_CURVE_COMPENSATE_STATUS_LED, compenstation_mv); + battery_curve_set_compensation(BATTERY_CURVE_COMPENSATE_STATUS_LED, compensation_mv); led_controller_rgb_set_color(s_led_color); } diff --git a/src/fw/services/common/system_task.c b/src/fw/services/common/system_task.c index be4d6a35..f0e3579f 100644 --- a/src/fw/services/common/system_task.c +++ b/src/fw/services/common/system_task.c @@ -57,7 +57,7 @@ static void system_task_idle_timer_callback(void* data) { } } -static void system_task_main(void* paramater) { +static void system_task_main(void* parameter) { task_watchdog_mask_set(PebbleTask_KernelBackground); task_init(); diff --git a/src/fw/services/common/vibe_pattern.c b/src/fw/services/common/vibe_pattern.c index 77a5e5ef..f5407398 100644 --- a/src/fw/services/common/vibe_pattern.c +++ b/src/fw/services/common/vibe_pattern.c @@ -160,7 +160,7 @@ static int s_pattern_timer = TIMER_INVALID_ID; static bool s_pattern_in_progress = false; // s_vibe_strength is the current vibration strength setting of the motor static int32_t s_vibe_strength = VIBE_STRENGTH_OFF; -// s_vibe_strength_default is the vibrations trength of the motor used when one is not specified +// s_vibe_strength_default is the vibrations strength of the motor used when one is not specified // explicitly, and can be changed in the notification vibration strength setting. static int32_t s_vibe_strength_default = VIBE_STRENGTH_MAX; diff --git a/src/fw/services/normal/accessory/smartstrap_comms.c b/src/fw/services/normal/accessory/smartstrap_comms.c index e718a1de..9a31e4b8 100644 --- a/src/fw/services/normal/accessory/smartstrap_comms.c +++ b/src/fw/services/normal/accessory/smartstrap_comms.c @@ -171,7 +171,7 @@ static void prv_read_complete_system_task_cb(void *context_ptr) { } PBL_ASSERTN(s_read_info.length >= FRAME_MIN_LENGTH); read_length = s_read_info.length - FRAME_MIN_LENGTH; - // don't care if the timeout is alreay queued as the FSM state will make it a noop + // don't care if the timeout is already queued as the FSM state will make it a noop new_timer_stop(s_read_timer); } @@ -230,7 +230,7 @@ static void prv_handle_complete_frame(bool *should_context_switch) { bool is_notify = header->flags.is_notify; if ((is_notify && (smartstrap_fsm_state_get() != SmartstrapStateNotifyInProgress)) || (!is_notify && (s_read_consumer.profile != header->profile))) { - // We weither got a notify frame in response to a normal read, or we got a response for a + // We either got a notify frame in response to a normal read, or we got a response for a // different frame than we requested. s_read_info.should_drop = true; } diff --git a/src/fw/services/normal/accessory/smartstrap_generic_service.c b/src/fw/services/normal/accessory/smartstrap_generic_service.c index eec96e02..89959e4f 100644 --- a/src/fw/services/normal/accessory/smartstrap_generic_service.c +++ b/src/fw/services/normal/accessory/smartstrap_generic_service.c @@ -283,7 +283,7 @@ static bool prv_read_complete(bool success, uint32_t length) { } else if (success && (header->error != GenericServiceResultOk)) { // The response was completely valid, but there was a non-Ok error returned success = false; - // translate the error code to the appropraite SmartstrapResult + // translate the error code to the appropriate SmartstrapResult if (header->error == GenericServiceResultNotSupported) { result = SmartstrapResultAttributeUnsupported; } else { diff --git a/src/fw/services/normal/accessory/smartstrap_link_control.c b/src/fw/services/normal/accessory/smartstrap_link_control.c index 44d300c0..44426714 100644 --- a/src/fw/services/normal/accessory/smartstrap_link_control.c +++ b/src/fw/services/normal/accessory/smartstrap_link_control.c @@ -37,7 +37,7 @@ //! How often we'll go without some valid data from the smartstrap before sending a status message //! and disconnecting if the smartstrap doesn't reply. This is in seconds. #define STATUS_CHECK_INTERVAL 5 -//! The minimum number of seconds between connnection requests to avoid spamming the smartstrap. +//! The minimum number of seconds between connection requests to avoid spamming the smartstrap. #define MIN_CONNECTION_REQUEST_INTERVAL 1 //! The minimum number of seconds between status requests to avoid spamming the smartstrap #define MIN_STATUS_REQUEST_INTERVAL 5 diff --git a/src/fw/services/normal/accessory/smartstrap_profile_registry.def b/src/fw/services/normal/accessory/smartstrap_profile_registry.def index b890b257..bc8491db 100644 --- a/src/fw/services/normal/accessory/smartstrap_profile_registry.def +++ b/src/fw/services/normal/accessory/smartstrap_profile_registry.def @@ -1,4 +1,4 @@ -// Registery for Smartstrap Profiles +// Registry for Smartstrap Profiles // Syntax: REGISTER_SMARTSTRAP_PROFILE(func) // where func is a function of the following type: diff --git a/src/fw/services/normal/accessory/smartstrap_profiles.h b/src/fw/services/normal/accessory/smartstrap_profiles.h index df96f91a..6bfd43ff 100644 --- a/src/fw/services/normal/accessory/smartstrap_profiles.h +++ b/src/fw/services/normal/accessory/smartstrap_profiles.h @@ -51,7 +51,7 @@ typedef struct { SmartstrapProfile profile; //! The maximum number of services which a smartstrap may support for this profile uint8_t max_services; - //! The loweest service id which this profile supports + //! The lowest service id which this profile supports uint16_t min_service_id; //! Optional handler for initialization SmartstrapProfileInitHandler init; @@ -71,7 +71,7 @@ typedef struct { typedef const SmartstrapProfileInfo *(*SmartstrapProfileGetInfoFunc)(void); -// generate funciton prototypes for profile info functions +// generate function prototypes for profile info functions #define REGISTER_SMARTSTRAP_PROFILE(f) const SmartstrapProfileInfo *f(void); #include "services/normal/accessory/smartstrap_profile_registry.def" #undef REGISTER_SMARTSTRAP_PROFILE diff --git a/src/fw/services/normal/accessory/smartstrap_state.h b/src/fw/services/normal/accessory/smartstrap_state.h index 4ae64f79..6e86e240 100644 --- a/src/fw/services/normal/accessory/smartstrap_state.h +++ b/src/fw/services/normal/accessory/smartstrap_state.h @@ -62,7 +62,7 @@ bool smartstrap_fsm_state_test_and_set(SmartstrapState expected_state, Smartstra //! Sets the FSM state, regardless of what the current state is. //! @note The caller must ensure that there can be no other task or an ISR trying to access or -//! change the state at the same time. If there is a posiblity for contention, the caller should use +//! change the state at the same time. If there is a possibility for contention, the caller should use //! prv_fsm_state_test_and_set instead or enter a critical region. void smartstrap_fsm_state_set(SmartstrapState next_state); diff --git a/src/fw/services/normal/activity/activity.c b/src/fw/services/normal/activity/activity.c index 9d9185d5..a0323d74 100644 --- a/src/fw/services/normal/activity/activity.c +++ b/src/fw/services/normal/activity/activity.c @@ -310,7 +310,7 @@ static SettingsFile *prv_settings_migrate(SettingsFile *file, uint16_t *written_ return file; } - PBL_LOG(LOG_LEVEL_INFO, "Performing settings file migration from verison %"PRIu16"", version); + PBL_LOG(LOG_LEVEL_INFO, "Performing settings file migration from version %"PRIu16"", version); // Perform migration if (version == 1) { @@ -322,7 +322,7 @@ static SettingsFile *prv_settings_migrate(SettingsFile *file, uint16_t *written_ } } else { // If the version is totally unexpected, remove the file and create a new one - PBL_LOG(LOG_LEVEL_ERROR, "Unknown settings file verison %"PRIu16"", version); + PBL_LOG(LOG_LEVEL_ERROR, "Unknown settings file version %"PRIu16"", version); } if (result != S_SUCCESS) { @@ -352,7 +352,7 @@ static void NOINLINE prv_update_storage(time_t utc_sec) { SettingsFile *file = activity_private_settings_open(); if (file && (s_activity_state.update_settings_counter <= 0)) { - // Peridocically save current stats into settings, so that if watch resets or crashes we + // Periodically save current stats into settings, so that if watch resets or crashes we // don't lose too much info ACTIVITY_LOG_DEBUG("updating current stats in settings"); diff --git a/src/fw/services/normal/activity/activity_calculators.c b/src/fw/services/normal/activity/activity_calculators.c index 38a51ab2..8205428c 100644 --- a/src/fw/services/normal/activity/activity_calculators.c +++ b/src/fw/services/normal/activity/activity_calculators.c @@ -105,7 +105,7 @@ uint32_t activity_private_compute_distance_mm(uint32_t steps, uint32_t ms) { // active_ml = 0.2 * speed_m_per_min * minutes * weight_kg // // Converting to calories (5.01 calories per ml) and plugging in distance for speed * time, we get -// the following. We will define walking as less then 4.5MPH (120 meters/minute) +// the following. We will define walking as less than 4.5MPH (120 meters/minute) // for walking: // active_cal = 0.1 * distance_m * weight_kg * 5.01 // = 0.501 * distance_m * weight_kg diff --git a/src/fw/services/normal/activity/activity_sessions.c b/src/fw/services/normal/activity/activity_sessions.c index 5d51252e..7981347b 100644 --- a/src/fw/services/normal/activity/activity_sessions.c +++ b/src/fw/services/normal/activity/activity_sessions.c @@ -323,7 +323,7 @@ void activity_sessions_prv_send_activity_session_to_data_logging(ActivitySession } -// This structre holds stats we collected from going through a list of sleep sessions. It is +// This structure holds stats we collected from going through a list of sleep sessions. It is // filled in by prv_compute_sleep_stats typedef struct { ActivityScalarStore total_minutes; @@ -501,7 +501,7 @@ void activity_sessions_prv_get_sleep_bounds_utc(time_t now_utc, time_t *enter_ut int first_sleep_utc; if (minute_of_day < ACTIVITY_LAST_SLEEP_MINUTE_OF_DAY) { // It is before the ACTIVITY_LAST_SLEEP_MINUTE_OF_DAY (currently 9pm) cutoff, so use - // the previou day's cutoff + // the previous day's cutoff first_sleep_utc = start_of_today_utc - (SECONDS_PER_DAY - last_sleep_second_of_day); } else { // It is after 9pm, so use the 9pm cutoff @@ -583,7 +583,7 @@ static void prv_log_activities(time_t now_utc) { } PBL_ASSERTN(params); - // If this is an event we already logged, or it's still onging, don't log it + // If this is an event we already logged, or it's still ongoing, don't log it if (session->ongoing || (session_exit_utc <= *params->exit_utc)) { continue; } @@ -659,7 +659,7 @@ void activity_sessions_prv_init(SettingsFile *file, time_t utc_now) { // flash got corrupted, as in PBL-37848 PBL_HEXDUMP(LOG_LEVEL_INFO, (void *)state->activity_sessions, sizeof(state->activity_sessions)); - PBL_LOG(LOG_LEVEL_ERROR, "Invalid activity session detected - could be flash corrruption"); + PBL_LOG(LOG_LEVEL_ERROR, "Invalid activity session detected - could be flash corruption"); // Zero out flash so that we don't get into a reboot loop memset(state->activity_sessions, 0, sizeof(state->activity_sessions)); @@ -703,7 +703,7 @@ void NOINLINE activity_sessions_prv_minute_handler(time_t utc_sec) { prv_update_sleep_metrics(utc_sec, last_sleep_utc_of_day, last_sleep_processed_utc); - // Log any new activites we detected to the phone + // Log any new activities we detected to the phone prv_log_activities(utc_sec); } diff --git a/src/fw/services/normal/activity/docs/index.md b/src/fw/services/normal/activity/docs/index.md index 5c10f424..1feb3294 100644 --- a/src/fw/services/normal/activity/docs/index.md +++ b/src/fw/services/normal/activity/docs/index.md @@ -26,7 +26,7 @@ The spectral density of that same walk sample, showing the amount of energy pres _Note that the y axis on this plot is not simply Power, but rather “Power / Average Power”, where “Average Power” is the average power of that particular signal._ -![Spectral Density](spectial_density.png) +![Spectral Density](spectral_density.png) You can see in the above spectral density plot that the dominant frequency in this example is 1Hz, corresponding to the 5 arm swings that occurred in these 5 seconds. @@ -206,7 +206,7 @@ The activity service implements the step and sleep algorithms and all of the sup - **activity\_insights.c** This module implements the logic for generating Health timeline pins and notifications. - **kraepelin** This subdirectory contains the code for the Kraepelin step and sleep algorithm, which is the name given to the current set of algorithms described in this document. This logic is broken out from the generic interface code in activity.c to make it easier to substitute in alternative algorithm implementations in the future if need be. - **kraepelin\_algorithm.c** The core step and sleep algorithm code. This module is intended to be operating system agnostic and contains minimal calls to external functions. This module originated from open source code provided by the Stanford Wearables Lab. -- **kraepelin/activity\_algorightm\_kraepelin.c** This module wraps the core algorithm code found in `kraepelin_algorithm.c` to make it conform to the internal activity service algorithm API expected by activity.c. An alternative algorithm implementation would just need to implement this same API in order for it to be accessible from `activity.c`. This modules handles all memory allocations, persistent storage management, and other system integration functions for the raw algorithm code found in kraepelin\_algorithm.c. +- **kraepelin/activity\_algorithm\_kraepelin.c** This module wraps the core algorithm code found in `kraepelin_algorithm.c` to make it conform to the internal activity service algorithm API expected by activity.c. An alternative algorithm implementation would just need to implement this same API in order for it to be accessible from `activity.c`. This modules handles all memory allocations, persistent storage management, and other system integration functions for the raw algorithm code found in kraepelin\_algorithm.c. The 3rd party Health API is implemented in `src/fw/applib/health_service.c`. The `health_service.c` module implements the “user land” logic for the Health API and makes calls into the activity service (which runs in privileged mode) to access the raw step and sleep data. diff --git a/src/fw/services/normal/activity/docs/spectial_density.png b/src/fw/services/normal/activity/docs/spectral_density.png similarity index 100% rename from src/fw/services/normal/activity/docs/spectial_density.png rename to src/fw/services/normal/activity/docs/spectral_density.png diff --git a/src/fw/services/normal/activity/insights_settings.h b/src/fw/services/normal/activity/insights_settings.h index 5f5aa029..4538f8b5 100644 --- a/src/fw/services/normal/activity/insights_settings.h +++ b/src/fw/services/normal/activity/insights_settings.h @@ -54,7 +54,7 @@ typedef struct PACKED ActivitySummarySettings { int8_t below_avg_threshold; //!< Values less than this are counted as above avg //!< In relation to 100% (eg 93% would be -7) int8_t fail_threshold; //!< Values less than this are counted as fail - //!< In releastion to 100% (e.g. 55% would be -45) + //!< In relation to 100% (e.g. 55% would be -45) union { struct PACKED { diff --git a/src/fw/services/normal/activity/kraepelin/activity_algorithm_kraepelin.c b/src/fw/services/normal/activity/kraepelin/activity_algorithm_kraepelin.c index 2db12aaa..a98ad34c 100644 --- a/src/fw/services/normal/activity/kraepelin/activity_algorithm_kraepelin.c +++ b/src/fw/services/normal/activity/kraepelin/activity_algorithm_kraepelin.c @@ -584,7 +584,7 @@ static bool NOINLINE prv_prepare_minute_data(uint16_t uncertain_m, time_t sleep_ // See if we need to zero out steps in this record. We check that the start of the minute // is within the sleep bounds. The WITHIN macro returns true if the test value is - // <= end_value, so we need to subract one minute from the end to see if the start of this + // <= end_value, so we need to subtract one minute from the end to see if the start of this // test minute is entirely within the sleep range. bool was_sleeping = WITHIN(cbuf_record->utc_sec, sleep_start_utc, sleep_end_utc - SECONDS_PER_MINUTE); @@ -747,7 +747,7 @@ void activity_algorithm_post_process_sleep_sessions(uint16_t num_input_sessions, const time_t end_utc = session->start_utc + (session->length_min * SECONDS_PER_MINUTE); const unsigned end_minute = time_util_get_minute_of_day(end_utc); - ACTIVITY_LOG_DEBUG("procesing activity %d, start_min: %u, len: %"PRIu16"", + ACTIVITY_LOG_DEBUG("processing activity %d, start_min: %u, len: %"PRIu16"", (int)session->type, start_minute, session->length_min); // Skip if not a sleep session @@ -864,7 +864,7 @@ static void prv_activity_update_states(time_t utc_sec, AlgMinuteRecord *record_o // ------------------------------------------------------------------------------------ // This is called when the activity services is doing down. This tells all of our state machines -// that are are going to be shut down, and to save off any unsaved data/sleep/step sessions. +// that are going to be shut down, and to save off any unsaved data/sleep/step sessions. void activity_algorithm_early_deinit(void) { if (!prv_lock()) { return; @@ -1240,7 +1240,7 @@ bool activity_algorithm_get_minute_history(HealthMinuteData *minute_data, uint32 // Init for missing records memset(minute_data, 0xFF, array_size * sizeof(HealthMinuteData)); - // Figure out the lowest key value for for chunks that go into this buffer + // Figure out the lowest key value for chunks that go into this buffer time_t utc_now = rtc_get_time(); const time_t oldest_possible = utc_now - ALG_MINUTE_FILE_MAX_ENTRIES * ALG_MINUTES_PER_FILE_RECORD * SECONDS_PER_MINUTE; @@ -1351,7 +1351,7 @@ bool activity_algorithm_test_fill_minute_file(void) { AlgMinuteFileRecord record = { }; prv_init_minute_record(&record.hdr, utc_sec, true /*for_file*/); - // Delete old file so this doesn't take forver, in case it's already got a lot of data in it + // Delete old file so this doesn't take forever, in case it's already got a lot of data in it pfs_remove(ALG_MINUTE_DATA_FILE_NAME); s_alg_state->num_minute_records = 0; diff --git a/src/fw/services/normal/activity/workout_service.h b/src/fw/services/normal/activity/workout_service.h index 37e1cda6..aa8ca64f 100644 --- a/src/fw/services/normal/activity/workout_service.h +++ b/src/fw/services/normal/activity/workout_service.h @@ -55,11 +55,11 @@ bool workout_service_is_workout_ongoing(void); bool workout_service_is_workout_type_supported(ActivitySessionType type); //! Start a new workout -//! This stops / saves all onoing automatically detected activity sessions +//! This stops / saves all ongoing automatically detected activity sessions //! All workouts must eventually get stopped bool workout_service_start_workout(ActivitySessionType type); -//! Pause / unpause the currect workout +//! Pause / unpause the correct workout bool workout_service_pause_workout(bool should_be_paused); //! Stops the current workout. Resumes automatic activity session detection diff --git a/src/fw/services/normal/alarms/alarm.c b/src/fw/services/normal/alarms/alarm.c index 22b80279..b430c9e6 100644 --- a/src/fw/services/normal/alarms/alarm.c +++ b/src/fw/services/normal/alarms/alarm.c @@ -593,10 +593,10 @@ static int prv_get_day_for_just_once_alarm(int hour, int minute) { localtime_r(¤t_time, &local_time); if (hour < local_time.tm_hour || (hour == local_time.tm_hour && minute <= local_time.tm_min)) { - // The time is before or equal to the current time. Sechedule the alarm for tomorrow + // The time is before or equal to the current time. Schedule the alarm for tomorrow return (local_time.tm_wday + 1) % DAYS_PER_WEEK; } else { - // The time hasn't happend yet today. Schedule it for today + // The time hasn't happened yet today. Schedule it for today return local_time.tm_wday; } } diff --git a/src/fw/services/normal/alarms/alarm.h b/src/fw/services/normal/alarms/alarm.h index dc709cfb..f2f3d95b 100644 --- a/src/fw/services/normal/alarms/alarm.h +++ b/src/fw/services/normal/alarms/alarm.h @@ -42,7 +42,7 @@ typedef int AlarmId; //! A unique ID that can be used to refer to each configure typedef enum AlarmKind { ALARM_KIND_EVERYDAY = 0, // Alarms of this type will happen each day ALARM_KIND_WEEKENDS, // Alarms of this type will happen Monday - Friday - ALARM_KIND_WEEKDAYS, // Alarms of this type happen Saturaday and Sunday + ALARM_KIND_WEEKDAYS, // Alarms of this type happen Saturday and Sunday ALARM_KIND_JUST_ONCE, // Alarms of this type will happen next time the specified time occurs ALARM_KIND_CUSTOM, // Alarms of this type happen on specified days } AlarmKind; @@ -102,7 +102,7 @@ void alarm_set_enabled(AlarmId id, bool enable); void alarm_delete(AlarmId id); //! @param id The alarm that is being queried -//! @return True if the alarm exists and is not disabled, Flase otherwise +//! @return True if the alarm exists and is not disabled, False otherwise bool alarm_get_enabled(AlarmId id); //! @param id The alarm that should be deleted diff --git a/src/fw/services/normal/alarms/alarm_pin.c b/src/fw/services/normal/alarms/alarm_pin.c index 6854fb92..3e90fb5f 100644 --- a/src/fw/services/normal/alarms/alarm_pin.c +++ b/src/fw/services/normal/alarms/alarm_pin.c @@ -56,7 +56,7 @@ void alarm_pin_add(time_t alarm_time, AlarmId id, AlarmType type, AlarmKind kind AttributeList edit_attr_list = {0}; prv_set_edit_action_attributes(&edit_attr_list); action_group.actions[0] = (TimelineItemAction) { - .id = (uint8_t) id, // id is guarenteed to be valid here, and we only support 10 alarms + .id = (uint8_t) id, // id is guaranteed to be valid here, and we only support 10 alarms .type = TimelineItemActionTypeOpenWatchApp, .attr_list = edit_attr_list, }; diff --git a/src/fw/services/normal/analytics/analytics.c b/src/fw/services/normal/analytics/analytics.c index 02534b48..d347cd3f 100644 --- a/src/fw/services/normal/analytics/analytics.c +++ b/src/fw/services/normal/analytics/analytics.c @@ -91,7 +91,7 @@ void analytics_set_entire_array(AnalyticsMetric metric, const void *value, Analy AnalyticsHeartbeat *heartbeat = analytics_storage_find(metric, NULL, client); if (heartbeat) { // We allow only a limited number of app heartbeats to accumulate. A NULL means we reached the - // limite + // limit analytics_heartbeat_set_entire_array(heartbeat, metric, value); } @@ -184,7 +184,7 @@ void analytics_stopwatch_stop(AnalyticsMetric metric) { AnalyticsStopwatchNode *stopwatch = prv_find_stopwatch(metric); if (!stopwatch) { - // TODO: Incerement this back up to LOG_LEVEL_WARNING when it doesn't happen + // TODO: Increment this back up to LOG_LEVEL_WARNING when it doesn't happen // on every bootup (PBL-5393) PBL_LOG(LOG_LEVEL_DEBUG, "Analytics stopwatch for metric %d already stopped!", metric); goto unlock; diff --git a/src/fw/services/normal/analytics/analytics_event.c b/src/fw/services/normal/analytics/analytics_event.c index d5ce38e1..1185a8d4 100644 --- a/src/fw/services/normal/analytics/analytics_event.c +++ b/src/fw/services/normal/analytics/analytics_event.c @@ -100,7 +100,7 @@ void analytics_event_app_launch(const Uuid *uuid) { return; } - // Format the event specifc info in the blob. The analytics_logging_log_event() method will fill + // Format the event specific info in the blob. The analytics_logging_log_event() method will fill // in the common fields AnalyticsEventBlob event_blob = { .event = AnalyticsEvent_AppLaunch, @@ -121,7 +121,7 @@ void analytics_event_app_launch(const Uuid *uuid) { // Log a pin open/create/update event. static void prv_simple_pin_event(time_t timestamp, const Uuid *parent_id, AnalyticsEvent event_enum, const char *verb) { - // Format the event specifc info in the blob. The analytics_logging_log_event() method will fill + // Format the event specific info in the blob. The analytics_logging_log_event() method will fill // in the common fields AnalyticsEventBlob event_blob = { .event = event_enum, @@ -165,7 +165,7 @@ void analytics_event_pin_updated(time_t timestamp, const Uuid *parent_id) { // Log a pin action event. void analytics_event_pin_action(time_t timestamp, const Uuid *parent_id, TimelineItemActionType action_type) { - // Format the event specifc info in the blob. The analytics_logging_log_event() method will fill + // Format the event specific info in the blob. The analytics_logging_log_event() method will fill // in the common fields AnalyticsEventBlob event_blob = { .event = AnalyticsEvent_PinAction, @@ -192,7 +192,7 @@ void analytics_event_pin_app_launch(time_t timestamp, const Uuid *parent_id) { return; } - // Format the event specifc info in the blob. The analytics_logging_log_event() method will fill + // Format the event specific info in the blob. The analytics_logging_log_event() method will fill // in the common fields AnalyticsEventBlob event_blob = { .event = AnalyticsEvent_PinAppLaunch, @@ -217,8 +217,8 @@ void analytics_event_canned_response(const char *response, bool successfully_sen // Format the event specific info in the blob. The analytics_logging_log_event() method will fill // in the common fields AnalyticsEventBlob event_blob = { - .event = successfully_sent ? AnalyticsEvent_CannedReponseSent - : AnalyticsEvent_CannedReponseFailed, + .event = successfully_sent ? AnalyticsEvent_CannedResponseSent + : AnalyticsEvent_CannedResponseFailed, }; if (!response) { @@ -404,7 +404,7 @@ void analytics_event_crash(uint8_t crash_code, uint32_t link_register) { .crash_report.link_register = link_register }; - ANALYTICS_LOG_DEBUG("Crash occured: Code %"PRIu8" / LR: %"PRIu32, + ANALYTICS_LOG_DEBUG("Crash occurred: Code %"PRIu8" / LR: %"PRIu32, event_blob.crash_report.crash_code, event_blob.crash_report.link_register); analytics_logging_log_event(&event_blob); @@ -461,7 +461,7 @@ void analytics_event_stationary_state_change(time_t timestamp, uint8_t state_cha void analytics_event_health_insight_created(time_t timestamp, ActivityInsightType insight_type, PercentTier pct_tier) { - // Format the event specifc info in the blob. The analytics_logging_log_event() method will fill + // Format the event specific info in the blob. The analytics_logging_log_event() method will fill // in the common fields AnalyticsEventBlob event_blob = { .event = AnalyticsEvent_HealthInsightCreated, @@ -486,7 +486,7 @@ void analytics_event_health_insight_created(time_t timestamp, void analytics_event_health_insight_response(time_t timestamp, ActivityInsightType insight_type, ActivitySessionType activity_type, ActivityInsightResponseType response_id) { - // Format the event specifc info in the blob. The analytics_logging_log_event() method will fill + // Format the event specific info in the blob. The analytics_logging_log_event() method will fill // in the common fields AnalyticsEventBlob event_blob = { .event = AnalyticsEvent_HealthInsightResponse, diff --git a/src/fw/services/normal/app_fetch_endpoint.c b/src/fw/services/normal/app_fetch_endpoint.c index 83c25fa9..dc83d20d 100644 --- a/src/fw/services/normal/app_fetch_endpoint.c +++ b/src/fw/services/normal/app_fetch_endpoint.c @@ -160,7 +160,7 @@ static void prv_cleanup(AppFetchResult result) { } //! System task callback triggered by app_fetch_put_bytes_event_handler() when we are receiving -//! put_bytes messages in reponse to a fetch request to the phone. +//! put_bytes messages in response to a fetch request to the phone. void prv_put_bytes_event_system_task_cb(void *data) { PebblePutBytesEvent *pb_event = (PebblePutBytesEvent *)data; diff --git a/src/fw/services/normal/app_inbox_service.c b/src/fw/services/normal/app_inbox_service.c index e7e55b29..30c16f9f 100644 --- a/src/fw/services/normal/app_inbox_service.c +++ b/src/fw/services/normal/app_inbox_service.c @@ -46,7 +46,7 @@ typedef struct AppInboxNode { //! The size of `storage`. size_t size; - //! The positive offset relative relative to write_index, up until which the current + //! The positive offset relative to write_index, up until which the current //! (incomplete) message has been written. size_t current_offset; @@ -145,7 +145,7 @@ DEFINE_SYSCALL(bool, sys_app_inbox_service_register, uint8_t *storage, size_t st } DEFINE_SYSCALL(uint32_t, sys_app_inbox_service_unregister, uint8_t *storage) { - // No check is needed on the value of `storage `, we're not going to derefence it. + // No check is needed on the value of `storage `, we're not going to dereference it. return app_inbox_service_unregister_by_storage(storage); } diff --git a/src/fw/services/normal/app_message/app_message_receiver.c b/src/fw/services/normal/app_message/app_message_receiver.c index 8736ffbc..26cde27f 100644 --- a/src/fw/services/normal/app_message/app_message_receiver.c +++ b/src/fw/services/normal/app_message/app_message_receiver.c @@ -103,7 +103,7 @@ static Receiver *prv_app_message_receiver_prepare(CommSession *session, rcv->header_bytes_remaining = header_bytes_remaining; // Always forward the header to default system receiver as well, we'll cancel it later on if the - // message was written succesfully to the app inbox. + // message was written successfully to the app inbox. if (!prv_fwd_prepare(rcv, session, header_bytes_remaining)) { kernel_free(rcv); return NULL; diff --git a/src/fw/services/normal/blob_db/api.c b/src/fw/services/normal/blob_db/api.c index d694856e..4503f4e2 100644 --- a/src/fw/services/normal/blob_db/api.c +++ b/src/fw/services/normal/blob_db/api.c @@ -290,7 +290,7 @@ status_t blob_db_flush(BlobDBId db_id) { if (db->flush) { status_t rv = db->flush(); if (rv == S_SUCCESS) { - PBL_LOG(LOG_LEVEL_INFO, "Flushing BlobDB with Id %d", db_id); + PBL_LOG(LOG_LEVEL_INFO, "Flushing BlobDB with ID %d", db_id); blob_db_event_put(BlobDBEventTypeFlush, db_id, NULL, 0); } return rv; diff --git a/src/fw/services/normal/blob_db/api.h b/src/fw/services/normal/blob_db/api.h index 72e1c68d..6907e246 100644 --- a/src/fw/services/normal/blob_db/api.h +++ b/src/fw/services/normal/blob_db/api.h @@ -66,17 +66,17 @@ typedef void (*BlobDBInitImpl)(void); //! Implements the insert API. Note that this function should be blocking. //! \param key a pointer to the key data -//! \param key_len the lenght of the key, in bytes +//! \param key_len the length of the key, in bytes //! \param val a pointer to the value data //! \param val_len the length of the value, in bytes -//! \returns S_SUCCESS if the key/val pair was succesfully inserted +//! \returns S_SUCCESS if the key/val pair was successfully inserted //! and an error code otherwise (See \ref StatusCode) typedef status_t (*BlobDBInsertImpl) (const uint8_t *key, int key_len, const uint8_t *val, int val_len); //! Implements the get length API. //! \param key a pointer to the key data -//! \param key_len the lenght of the key, in bytes +//! \param key_len the length of the key, in bytes //! \returns the length in bytes of the value for key on success //! and an error code otherwise (See \ref StatusCode) typedef int (*BlobDBGetLenImpl) @@ -84,24 +84,24 @@ typedef int (*BlobDBGetLenImpl) //! Implements the read API. Note that this function should be blocking. //! \param key a pointer to the key data -//! \param key_len the lenght of the key, in bytes +//! \param key_len the length of the key, in bytes //! \param[out] val_out a pointer to a buffer of size val_len //! \param val_len the length of the value to be copied, in bytes -//! \returns S_SUCCESS if the value for key was succesfully read, +//! \returns S_SUCCESS if the value for key was successfully read, //! and an error code otherwise (See \ref StatusCode) typedef status_t (*BlobDBReadImpl) (const uint8_t *key, int key_len, uint8_t *val_out, int val_len); //! Implements the delete API. Note that this function should be blocking. //! \param key a pointer to the key data -//! \param key_len the lenght of the key, in bytes -//! \returns S_SUCCESS if the key/val pair was succesfully deleted +//! \param key_len the length of the key, in bytes +//! \returns S_SUCCESS if the key/val pair was successfully deleted //! and an error code otherwise (See \ref StatusCode) typedef status_t (*BlobDBDeleteImpl) (const uint8_t *key, int key_len); //! Implements the flush API. Note that this function should be blocking. -//! \returns S_SUCCESS if all key/val pairs were succesfully deleted +//! \returns S_SUCCESS if all key/val pairs were successfully deleted //! and an error code otherwise (See \ref StatusCode) typedef status_t (*BlobDBFlushImpl)(void); @@ -118,7 +118,7 @@ typedef BlobDBDirtyItem *(*BlobDBGetDirtyListImpl)(void); //! Implements the MarkSynced API. //! \param key a pointer to the key data -//! \param key_len the lenght of the key, in bytes +//! \param key_len the length of the key, in bytes //! \returns S_SUCCESS if the item was marked synced, an error code otherwise typedef status_t (*BlobDBMarkSyncedImpl)(const uint8_t *key, int key_len); @@ -143,7 +143,7 @@ void blob_db_get_dirty_dbs(uint8_t *ids, uint8_t *num_ids); //! See \ref BlobDBReadImpl //! \param db_id the ID of the blob DB //! \param key a pointer to the key data -//! \param key_len the lenght of the key, in bytes +//! \param key_len the length of the key, in bytes status_t blob_db_insert(BlobDBId db_id, const uint8_t *key, int key_len, const uint8_t *val, int val_len); @@ -151,7 +151,7 @@ status_t blob_db_insert(BlobDBId db_id, //! See \ref BlobDBGetLenImpl //! \param db_id the ID of the blob DB //! \param key a pointer to the key data -//! \param key_len the lenght of the key, in bytes +//! \param key_len the length of the key, in bytes int blob_db_get_len(BlobDBId db_id, const uint8_t *key, int key_len); diff --git a/src/fw/services/normal/blob_db/health_db.c b/src/fw/services/normal/blob_db/health_db.c index 898f6a19..c24343b2 100644 --- a/src/fw/services/normal/blob_db/health_db.c +++ b/src/fw/services/normal/blob_db/health_db.c @@ -42,7 +42,7 @@ static PebbleMutex *s_mutex; #define MOVEMENT_DATA_KEY_SUFFIX "_movementData" #define SLEEP_DATA_KEY_SUFFIX "_sleepData" -#define STEP_TYPICALS_KEY_SUFFIX "_steps" // Not the best suffix, but we are stuck with it now... +#define STEP_TYPICAL_KEY_SUFFIX "_steps" // Not the best suffix, but we are stuck with it now... #define STEP_AVERAGE_KEY_SUFFIX "_dailySteps" #define SLEEP_AVERAGE_KEY_SUFFIX "_sleepDuration" #define HR_ZONE_DATA_KEY_SUFFIX "_heartRateZoneData" @@ -144,7 +144,7 @@ static bool prv_is_last_processed_timestamp_valid(time_t timestamp) { } -//! Tell the activity service that it needs to update its "current" values (non typicals / averages) +//! Tell the activity service that it needs to update its "current" values (non typical / averages) static void prv_notify_health_listeners(const char *key, int key_len, const uint8_t *val, @@ -306,7 +306,7 @@ bool health_db_get_typical_step_averages(DayInWeek day, ActivityMetricAverages * } char key[HEALTH_DB_MAX_KEY_LEN]; - snprintf(key, HEALTH_DB_MAX_KEY_LEN, "%s%s", WEEKDAY_NAMES[day], STEP_TYPICALS_KEY_SUFFIX); + snprintf(key, HEALTH_DB_MAX_KEY_LEN, "%s%s", WEEKDAY_NAMES[day], STEP_TYPICAL_KEY_SUFFIX); const int key_len = strlen(key); status_t s = settings_file_get(&file, key, key_len, averages->average, sizeof(averages->average)); @@ -321,7 +321,7 @@ bool health_db_set_typical_values(ActivityMetric metric, uint16_t *values, int num_values) { char key[HEALTH_DB_MAX_KEY_LEN]; - snprintf(key, HEALTH_DB_MAX_KEY_LEN, "%s%s", WEEKDAY_NAMES[day], STEP_TYPICALS_KEY_SUFFIX); + snprintf(key, HEALTH_DB_MAX_KEY_LEN, "%s%s", WEEKDAY_NAMES[day], STEP_TYPICAL_KEY_SUFFIX); const int key_len = strlen(key); return health_db_insert((uint8_t *)key, key_len, (uint8_t*)values, num_values * sizeof(uint16_t)); @@ -353,10 +353,10 @@ status_t health_db_insert(const uint8_t *key, int key_len, const uint8_t *val, i PBL_HEXDUMP(LOG_LEVEL_DEBUG, val, val_len); #endif - // Only store typicals / averages in this settings file. "Current" values are stored in the + // Only store typical / averages in this settings file. "Current" values are stored in the // activity settings file. // Sleep data contains a mix of current and typical values. The current values are just stored - // for convience and can't be accessed from this settings file. + // for convenience and can't be accessed from this settings file. status_t rv = S_SUCCESS; if (!strstr((char *)key, MOVEMENT_DATA_KEY_SUFFIX)) { SettingsFile file; diff --git a/src/fw/services/normal/blob_db/ios_notif_pref_db.c b/src/fw/services/normal/blob_db/ios_notif_pref_db.c index ed744548..d18e946a 100644 --- a/src/fw/services/normal/blob_db/ios_notif_pref_db.c +++ b/src/fw/services/normal/blob_db/ios_notif_pref_db.c @@ -83,7 +83,7 @@ static status_t prv_read_serialized_prefs(SettingsFile *file, const void *key, s } //! Returns the length of the data -//! When done with the prefs, call prv_free_serialzed_prefs() +//! When done with the prefs, call prv_free_serialized_prefs() static int prv_get_serialized_prefs(SettingsFile *file, const uint8_t *app_id, int key_len, SerializedNotifPrefs **prefs_out) { const unsigned prefs_len = settings_file_get_len(file, app_id, key_len); @@ -105,7 +105,7 @@ static int prv_get_serialized_prefs(SettingsFile *file, const uint8_t *app_id, i return (prefs_len - sizeof(SerializedNotifPrefs)); } -static void prv_free_serialzed_prefs(SerializedNotifPrefs *prefs) { +static void prv_free_serialized_prefs(SerializedNotifPrefs *prefs) { kernel_free(prefs); } @@ -143,7 +143,7 @@ iOSNotifPrefs* ios_notif_pref_db_get_prefs(const uint8_t *app_id, int key_len) { strncpy(buffer, (const char *)app_id, key_len); buffer[key_len] = '\0'; PBL_LOG(LOG_LEVEL_ERROR, "Could not parse serial data for <%s>", buffer); - prv_free_serialzed_prefs(serialized_prefs); + prv_free_serialized_prefs(serialized_prefs); return NULL; } @@ -172,12 +172,12 @@ iOSNotifPrefs* ios_notif_pref_db_get_prefs(const uint8_t *app_id, int key_len) { strncpy(buffer, (const char *)app_id, key_len); buffer[key_len] = '\0'; PBL_LOG(LOG_LEVEL_ERROR, "Could not deserialize data for <%s>", buffer); - prv_free_serialzed_prefs(serialized_prefs); + prv_free_serialized_prefs(serialized_prefs); kernel_free(notif_prefs); return NULL; } - prv_free_serialzed_prefs(serialized_prefs); + prv_free_serialized_prefs(serialized_prefs); return notif_prefs; } @@ -368,7 +368,7 @@ uint32_t ios_notif_pref_db_get_flags(const uint8_t *app_id, int key_len) { SerializedNotifPrefs *prefs = NULL; prv_get_serialized_prefs(&file, app_id, key_len, &prefs); uint32_t flags = prefs->flags; - prv_free_serialzed_prefs(prefs); + prv_free_serialized_prefs(prefs); prv_file_close_and_unlock(&file); return flags; } @@ -392,7 +392,7 @@ static bool prv_print_notif_pref_db(SettingsFile *file, SettingsRecordInfo *info // TODO: Print the attributes and actions - prv_free_serialzed_prefs(serialized_prefs); + prv_free_serialized_prefs(serialized_prefs); prompt_send_response(""); return true; } diff --git a/src/fw/services/normal/blob_db/reminder_db.h b/src/fw/services/normal/blob_db/reminder_db.h index 9457ed75..260e6fab 100644 --- a/src/fw/services/normal/blob_db/reminder_db.h +++ b/src/fw/services/normal/blob_db/reminder_db.h @@ -30,7 +30,7 @@ //! @return \ref S_SUCCESS if the function succeeds, error code otherwise status_t reminder_db_read_item(TimelineItem *item_out, TimelineItemId *id); -//! Get the header of the earliest earliest \ref TimelineItem in the reminderdb +//! Get the header of the earliest \ref TimelineItem in the reminderdb //! @param next_item_out pointer to a \ref TimelineItem (header only, no attributes or actions) //! which will be set to the earliest item in reminderdb //! @return \ref S_NO_MORE_ITEMS if there are no items in reminderdb, S_SUCCESS on success, diff --git a/src/fw/services/normal/bluetooth/bluetooth_persistent_storage.c b/src/fw/services/normal/bluetooth/bluetooth_persistent_storage.c index d1107dcd..715b74b3 100644 --- a/src/fw/services/normal/bluetooth/bluetooth_persistent_storage.c +++ b/src/fw/services/normal/bluetooth/bluetooth_persistent_storage.c @@ -96,7 +96,7 @@ typedef struct PACKED { #define BT_PERSISTENT_STORAGE_FILE_SIZE (4096) //! All of the actual pairings use a BTBondingID as a key. This is because with BLE pairings an -//! address is not alwaywas available, and it made it easier to have BT Classic and BLE pairings +//! address is not always available, and it made it easier to have BT Classic and BLE pairings //! use the same type of key. When adding pairings there is no BTBondingID so a free key has to //! be found by iterating over all possible keys. @@ -701,7 +701,7 @@ bool bt_persistent_storage_update_ble_device_name(BTBondingID bonding, const cha GapBondingFileSetStatus status; status = prv_file_set(&bonding, sizeof(bonding), &data, sizeof(data)); - // If this is the gateway, update SPRF so our pairing info betwen PRF and normal + // If this is the gateway, update SPRF so our pairing info between PRF and normal // FW is in sync if (data.ble_data.is_gateway && (status == GapBondingFileSetUpdated)) { prv_update_bondings(bonding, BtPersistBondingTypeBLE); diff --git a/src/fw/services/normal/contacts/attributes_address.h b/src/fw/services/normal/contacts/attributes_address.h index 5615feeb..2789d4b0 100644 --- a/src/fw/services/normal/contacts/attributes_address.h +++ b/src/fw/services/normal/contacts/attributes_address.h @@ -69,8 +69,8 @@ size_t attributes_address_get_buffer_size(uint8_t num_attributes, const uint8_t *attributes_per_address, size_t required_size_for_strings); -//! Initializes an AttrbuteList and AddressList -//! @param attr_list The AttrbuteList to initialize +//! Initializes an AttributeList and AddressList +//! @param attr_list The AttributeList to initialize //! @param addr_list The AddressList to initialize //! @param buffer The buffer to hold the list of attributes and address //! @param num_attributes number of attributes @@ -85,7 +85,7 @@ void attributes_address_init(AttributeList *attr_list, const uint8_t *attributes_per_address); //! Fills an AttributeList and AddressList from serialized data -//! @param attr_list The AttrbuteList to fill +//! @param attr_list The AttributeList to fill //! @param addr_list The AddressList to fill //! @param buffer The buffer which holds the list of attributes and address //! @param buf_end A pointer to the end of the buffer @@ -103,7 +103,7 @@ size_t attributes_address_get_serialized_payload_size(AttributeList *list, AddressList *addr_list); //! Serializes an attribute list and address list into a buffer -//! @param attr_list The AttrbuteList to serialize +//! @param attr_list The AttributeList to serialize //! @param addr_list The AddressList to serialize //! @param buffer a pointer to the buffer to write to //! @param buffer_size the size of the buffer in bytes diff --git a/src/fw/services/normal/data_logging/dls_endpoint.c b/src/fw/services/normal/data_logging/dls_endpoint.c index 1083ad8b..078a7336 100644 --- a/src/fw/services/normal/data_logging/dls_endpoint.c +++ b/src/fw/services/normal/data_logging/dls_endpoint.c @@ -325,7 +325,7 @@ bool dls_endpoint_send_data(DataLoggingSession *logging_session, const uint8_t * static void prv_dls_endpoint_handle_ack(uint8_t session_id) { DataLoggingSession *session = dls_list_find_by_session_id(session_id); if (session == NULL) { - PBL_LOG_D(LOG_DOMAIN_DATA_LOGGING, LOG_LEVEL_WARNING, "Received ack for non-existent session id: %"PRIu8, session_id); + PBL_LOG_D(LOG_DOMAIN_DATA_LOGGING, LOG_LEVEL_WARNING, "Received ack for nonexistent session id: %"PRIu8, session_id); return; } @@ -363,7 +363,7 @@ static void prv_dls_endpoint_handle_nack(uint8_t session_id) { DataLoggingSession *logging_session = dls_list_find_by_session_id(session_id); if (!logging_session) { - PBL_LOG_D(LOG_DOMAIN_DATA_LOGGING, LOG_LEVEL_WARNING, "Received nack for non-existent session id: %"PRIu8, session_id); + PBL_LOG_D(LOG_DOMAIN_DATA_LOGGING, LOG_LEVEL_WARNING, "Received nack for nonexistent session id: %"PRIu8, session_id); return; } @@ -441,7 +441,7 @@ static void prv_reopen_next_session_system_task_cb(void* data) { } } -//! For use with dls_list_for_each_session. Appends this session to our list of sesions we need to open. +//! For use with dls_list_for_each_session. Appends this session to our list of sessions we need to open. //! On entry, 'data' points to the variable holding the head of the list. static bool dls_endpoint_add_reopen_sessions_cb(DataLoggingSession *session, void *data) { DataLoggingReopenEntry **head_ptr = (DataLoggingReopenEntry **)data; diff --git a/src/fw/services/normal/data_logging/dls_list.c b/src/fw/services/normal/data_logging/dls_list.c index f7c53f07..ef7d667a 100644 --- a/src/fw/services/normal/data_logging/dls_list.c +++ b/src/fw/services/normal/data_logging/dls_list.c @@ -49,7 +49,7 @@ void dls_assert_own_list_mutex(void) { // * session->data->open_count can only be read/modified while holding the list mutex // and is only available if session->status == DataLoggingStatusActive // * In order to avoid deadlocks, -// - s_list_mutex MUST be released befored trying to grab session->data->mutex. +// - s_list_mutex MUST be released before trying to grab session->data->mutex. // - session->data->open_count must incremented to be > 0 under s_list_mutex before you can // grab session->data-mutex // - if you already own session->data-mutex, it is OK to grab s_list_mutex diff --git a/src/fw/services/normal/data_logging/dls_list.h b/src/fw/services/normal/data_logging/dls_list.h index 5f7966a0..2266eec0 100644 --- a/src/fw/services/normal/data_logging/dls_list.h +++ b/src/fw/services/normal/data_logging/dls_list.h @@ -40,7 +40,7 @@ void dls_list_insert_session(DataLoggingSession *logging_session); //! Creates a new DataLoggingSession object that is only initialized with the parameters given. The //! session will only be initialized with the given parameters. The .storage and .comm members must -//! be seperately initialized. Also, the resulting object will need to be added to the list of +//! be separately initialized. Also, the resulting object will need to be added to the list of //! sessions using one of dls_list_add_new_session and dls_list_insert_session. May return NULL if //! we've created too many sessions. DataLoggingSession *dls_list_create_session(uint32_t tag, DataLoggingItemType type, uint16_t size, diff --git a/src/fw/services/normal/data_logging/dls_main.c b/src/fw/services/normal/data_logging/dls_main.c index 5680fc53..d3a2dc5e 100644 --- a/src/fw/services/normal/data_logging/dls_main.c +++ b/src/fw/services/normal/data_logging/dls_main.c @@ -74,7 +74,7 @@ static void prv_send_all_sessions_system_task_cb(void *empty_all_data) { static void prv_check_all_sessions_timer_cb(void *data) { // If sends are not enabled, do nothing if (!prv_sends_enabled()) { - PBL_LOG(LOG_LEVEL_INFO, "Not sending sessions beause sending is disabled"); + PBL_LOG(LOG_LEVEL_INFO, "Not sending sessions because sending is disabled"); return; } @@ -125,7 +125,7 @@ bool dls_private_send_session(DataLoggingSession *logging_session, bool empty) { // If sends are not enabled, ignore if (!prv_sends_enabled()) { - PBL_LOG(LOG_LEVEL_INFO, "Not sending session beause sending is disabled"); + PBL_LOG(LOG_LEVEL_INFO, "Not sending session because sending is disabled"); return true; } @@ -288,7 +288,7 @@ static bool prv_inactivate_sessions_each_cb(DataLoggingSession *session, void *d void dls_send_all_sessions(void) { // If sends are not enabled, do nothing if (!prv_sends_enabled()) { - PBL_LOG(LOG_LEVEL_INFO, "Not sending sessions beause sending is disabled"); + PBL_LOG(LOG_LEVEL_INFO, "Not sending sessions because sending is disabled"); return; } system_task_add_callback(prv_send_all_sessions_system_task_cb, (void*) true); @@ -444,7 +444,7 @@ DataLoggingResult dls_log(DataLoggingSession *session, const void* data, uint32_ // // Some datalogging code holds the dls_list.c:s_list_mutex while taking the // bt_lock. Since we are locking the list and then trying to get the bt_lock, - // any other thread which holds the bt_lock and then trys to call a log could + // any other thread which holds the bt_lock and then tries to call a log could // result in a deadlock (since dls_lock_session() uses the list mutex). For non-release // builds assert when this happens so we can catch the cases and fix them. bt_lock_assert_held(false); diff --git a/src/fw/services/normal/data_logging/dls_storage.c b/src/fw/services/normal/data_logging/dls_storage.c index ba768824..61b601b0 100644 --- a/src/fw/services/normal/data_logging/dls_storage.c +++ b/src/fw/services/normal/data_logging/dls_storage.c @@ -348,7 +348,7 @@ static bool prv_get_session_file(DataLoggingSession *session, uint32_t space_nee } // Add a minium buffer to needed. This gives us a little insurance and also allows for the - // extra space needed for the chunk header byte that occurs at least once evvery + // extra space needed for the chunk header byte that occurs at least once every // DLS_MAX_CHUNK_SIZE_BYTES bytes. space_needed += DLS_MIN_FREE_BYTES; uint32_t space_avail = file_size - session->storage.write_offset; diff --git a/src/fw/services/normal/data_logging/dls_syscalls.c b/src/fw/services/normal/data_logging/dls_syscalls.c index 6bdf1f52..2fa6e75d 100644 --- a/src/fw/services/normal/data_logging/dls_syscalls.c +++ b/src/fw/services/normal/data_logging/dls_syscalls.c @@ -31,7 +31,7 @@ DEFINE_SYSCALL(DataLoggingSessionRef, sys_data_logging_create, uint32_t tag, DEFINE_SYSCALL(void, sys_data_logging_finish, DataLoggingSessionRef session_ref) { // TODO: It would be nice to verify the session itself, because they could be - // passing us any memory address (not necesarilly a valid DataLoggingSession). + // passing us any memory address (not necessarily a valid DataLoggingSession). // An evil developer could potentially use this to confuse the data_logging // logic, and do evil things with kernel rights. However, it's pretty unlikely // (especially since our executable code lives in microflash, and hence can't diff --git a/src/fw/services/normal/filesystem/pfs.c b/src/fw/services/normal/filesystem/pfs.c index e69ecf11..e29f813d 100644 --- a/src/fw/services/normal/filesystem/pfs.c +++ b/src/fw/services/normal/filesystem/pfs.c @@ -715,7 +715,7 @@ static status_t find_free_page(uint16_t *free_page, bool use_gc_allocator, // we should now be processing on a sector aligned boundary PBL_ASSERTN((start_pg % PFS_PAGES_PER_ERASE_SECTOR) == 0); - // if we could not find a free page in the sector we were previosuly using + // if we could not find a free page in the sector we were previously using // we need to scan through the erase regions and either perform some garbage // collection or find an erased page in another erase region if (next_page == INVALID_PAGE) { @@ -757,7 +757,7 @@ static status_t find_free_page(uint16_t *free_page, bool use_gc_allocator, //! Note: expects that the caller does _not_ hold the pfs mutex //! Note: If pages are already pre-erased on the FS, this routine will return -//! very quickly. If we need to do erases, it will take longer becauses this +//! very quickly. If we need to do erases, it will take longer because this //! operation can take seconds to complete on certain flash parts //! //! @param file_size - The amount of file space to erase @@ -899,7 +899,7 @@ static status_t create_flash_file(File *f) { } } - // we have succesfully allocated space for the file, so add file specific info + // we have successfully allocated space for the file, so add file specific info f->start_page = f->curr_page = start_page; FileHeader file_hdr; diff --git a/src/fw/services/normal/filesystem/pfs.h b/src/fw/services/normal/filesystem/pfs.h index 30c95e36..d4ba5eb9 100644 --- a/src/fw/services/normal/filesystem/pfs.h +++ b/src/fw/services/normal/filesystem/pfs.h @@ -89,7 +89,7 @@ typedef struct { //! committed until the pfs_close is called. Until this time, pfs_open of the //! 'name' will return a hdl to the original file. This way there is always a //! valid version of the file which can be read & the caller can copy parts -//! of the orginal file in hunks rather than allocating a lot of RAM. +//! of the original file in hunks rather than allocating a lot of RAM. //! //! OP_FLAG_SKIP_HDR_CRC_CHECK - For files which are not accessed frequently, //! it is a good idea to sanity check the on-flash header CRCs to make sure diff --git a/src/fw/services/normal/notifications/ancs/ancs_filtering.c b/src/fw/services/normal/notifications/ancs/ancs_filtering.c index f76344e2..4c134259 100644 --- a/src/fw/services/normal/notifications/ancs/ancs_filtering.c +++ b/src/fw/services/normal/notifications/ancs/ancs_filtering.c @@ -36,16 +36,16 @@ void ancs_filtering_record_app(iOSNotifPrefs **notif_prefs, // stored. iOSNotifPrefs *app_notif_prefs = *notif_prefs; - const int num_existing_attribtues = app_notif_prefs ? app_notif_prefs->attr_list.num_attributes : + const int num_existing_attributes = app_notif_prefs ? app_notif_prefs->attr_list.num_attributes : 0; AttributeList new_attr_list; - attribute_list_init_list(num_existing_attribtues, &new_attr_list); + attribute_list_init_list(num_existing_attributes, &new_attr_list); bool list_dirty = false; // Copy over all the existing attributes to our new list if (app_notif_prefs) { - for (int i = 0; i < num_existing_attribtues; i++) { + for (int i = 0; i < num_existing_attributes; i++) { new_attr_list.attributes[i] = app_notif_prefs->attr_list.attributes[i]; } } diff --git a/src/fw/services/normal/notifications/ancs/ancs_item.c b/src/fw/services/normal/notifications/ancs/ancs_item.c index cca554c7..0362c8f4 100644 --- a/src/fw/services/normal/notifications/ancs/ancs_item.c +++ b/src/fw/services/normal/notifications/ancs/ancs_item.c @@ -336,7 +336,7 @@ TimelineItem *ancs_item_create_and_populate(ANCSAttribute *notif_attributes[], } // Hide display name if we have custom app metadata for this app. - // If the app_metadata, not not have a name, then we have the generic app metadata. + // If the app_metadata, does not have a name, then we have the generic app metadata. if (app_metadata->app_id) { display_name = NULL; } @@ -399,7 +399,7 @@ TimelineItem *ancs_item_create_and_populate(ANCSAttribute *notif_attributes[], int num_native_actions = (positive_action ? 1 : 0) + (negative_action ? 1 : 0); int num_actions = num_native_actions + num_pebble_actions; - const int max_num_actions = 8; // Arbitratily chosen + const int max_num_actions = 8; // Arbitrarily chosen uint8_t attributes_per_action[max_num_actions]; int action_idx = 0; diff --git a/src/fw/services/normal/notifications/ancs/ancs_item.h b/src/fw/services/normal/notifications/ancs/ancs_item.h index 95b1eef6..fc85eaff 100644 --- a/src/fw/services/normal/notifications/ancs/ancs_item.h +++ b/src/fw/services/normal/notifications/ancs/ancs_item.h @@ -27,7 +27,7 @@ //! @param app_attributes ANCS App attributes (namely, the display name) //! @param app_metadata The icon and color associated with the app //! @param notif_prefs iOS notification prefs for this notification -//! @param timestamp Time the notification occured +//! @param timestamp Time the notification occurred //! @param properties Additional ANCS properties (category, flags, etc) //! @return The newly created timeline item TimelineItem *ancs_item_create_and_populate(ANCSAttribute *notif_attributes[], diff --git a/src/fw/services/normal/notifications/ancs/ancs_notifications.c b/src/fw/services/normal/notifications/ancs/ancs_notifications.c index 4d0a6e42..a52817f6 100644 --- a/src/fw/services/normal/notifications/ancs/ancs_notifications.c +++ b/src/fw/services/normal/notifications/ancs/ancs_notifications.c @@ -193,7 +193,7 @@ static bool prv_should_ignore_because_stale(time_t timestamp) { // workaround for PBL-8400 (ignore notifications older than 2 hours) // PBL-9066: Increased to 20 minutes due to Mail.app only fetching emails every 15 minutes // PBL-9251: Increased to 2 hours. People have Fetch set to hourly. - // PBL-12726: Added a check to see if the timstamp is coming from a location based reminder + // PBL-12726: Added a check to see if the timestamp is coming from a location based reminder // This work-around is causing more trouble than the problem it was solving... if (timestamp < (now - MAXIMUM_NOTIFY_TIME) && timestamp != INVALID_TIME) { PBL_LOG(LOG_LEVEL_INFO, "Not presenting stale notif (ts=%ld)", timestamp); diff --git a/src/fw/services/normal/notifications/notification_storage.c b/src/fw/services/normal/notifications/notification_storage.c index b5a85443..0f409555 100644 --- a/src/fw/services/normal/notifications/notification_storage.c +++ b/src/fw/services/normal/notifications/notification_storage.c @@ -673,7 +673,7 @@ void notification_storage_rewrite(void (*iter_callback)(TimelineItem *notificati // Close the old file prv_file_close(fd); - // We have to close and reopend the new file pointed to by the file descriptor, so + // We have to close and reopened the new file pointed to by the file descriptor, so // that it's temp flag is cleared. pfs_close(new_fd); new_fd = prv_file_open(OP_FLAG_READ | OP_FLAG_WRITE); diff --git a/src/fw/services/normal/notifications/notification_types.h b/src/fw/services/normal/notifications/notification_types.h index 31e9a52e..ed81cdb3 100644 --- a/src/fw/services/normal/notifications/notification_types.h +++ b/src/fw/services/normal/notifications/notification_types.h @@ -27,7 +27,7 @@ typedef enum { NotificationReminder = (1 << 3) } NotificationType; -//! Type and Id for the notification or reminder. +//! Type and ID for the notification or reminder. typedef struct { NotificationType type; Uuid id; diff --git a/src/fw/services/normal/persist.h b/src/fw/services/normal/persist.h index 3bc09693..8dfbf332 100644 --- a/src/fw/services/normal/persist.h +++ b/src/fw/services/normal/persist.h @@ -50,7 +50,7 @@ void persist_service_unlock_store(SettingsFile *store); //! Call during each process's startup. void persist_service_client_open(const Uuid *uuid); -//! Call once after proces exits to clean it up. +//! Call once after process exits to clean it up. void persist_service_client_close(const Uuid *uuid); //! Deletes the app's persist file. diff --git a/src/fw/services/normal/phone_call.c b/src/fw/services/normal/phone_call.c index b5622f9a..9ad33728 100644 --- a/src/fw/services/normal/phone_call.c +++ b/src/fw/services/normal/phone_call.c @@ -35,7 +35,7 @@ //! - The watch gets PP messages (parsed in phone_pp.c), which come in as events happen. //! - The watch can decline / hangup the call by sending PP messages to the phone. //! On iOS: -//! - The watch gets incomming calls from ANCS (parsed in ancs_notifications.c). +//! - The watch gets incoming calls from ANCS (parsed in ancs_notifications.c). //! - After that the watch must poll the phone for its status if not iOS 9+ (using PP messages). //! - On iOS 9, ANCS tells us when the phone stops ringing //! - The watch can pickup / decline a call using ANCS actions @@ -77,7 +77,7 @@ static void prv_timer_callback(void *context) { } static void prv_schedule_call_watchdog(int poll_interval_ms) { - // The Android app currently crashes if it recieves the get_state event. It currently doesn't + // The Android app currently crashes if it receives the get_state event. It currently doesn't // respond either so don't bother sending messages we don't need to. We also don't need to poll // iOS 9 since we can rely on ANCS to tell us when the phone stops ringing if (s_call_source == PhoneCallSource_ANCS_Legacy) { @@ -111,7 +111,7 @@ static bool prv_should_show_ongoing_call_ui(void) { return (s_call_source == PhoneCallSource_PP); } -// hangup != decline. Decline == reject incomming call, Hangup == stop in progress call +// hangup != decline. Decline == reject incoming call, Hangup == stop in progress call static bool prv_can_hangup(void) { // We can't hangup with iOS return !prv_call_is_ancs(); diff --git a/src/fw/services/normal/process_management/process_loader_storage.c b/src/fw/services/normal/process_management/process_loader_storage.c index b8b34b1d..48bb9ed1 100644 --- a/src/fw/services/normal/process_management/process_loader_storage.c +++ b/src/fw/services/normal/process_management/process_loader_storage.c @@ -53,7 +53,7 @@ static void * prv_offset_to_address(MemorySegment *segment, size_t offset) { } // --------------------------------------------------------------------------------------------- -static bool prv_intialize_sdk_process(PebbleTask task, const PebbleProcessInfo *info, +static bool prv_initialize_sdk_process(PebbleTask task, const PebbleProcessInfo *info, MemorySegment *destination) { if (!prv_verify_checksum(info, destination->start)) { PBL_LOG(LOG_LEVEL_DEBUG, "Calculated CRC does not match, aborting..."); @@ -128,7 +128,7 @@ static bool prv_load_from_flash(const PebbleProcessMd *app_md, PebbleTask task, } pfs_close(fd); - return prv_intialize_sdk_process(task, &info, destination); + return prv_initialize_sdk_process(task, &info, destination); } // ---------------------------------------------------------------------------------------------- @@ -156,7 +156,7 @@ static bool prv_load_from_resource(const PebbleProcessMdResource *app_md, destination->start, load_size) == load_size); // Process the relocation entries - return prv_intialize_sdk_process(task, &info, destination); + return prv_initialize_sdk_process(task, &info, destination); } void * process_loader_load(const PebbleProcessMd *app_md, PebbleTask task, diff --git a/src/fw/services/normal/protobuf_log/protobuf_log.c b/src/fw/services/normal/protobuf_log/protobuf_log.c index 8476f2f0..c4264446 100644 --- a/src/fw/services/normal/protobuf_log/protobuf_log.c +++ b/src/fw/services/normal/protobuf_log/protobuf_log.c @@ -133,7 +133,7 @@ static bool prv_populate_payload(ProtobufLogConfig *config, size_t buffer_len, u const char *version_patch_ptr; version_get_major_minor_patch(&v_major, &v_minor, &version_patch_ptr); - // Sender Id + // Sender ID const char *watch_serial = mfg_get_serial_number(); pebble_pipeline_Payload payload = { diff --git a/src/fw/services/normal/settings/settings_file.c b/src/fw/services/normal/settings/settings_file.c index 4ad49a7a..044eded3 100644 --- a/src/fw/services/normal/settings/settings_file.c +++ b/src/fw/services/normal/settings/settings_file.c @@ -41,7 +41,7 @@ static status_t prv_open(SettingsFile *file, const char *name, uint8_t flags, in // max_space_total == max_used_space, then if the file is full, changing a // single value would force the whole file to be rewritten- every single // time! It's probably worth it to "waste" a bit of flash space to avoid - // this pathalogical case. + // this pathological case. int max_space_total = pfs_sector_optimal_size(max_used_space * 12 / 10, strlen(name)); // TODO: Dynamically sized files? @@ -154,10 +154,10 @@ static bool flag_is_set(SettingsRecordHeader *hdr, uint8_t flags) { // the entire record has not been completely written yet. Records in this // state are removed on bootup, since they are in an indeterminate state. // - written: The typical state for a record. == !partially_written -// - partially_overwritten: This record has been superceeded by another, which +// - partially_overwritten: This record has been superseded by another, which // we are currently in the process of writing out to flash. Records in // this state are restored on bootup. -// - overwritten: This record has been superceeded by another, which has been +// - overwritten: This record has been superseded by another, which has been // completely written out to flash. We skip over and ignore overwritten // records. static bool partially_written(SettingsRecordHeader *hdr) { @@ -256,7 +256,7 @@ status_t settings_file_rewrite_filtered( settings_file_close(file); // We have to close and reopen the new_file so that it's temp flag is cleared. // Before the close succeeds, if we reboot, we will just end up reading the - // old file. After the close suceeds, we will end up reading the new + // old file. After the close succeeds, we will end up reading the new // (compacted) file. char *name = kernel_strdup(new_file.name); settings_file_close(&new_file); @@ -579,7 +579,7 @@ status_t settings_file_rewrite(SettingsFile *file, settings_file_close(file); // We have to close and reopen the new_file so that it's temp flag is cleared. // Before the close succeeds, if we reboot, we will just end up reading the - // old file. After the close suceeds, we will end up reading the new + // old file. After the close succeeds, we will end up reading the new // (compacted) file. char *name = kernel_strdup(new_file.name); settings_file_close(&new_file); diff --git a/src/fw/services/normal/settings/settings_file.h b/src/fw/services/normal/settings/settings_file.h index 7d49ab66..284024d1 100644 --- a/src/fw/services/normal/settings/settings_file.h +++ b/src/fw/services/normal/settings/settings_file.h @@ -20,19 +20,19 @@ // Deleted records have their key stick around for at least DELETED_LIFETIME // before they can be garbage collected from the file in which they are -// contained, that way they have time to propegate to all devices we end up -// syncronizing with. For more information, refer to the sync protocol proposal: +// contained, that way they have time to propagate to all devices we end up +// synchronizing with. For more information, refer to the sync protocol proposal: // https://pebbletechnology.atlassian.net/wiki/pages/viewpage.action?pageId=26837564 // // FIXME: See PBL-18945 #define DELETED_LIFETIME (0 * SECONDS_PER_DAY) //! A SettingsFile is just a simple binary key-value store. Keys can be strings, -//! uint32_ts, or arbitrary bytes. Values are similarilly flexible. All +//! uint32_ts, or arbitrary bytes. Values are similarly flexible. All //! operations are atomic, so a reboot in the middle of changing the value for a //! key will always either complete, returning the new value upon reboot, or //! will just return the old value. -//! It also supports bidirection syncronization between the phone & watch, +//! It also supports bidirectional synchronization between the phone & watch, //! using timestamps to resolve conflicts. //! Note that although all operations are atomic, they are not thread-safe. If //! you will be accessing a SettingsFile from multiple threads, make sure you @@ -126,7 +126,7 @@ typedef struct { //! Callback used for using settings_file_each. //! The bool returned is used to control the iteration. //! - If a callback returns true, the iteration continues -//! - If a callback returns false, the ieration stops. +//! - If a callback returns false, the iteration stops. typedef bool (*SettingsFileEachCallback)(SettingsFile *file, SettingsRecordInfo *info, void *context); diff --git a/src/fw/services/normal/stationary.c b/src/fw/services/normal/stationary.c index 31b4f9f7..4b335bad 100644 --- a/src/fw/services/normal/stationary.c +++ b/src/fw/services/normal/stationary.c @@ -160,7 +160,7 @@ static void prv_stationary_check_launcher_task_cb(void *unused_data) { } } -//! Called every minute to determine whether any motion has occured since the last time +//! Called every minute to determine whether any motion has occurred since the last time //! the call was made. The current position is updated at this time static void prv_stationary_check_timer_cb(void *unused_data) { //! All stationary events need to be handled by kernel main diff --git a/src/fw/services/normal/stationary.h b/src/fw/services/normal/stationary.h index 8b8d4240..a15047a2 100644 --- a/src/fw/services/normal/stationary.h +++ b/src/fw/services/normal/stationary.h @@ -21,7 +21,7 @@ #include "kernel/event_loop.h" //! Set up a timer that will check the position of the watch every minute to see -//! if any motion has occured +//! if any motion has occurred void stationary_init(void); //! Stationary mode should only be enabled when the user settings allow for it and when diff --git a/src/fw/services/normal/timeline/attribute.h b/src/fw/services/normal/timeline/attribute.h index ad9a12ae..fd31542f 100644 --- a/src/fw/services/normal/timeline/attribute.h +++ b/src/fw/services/normal/timeline/attribute.h @@ -300,7 +300,7 @@ Uint32List *attribute_get_uint32_list(const AttributeList *attr_list, AttributeI //! @param attr_list a pointer to the list of attributes to serialize //! @param buffer a pointer to the buffer to write to //! @param buf_end the end of buffer -//! @retuns the number of serialized bytes +//! @returns the number of serialized bytes size_t attribute_list_serialize(const AttributeList *attr_list, uint8_t *buffer, uint8_t *buf_end); //! Calculate the required size for a buffer to store a list of attributes diff --git a/src/fw/services/normal/timeline/attribute_group.c b/src/fw/services/normal/timeline/attribute_group.c index 8f285f79..e7375732 100644 --- a/src/fw/services/normal/timeline/attribute_group.c +++ b/src/fw/services/normal/timeline/attribute_group.c @@ -235,19 +235,19 @@ static bool prv_deserialize_group_element(AttributeGroupType type, } for (int i = 0; i < num_group_type_elements; i++) { - AttributeList *group_type_element_attribtue_list; + AttributeList *group_type_element_attribute_list; if (type == AttributeGroupType_Action) { - group_type_element_attribtue_list = prv_deserialize_action( + group_type_element_attribute_list = prv_deserialize_action( &((TimelineItemActionGroup *)group_ptr)->actions[i], &cursor, payload_end, buffer, buf_end); } else { - group_type_element_attribtue_list = prv_deserialize_address( + group_type_element_attribute_list = prv_deserialize_address( &((AddressList *)group_ptr)->addresses[i], &cursor, payload_end, buffer, buf_end); } if (!attribute_deserialize_list((char**)&buffer, (char *)buf_end, &cursor, - payload_end, *group_type_element_attribtue_list)) { + payload_end, *group_type_element_attribute_list)) { return false; } } @@ -354,17 +354,17 @@ static uint8_t* prv_serialize_group_element(AttributeGroupType type, } for (int i = 0; i < num_group_type_elements; i++) { - AttributeList *group_type_element_attribtue_list; + AttributeList *group_type_element_attribute_list; if (type == AttributeGroupType_Action) { - group_type_element_attribtue_list = prv_serialize_action( + group_type_element_attribute_list = prv_serialize_action( &((TimelineItemActionGroup *)group_ptr)->actions[i], &buffer); } else { - group_type_element_attribtue_list = prv_serialize_address( + group_type_element_attribute_list = prv_serialize_address( &((AddressList *)group_ptr)->addresses[i], &buffer); } PBL_ASSERTN(buffer <= buf_end); - buffer += attribute_list_serialize(group_type_element_attribtue_list, + buffer += attribute_list_serialize(group_type_element_attribute_list, buffer, buf_end); } diff --git a/src/fw/services/normal/timeline/attributes_actions.h b/src/fw/services/normal/timeline/attributes_actions.h index f8aa1a09..d9e28e74 100644 --- a/src/fw/services/normal/timeline/attributes_actions.h +++ b/src/fw/services/normal/timeline/attributes_actions.h @@ -56,8 +56,8 @@ size_t attributes_actions_get_required_buffer_size(uint8_t num_attributes, size_t attributes_actions_get_buffer_size(AttributeList *attr_list, TimelineItemActionGroup *action_group); -//! Initializes an AttrbuteList and ActionGroup -//! @param attr_list The AttrbuteList to initialize +//! Initializes an AttributeList and ActionGroup +//! @param attr_list The AttributeList to initialize //! @param action_group The ActionGroup to initialize //! @param buffer The buffer to hold the list of attributes and actions //! @param num_attributes number of attributes @@ -72,7 +72,7 @@ void attributes_actions_init(AttributeList *attr_list, const uint8_t *attributes_per_action); //! Fills an AttributeList and ActionGroup from serialized data -//! @param attr_list The AttrbuteList to fill +//! @param attr_list The AttributeList to fill //! @param action_group The ActionGroup to fill //! @param buffer The buffer which holds the list of attributes and actions //! @param buf_end A pointer to the end of the buffer @@ -90,7 +90,7 @@ size_t attributes_actions_get_serialized_payload_size(AttributeList *list, TimelineItemActionGroup *action_group); //! Serializes an attribute list and action group into a buffer -//! @param attr_list The AttrbuteList to serialize +//! @param attr_list The AttributeList to serialize //! @param action_group The ActionGroup to serialize //! @param buffer a pointer to the buffer to write to //! @param buffer_size the size of the buffer in bytes diff --git a/src/fw/services/normal/timeline/calendar.h b/src/fw/services/normal/timeline/calendar.h index 85e97230..a2d84644 100644 --- a/src/fw/services/normal/timeline/calendar.h +++ b/src/fw/services/normal/timeline/calendar.h @@ -22,7 +22,7 @@ //! The states are: //! - "no calendar events ongoing" //! - "one or more calendar events ongoing" -//! Not every calendar event start / stop produces an event, but every transition is guarenteed +//! Not every calendar event start / stop produces an event, but every transition is guaranteed //! to put an event. diff --git a/src/fw/services/normal/timeline/layout_layer.h b/src/fw/services/normal/timeline/layout_layer.h index ec398527..4ea4ec50 100644 --- a/src/fw/services/normal/timeline/layout_layer.h +++ b/src/fw/services/normal/timeline/layout_layer.h @@ -34,13 +34,13 @@ typedef enum { //! LayoutLayers depart from traditional Layers in a few meaningful way. //! 1) LayoutLayers are modulated by a "mode", which is the context in which the LayoutLayer //! is displayed. Examples of modes are the "card" mode which displays detailed pin info -//! and the "minimzed" mode which is used to display a "toast" like mode of a pin. +//! and the "minimized" mode which is used to display a "toast" like mode of a pin. //! 2) LayoutLayers expose three more generic APIs: //! \ref layout_get_size which returns the size of the //! content within the layout as well as a generic constructor/destructor: //! \ref layout_create / \ref layout_destroy. //! 3) LayoutLayers are constructed from a set of Attributes which they are meant to display. -//! 4) Sub-types of LayoutLayer are instanciated by summoning the correct type ID rather than by +//! 4) Sub-types of LayoutLayer are instantiated by summoning the correct type ID rather than by //! calling a specialized constructor / destructor as per the Layer API. //! LayoutIds identify the type of a LayoutLayer. They are passed to the constructor to @@ -102,7 +102,7 @@ typedef struct LayoutLayer *(*LayoutLayerConstructor)(const LayoutLayerConfig *c typedef bool (*LayoutVerifier)(bool existing_attributes[]); #pragma push_macro("GSize") -#undef GSize // [FBO] ugly work around for rogue macro +#undef GSize // [FBO] ugly workaround for rogue macro //! Get the size of the content of a layout. This is defined by the length of the text and //! the size of the icons contained within the attributes. //! @param ctx a pointer to the GContext in which the layout is rendered diff --git a/src/fw/services/normal/timeline/notification_layout.c b/src/fw/services/normal/timeline/notification_layout.c index 1f3343dd..25bf0414 100644 --- a/src/fw/services/normal/timeline/notification_layout.c +++ b/src/fw/services/normal/timeline/notification_layout.c @@ -58,7 +58,7 @@ #define LAYOUT_MAX_HEIGHT 2500 #define CARD_MARGIN PBL_IF_ROUND_ELSE(12, 10) -// All paddings relate to padding above the object unless othersize noted +// All paddings relate to padding above the object unless another size is noted #define CARD_BOTTOM_PADDING 18 // The y-position of a layout frame when its banner is peeking #define BANNER_PEEK_STATIC_Y (DISP_ROWS - STATUS_BAR_LAYER_HEIGHT) diff --git a/src/fw/services/normal/timeline/reminders.h b/src/fw/services/normal/timeline/reminders.h index d357d0e4..27d54844 100644 --- a/src/fw/services/normal/timeline/reminders.h +++ b/src/fw/services/normal/timeline/reminders.h @@ -37,7 +37,7 @@ status_t reminders_insert(Reminder *reminder); status_t reminders_init(void); //! Delete a reminder -//! @param reminder_id pointer to an Id of the reminder to be deleted +//! @param reminder_id pointer to an ID of the reminder to be deleted //! @return S_SUCCESS or appropriate error status_t reminders_delete(ReminderId *reminder_id); diff --git a/src/fw/services/normal/timeline/timeline.h b/src/fw/services/normal/timeline/timeline.h index 971e7b4d..1e5e909c 100644 --- a/src/fw/services/normal/timeline/timeline.h +++ b/src/fw/services/normal/timeline/timeline.h @@ -59,7 +59,7 @@ bool timeline_exists(Uuid *id); //! Enables bulk action mode for ancs actions to avoid filling the event queue void timeline_enable_ancs_bulk_action_mode(bool enable); -//! Returns whether or not bulk actoin mode is enabled for ancs actions +//! Returns whether or not bulk action mode is enabled for ancs actions bool timeline_is_bulk_ancs_action_mode_enabled(void); //! invokes a timelineitem's action. This can end up triggering a bluetooth message. diff --git a/src/fw/services/normal/timeline/timeline_actions.c b/src/fw/services/normal/timeline/timeline_actions.c index d49f7f7c..966e7ce4 100644 --- a/src/fw/services/normal/timeline/timeline_actions.c +++ b/src/fw/services/normal/timeline/timeline_actions.c @@ -550,7 +550,7 @@ static ActionResultData *prv_invoke_remote_action(ActionMenu *action_menu, // To give the iOS app some context (let it do lookups), give it all the // info about the notification - // Copy every attribtue from the notification and add: + // Copy every attribute from the notification and add: // - Timestamp attribute const int num_extra_attributes = 1; const int num_attributes = pin->attr_list.num_attributes + num_extra_attributes; diff --git a/src/fw/services/normal/timeline/timeline_resources.h b/src/fw/services/normal/timeline/timeline_resources.h index 667df9b0..a9b059db 100644 --- a/src/fw/services/normal/timeline/timeline_resources.h +++ b/src/fw/services/normal/timeline/timeline_resources.h @@ -78,8 +78,8 @@ static inline GSize timeline_resources_get_gsize(TimelineResourceSize size) { } } -//! Tests if a given timeline resource id is a system resource -//! @param timeline_id Id of the timeline resource to test +//! Tests if a given timeline resource ID is a system resource +//! @param timeline_id ID of the timeline resource to test //! @return `true` if system resource, `false` if not bool timeline_resources_is_system(TimelineResourceId timeline_id); diff --git a/src/fw/services/normal/timezone_database.h b/src/fw/services/normal/timezone_database.h index 4465b658..7692cdff 100644 --- a/src/fw/services/normal/timezone_database.h +++ b/src/fw/services/normal/timezone_database.h @@ -42,7 +42,7 @@ typedef struct { char ds_label; //! Which day of the week this rule is observed. //! 0-indexed, starting with Sunday (ie Monday is 1, Tuesday is 2...). - //! A value of 255 indiciates that this rule applies to any day of the week. + //! A value of 255 indicates that this rule applies to any day of the week. uint8_t wday; //! A bitset of flags, see DSTRuleFlags. uint8_t flag; @@ -69,7 +69,7 @@ int timezone_database_get_region_count(void); //! the .dst_start and .dst_end members in tz_info uninitialized. //! //! @param The region ID to look up -//! @param tz_info[out] The TimezoneInfo strcuture to populate with the region +//! @param tz_info[out] The TimezoneInfo structure to populate with the region bool timezone_database_load_region_info(uint16_t region_id, TimezoneInfo *tz_info); //! Load a timezone name for a given region ID. diff --git a/src/fw/services/normal/voice/voice.c b/src/fw/services/normal/voice/voice.c index 8537783a..16909df8 100644 --- a/src/fw/services/normal/voice/voice.c +++ b/src/fw/services/normal/voice/voice.c @@ -308,7 +308,7 @@ VoiceSessionId voice_start_dictation(VoiceEndpointSessionType session_type) { return s_session_id; } -// Calling this will end the recording, disable the mic and and stop the audio transfer session. We +// Calling this will end the recording, disable the mic and stop the audio transfer session. We // expect voice_handle_dictation_result to be called next with a dictation response void voice_stop_dictation(VoiceSessionId session_id) { mutex_lock(s_lock); diff --git a/src/fw/services/normal/wakeup.c b/src/fw/services/normal/wakeup.c index f3e302c6..de282a45 100644 --- a/src/fw/services/normal/wakeup.c +++ b/src/fw/services/normal/wakeup.c @@ -74,7 +74,7 @@ struct prv_missed_events_s { }; struct prv_check_app_and_wakeup_event_s { - time_t wakeup_timestamp; //!< Timestamp of the WakupEntry + time_t wakeup_timestamp; //!< Timestamp of the WakeupEntry int wakeup_count; //!< wakeup event count for app, negative for error (StatusCode) }; @@ -302,7 +302,7 @@ static void prv_update_events_callback(SettingsFile *old_file, SettingsFile *new } else { if (entry.notify_if_missed) { if (missed_events->missed_app_ids == NULL) { - // This is allocated here, but free'd in the wakup_ui.h module + // This is allocated here, but free'd in the wakeup_ui.h module missed_events->missed_app_ids = kernel_malloc(NUM_APPS_ALERT_ON_BOOT * sizeof(AppInstallId)); } diff --git a/src/fw/services/prf/accessory/accessory_mfg_mode.h b/src/fw/services/prf/accessory/accessory_mfg_mode.h index df1dbf5b..f594e604 100644 --- a/src/fw/services/prf/accessory/accessory_mfg_mode.h +++ b/src/fw/services/prf/accessory/accessory_mfg_mode.h @@ -18,7 +18,7 @@ #include -//! Call this as you're just entering manufacturing mode to do initalial setup. +//! Call this as you're just entering manufacturing mode to do initial setup. void accessory_mfg_mode_start(void); //! Called on an ISR to handle a character from the accessory connector. diff --git a/src/fw/services/runlevel_impl.h b/src/fw/services/runlevel_impl.h index 7ce3b01d..ffbc70a9 100644 --- a/src/fw/services/runlevel_impl.h +++ b/src/fw/services/runlevel_impl.h @@ -24,7 +24,7 @@ // // The set of runlevels for which a service should be enabled is defined by // bitwise-OR-ing the RunLevelBit constants for every runlevel that the service -// should be enabled in to form an enable-mask. Testing whether a service should +// should be enabled to form an enable-mask. Testing whether a service should // be enabled for a given runlevel is simply // (enable_mask & (1 << runlevel) != 0). // diff --git a/src/fw/shell/normal/prefs.c b/src/fw/shell/normal/prefs.c index 3ecd4062..07a48800 100644 --- a/src/fw/shell/normal/prefs.c +++ b/src/fw/shell/normal/prefs.c @@ -187,7 +187,7 @@ static uint16_t s_timeline_peek_before_time_m = // If changing of the setting requires more than just setting a global, this handler is the // place to perform those other actions. // -// If the the handler gets passed a invalid new value, set its s_* global to a default value, +// If the handler gets passed a invalid new value, set its s_* global to a default value, // and return false. This will trigger a rewrite of the s_* global to the backing file. // // Each of these functions MUST be named using the following pattern because they are called diff --git a/src/fw/syscall/syscall.h b/src/fw/syscall/syscall.h index f261eefa..f57d3c20 100644 --- a/src/fw/syscall/syscall.h +++ b/src/fw/syscall/syscall.h @@ -269,7 +269,7 @@ void sys_process_get_wakeup_info(WakeupInfo *info); const PebbleProcessMd* sys_process_manager_get_current_process_md(void); //! Copy UUID for the current process. -//! @return True if the UUID was succesfully copied. +//! @return True if the UUID was successfully copied. bool sys_process_manager_get_current_process_uuid(Uuid *uuid_out); //! Get the AppInstallId for the current process diff --git a/src/fw/util/base64.c b/src/fw/util/base64.c index 9fd273e1..bc819557 100644 --- a/src/fw/util/base64.c +++ b/src/fw/util/base64.c @@ -48,7 +48,7 @@ unsigned int base64_decode_inplace(char* buffer, unsigned int length) { // Handle the padding if we broke out the loop early (0-2 '=' characters). const unsigned int padding_amount = 4 - quad_index; - if (padding_amount > 2) return 0; // Mades no sense to pad an entire triplet. + if (padding_amount > 2) return 0; // Makes no sense to pad an entire triplet. if (memcmp(buffer + read_index + quad_index, "==", padding_amount) != 0) return 0; // There are characters after our padding? // Chop off extra unused low bits if we're padded. diff --git a/src/fw/util/dict.h b/src/fw/util/dict.h index 7c1cf076..c575f5f2 100644 --- a/src/fw/util/dict.h +++ b/src/fw/util/dict.h @@ -322,7 +322,7 @@ Tuple * dict_read_first(DictionaryIterator *iter); //! See also \ref Tuple, with is the header of a serialized key/value pair. typedef struct Tuplet { //! The type of the Tuplet. This determines which of the struct fields in the - //! anonymomous union are valid. + //! anonymous union are valid. TupleType type; //! The key. uint32_t key; @@ -460,7 +460,7 @@ typedef void (*DictionaryKeyUpdatedCallback)(const uint32_t key, const Tuple *ne //! Merges entries from another "source" dictionary into a "destination" dictionary. //! All Tuples from the source are written into the destination dictionary, while -//! updating the exsting Tuples with matching keys. +//! updating the existing Tuples with matching keys. //! @param dest The destination dictionary to update //! @param [in,out] dest_max_size_in_out In: the maximum size of buffer backing `dest`. Out: the final size of the updated dictionary. //! @param source The source dictionary of which its Tuples will be used to update dest. diff --git a/src/fw/util/pstring.h b/src/fw/util/pstring.h index d890289f..d8195566 100644 --- a/src/fw/util/pstring.h +++ b/src/fw/util/pstring.h @@ -54,7 +54,7 @@ void pstring_pstring16_to_string(const PascalString16 *pstring, char *string_out //! Must be at least size (string + 1). void pstring_string_to_pstring16(char string[], PascalString16 *pstring_out); -//! Checks if 2 pstrings are euqual and returns true if so. +//! Checks if 2 pstrings are equal and returns true if so. //! @note returns false if either / both pstrings are NULL bool pstring_equal(const PascalString16 *ps1, const PascalString16 *ps2); diff --git a/src/fw/util/shared_circular_buffer.c b/src/fw/util/shared_circular_buffer.c index 8a8277f2..04462e62 100644 --- a/src/fw/util/shared_circular_buffer.c +++ b/src/fw/util/shared_circular_buffer.c @@ -24,7 +24,7 @@ // ------------------------------------------------------------------------------------------------- -// Returns the amount of data available for the given clien +// Returns the amount of data available for the given client static uint32_t prv_get_data_length(const SharedCircularBuffer* buffer, SharedCircularBufferClient *client) { uint32_t len; @@ -238,7 +238,7 @@ void subsampled_shared_circular_buffer_client_set_ratio( PBL_ASSERTN(numerator > 0 && denominator >= numerator); if (client->numerator != numerator || client->denominator != denominator) { // The subsampling algorithm does not need the subsampling ratio to - // be normalied to reduced form. + // be normalized to reduced form. client->numerator = numerator; client->denominator = denominator; // Initialize the state so that the next item in the buffer is copied, diff --git a/src/fw/util/shared_circular_buffer.h b/src/fw/util/shared_circular_buffer.h index 71a6fce1..6bbbe2db 100644 --- a/src/fw/util/shared_circular_buffer.h +++ b/src/fw/util/shared_circular_buffer.h @@ -59,7 +59,7 @@ bool shared_circular_buffer_write(SharedCircularBuffer* buffer, const uint8_t* d //! Add a read client //! @param buffer The buffer to add the client to -//! @param client Pointer to a client structure. This structure must be allocated by the caller and can not +//! @param client Pointer to a client structure. This structure must be allocated by the caller and cannot //! be freed until the client is removed //! @return true if successfully added bool shared_circular_buffer_add_client(SharedCircularBuffer* buffer, SharedCircularBufferClient *client); @@ -74,10 +74,10 @@ void shared_circular_buffer_remove_client(SharedCircularBuffer* buffer, SharedCi //! //! If the circular buffer wraps in the middle of the requested data, this function call will return true but will //! provide fewer bytes that requested. When this happens, the length_out parameter will be set to a value smaller -//! than length. A second read call can be made with the remaining smaller length to retreive the rest. +//! than length. A second read call can be made with the remaining smaller length to retrieve the rest. //! //! The reason this read doesn't consume is to avoid having to copy out the data. The data_out pointer should be -//! stable until you explicitely ask for it to be consumed with circular_buffer_consume. +//! stable until you explicitly ask for it to be consumed with circular_buffer_consume. //! //! @param buffer The buffer to read from //! @param client pointer to the client struct originally passed to circular_buffer_add_client @@ -130,7 +130,7 @@ typedef struct SubsampledSharedCircularBufferClient { //! //! @param buffer The buffer to add the client to //! @param client Pointer to a client structure. This structure must be -//! allocated by the caller and can not be freed until the client is +//! allocated by the caller and cannot be freed until the client is //! removed. //! @param subsample_numerator The numerator of the client's initial subsampling //! ratio. diff --git a/src/fw/util/time/time.h b/src/fw/util/time/time.h index cb05e992..5faa2715 100644 --- a/src/fw/util/time/time.h +++ b/src/fw/util/time/time.h @@ -47,7 +47,7 @@ #define TZ_LEN 6 // DST special cases. These map to indexes in the tools/timezones.py script that handles parsing -// the olsen database into a compressed form. Don't change these without changing the script. +// the olson database into a compressed form. Don't change these without changing the script. // // Note that we don't correctly handle Morroco's DST rules, they're incredibly complex due to them // suspending DST each year for Ramadan, resulting in 4 DST transitions each year. diff --git a/src/fw/vector_table.c b/src/fw/vector_table.c index 989417d1..98dd01d8 100644 --- a/src/fw/vector_table.c +++ b/src/fw/vector_table.c @@ -32,7 +32,7 @@ void Default_Handler(void) { // All these functions are weak references to the Default_Handler, // so if we define a handler in elsewhere in the firmware, these -// will be overriden +// will be overridden ALIAS("Default_Handler") void NMI_Handler(void); ALIAS("Default_Handler") void HardFault_Handler(void); ALIAS("Default_Handler") void MemManage_Handler(void); diff --git a/src/idl/nanopb/event.proto b/src/idl/nanopb/event.proto index 291e311b..7883efe0 100644 --- a/src/idl/nanopb/event.proto +++ b/src/idl/nanopb/event.proto @@ -36,9 +36,9 @@ message Event { required bytes uuid = 1; /// 16-byte uuid for efficient message size optional User user = 2; /// can usually be omitted and included in Requests required Type type = 4; /// string types are more sanely extensible, but enum types would be more typo resistant and smaller message size - required uint32 time_utc = 5; /// when the event occured (unix epoch seconds) + required uint32 time_utc = 5; /// when the event occurred (unix epoch seconds) required sint32 utc_to_local = 6; /// time_utc + utc_to_local = time_local. sint32 stores neg number efficiently. need to recast before adding to time_utc, but saves storage - optional uint32 created_time_utc = 7; /// events may be created at times other than their occurance + optional uint32 created_time_utc = 7; /// events may be created at times other than their occurrence optional uint32 duration = 8; /// in same units as time_utc (sec) optional LocationInfo location = 9; optional ActivitySession activity_session = 10; diff --git a/src/idl/nanopb/measurements.proto b/src/idl/nanopb/measurements.proto index 93ce0d8a..34c967f6 100644 --- a/src/idl/nanopb/measurements.proto +++ b/src/idl/nanopb/measurements.proto @@ -60,9 +60,9 @@ message MeasurementSet { Good = 6; Excellent = 7; } - enum Type { /// types of measuremetn samples we can take. minor changes to SI units to encode efficiently + enum Type { /// types of measurement samples we can take. minor changes to SI units to encode efficiently UnknownEvent = 0; /// Protocol Buffers uses the first enum as the default - TimeMS = 1; /// more percise time, in milliseconds + TimeMS = 1; /// more precise time, in milliseconds VMC = 2; /// Vector Magnitude Counts. Rough measure of total activity. Unitless Steps = 3; /// Accumulated steps. Unitless DistanceCM = 4; /// Distance traveled. In centimeters diff --git a/src/idl/nanopb/payload.proto b/src/idl/nanopb/payload.proto index 9c78f107..c5443627 100644 --- a/src/idl/nanopb/payload.proto +++ b/src/idl/nanopb/payload.proto @@ -17,10 +17,10 @@ Payloads are how data should be sent and collected from devices. A simple normal flow would be for a watch to generate Events and Measurements, bundle them into a Payload that is sent to mobile. Mobile would then take that payload, as well as events and measurements generated on the mobile device -itself, and bundle them into it's own Payload message to send to the +itself, and bundle them into its own Payload message to send to the Pipeline API -More complex patterns occur when the watch sends mupltiple Payloads, at +More complex patterns occur when the watch sends multiple Payloads, at different times, to the mobile before it gets a chance to send the data on to the web, or if multiple devices are connected simultaneously to one mobile device. @@ -39,7 +39,7 @@ import "measurements.proto"; message Payload { required Tier sender = 2; /// Tier info represents who is sending a message. Payloads are uniquely identified by sender and time - required uint32 send_time_utc = 3; /// latest send attmpt time + required uint32 send_time_utc = 3; /// latest send attempt time optional uint32 send_retry_count = 4; optional User user = 6; /// User info apply to all sub-messages contained repeated bytes payloads = 10; /// recursive payloads form a tree structure to store arbitrary message history efficiently diff --git a/src/include/bluetooth/bluetooth_types.h b/src/include/bluetooth/bluetooth_types.h index d19bb3fa..8a91a6fe 100644 --- a/src/include/bluetooth/bluetooth_types.h +++ b/src/include/bluetooth/bluetooth_types.h @@ -27,7 +27,7 @@ typedef enum { //! The operation was successful. BTErrnoOK = 0, - //! Connection established succesfully. + //! Connection established successfully. BTErrnoConnected = BTErrnoOK, //! One or more parameters were invalid. @@ -109,7 +109,7 @@ typedef enum { BLEGATTErrorPrepareQueueFull = 0x09, BLEGATTErrorAttributeNotFound = 0x0A, BLEGATTErrorAttributeNotLong = 0x0B, - BLEGATTErrorInsufficientEncrpytionKeySize = 0x0C, + BLEGATTErrorInsufficientEncryptionKeySize = 0x0C, BLEGATTErrorInvalidAttributeValueLength = 0x0D, BLEGATTErrorUnlikelyError = 0x0E, BLEGATTErrorInsufficientEncryption = 0x0F, @@ -237,7 +237,7 @@ typedef struct __attribute__((__packed__)) BTDeviceInternal { _Static_assert(sizeof(BTDeviceInternal) == sizeof(BTDevice), "BTDeviceInternal should be equal in size to BTDevice"); -//! Opaque data structure representing an advertisment report and optional +//! Opaque data structure representing an advertisement report and optional //! scan response. Use the ble_ad... functions to query its contents. struct BLEAdData; @@ -257,10 +257,10 @@ struct BLEAdData; #define LL_CONN_INTV_MAX_SLOTS (3200) // 1.25ms / slot #define LL_SUPERVISION_TIMEOUT_MIN_MS (100) -//! Advertisment and scan response data +//! Advertisement and scan response data //! @internal Exported as forward struct typedef struct BLEAdData { - //! Lengths of the raw advertisment data + //! Lengths of the raw advertisement data uint8_t ad_data_length; //! Lengths of the raw scan response data diff --git a/src/include/bluetooth/bonding_sync.h b/src/include/bluetooth/bonding_sync.h index d906642f..9ee55ebe 100644 --- a/src/include/bluetooth/bonding_sync.h +++ b/src/include/bluetooth/bonding_sync.h @@ -47,7 +47,7 @@ void bt_driver_handle_host_added_bonding(const BleBonding *bonding); //! Called by the FW when a bonding is removed (i.e. user "Forgot" a bonding from Settings). void bt_driver_handle_host_removed_bonding(const BleBonding *bonding); -//! Called by the BT driver after succesfully pairing a new device. +//! Called by the BT driver after successfully pairing a new device. //! @param addr The address that is used to refer to the connection. This is used to associate //! the bonding with the GAPLEConnection. extern void bt_driver_cb_handle_create_bonding(const BleBonding *bonding, diff --git a/src/include/bluetooth/gatt.h b/src/include/bluetooth/gatt.h index 6ace2d22..6ad719e7 100644 --- a/src/include/bluetooth/gatt.h +++ b/src/include/bluetooth/gatt.h @@ -96,15 +96,15 @@ typedef struct GattClientOpResponseHdr { void *context; } GattClientOpResponseHdr; -typedef struct GattClientOpReadReponse { +typedef struct GattClientOpReadResponse { GattClientOpResponseHdr hdr; uint16_t value_length; uint8_t *value; -} GattClientOpReadReponse; +} GattClientOpReadResponse; -typedef struct GattClientOpWriteReponse { +typedef struct GattClientOpWriteResponse { GattClientOpResponseHdr hdr; -} GattClientOpWriteReponse; +} GattClientOpWriteResponse; // -- Gatt Data Structures diff --git a/src/include/bluetooth/pebble_bt.h b/src/include/bluetooth/pebble_bt.h index 11a50fd9..6b63e48e 100644 --- a/src/include/bluetooth/pebble_bt.h +++ b/src/include/bluetooth/pebble_bt.h @@ -25,7 +25,7 @@ //! Bluetopia does not contain our Vendor ID, yet. //! See Bluetooth Company Identifiers: //! http://www.bluetooth.org/Technical/AssignedNumbers/identifiers.htm -//! Be careful not to use with with BT Classic! See sdp.c why. +//! Be careful not to use with BT Classic! See sdp.c why. #define PEBBLE_BT_VENDOR_ID (0x0154) //! Our Bluetooth-SIG-Registered 16-bit UUID: diff --git a/src/include/bluetooth/pebble_pairing_service.h b/src/include/bluetooth/pebble_pairing_service.h index c744bac8..47c7dadf 100644 --- a/src/include/bluetooth/pebble_pairing_service.h +++ b/src/include/bluetooth/pebble_pairing_service.h @@ -83,7 +83,7 @@ typedef struct PACKED { //! @note Not available in Bluetopia/cc2564x implementation //! Flag to indicate that when re-pairing this device, the re-pairing should be accepted //! automatically for this remote device (matching IRK or matching identity address). - //! @note This is a work-around for an Android 4.4.x bug. This opens up a security hole :( where + //! @note This is a workaround for an Android 4.4.x bug. This opens up a security hole :( where //! a phone could pretend to be the "trusted" phone and pair w/o the user even knowing about it. //! @see https://pebbletechnology.atlassian.net/browse/PBL-39369 bool should_auto_accept_re_pairing:1; @@ -220,7 +220,7 @@ _Static_assert(sizeof(PebblePairingServiceConnectivityStatus) <= 20, "Larger tha typedef struct GAPLEConnection GAPLEConnection; -//! Signals to the Pebble GATT service that status change has occured (pairing, encryption, ...), +//! Signals to the Pebble GATT service that status change has occurred (pairing, encryption, ...), //! allowing it to notify any BLE devices that are subscribed to connectivity status updates of the //! change. //! @param connection The connection for which the status was changed. diff --git a/src/include/bluetooth/reconnect.h b/src/include/bluetooth/reconnect.h index c3060033..36a9df22 100644 --- a/src/include/bluetooth/reconnect.h +++ b/src/include/bluetooth/reconnect.h @@ -29,7 +29,7 @@ void bt_driver_reconnect_resume(void); //! Attempt to reconnect to the last connected remote device and restore //! connections to the Bluetooth Classic profile (iSPP). -//! This is an asynchonous operation. A call to this function returns quickly. +//! This is an asynchronous operation. A call to this function returns quickly. //! If the last connected remote device and services are already connected, or //! if the device is not an iOS device, this function does not do much. //! @param ignore_paused If true, this call will attempt to reconnect, diff --git a/src/include/logging/log_hashing.h b/src/include/logging/log_hashing.h index 1e7cb2de..b8b8c5b2 100644 --- a/src/include/logging/log_hashing.h +++ b/src/include/logging/log_hashing.h @@ -26,7 +26,7 @@ * isn't compiled into the final firmware binary image. * * Token format: - * The token is acually a packed uint32_t. The format is as follows: + * The token is actually a packed uint32_t. The format is as follows: * 31-29: num fmt conversions [0-7] * 28-26: string index 2 [0-7], 1 based. 0 if no second string. 1-7 otherwise * 25-23: string index 1 [0-7], 1 based. 0 if no first string. 1-7 otherwise @@ -34,7 +34,7 @@ * 19: reserved * 18- 0: Offset info .log_strings section. This allows 512 KB of strings. * - * Note: it might not be necessary to use so many bits for the log level. Dynamic flitering might + * Note: it might not be necessary to use so many bits for the log level. Dynamic filtering might * not be so important, and 'log to flash' could be 1 bit, or Curried to a set of function calls. * These changes would require more work in the logging infrastructure. * @@ -96,11 +96,11 @@ #define PACKED_NUM_FMT_OFFSET 29 // 3 bits - Number format conversions #define PACKED_NUM_FMT_MASK 0x07 -#define PACKED_STR1FMT_OFFSET 26 // 3 bits - indicies of string parameter 1 format conversion +#define PACKED_STR1FMT_OFFSET 26 // 3 bits - indices of string parameter 1 format conversion #define PACKED_STR1FMT_MASK 0x07 -#define PACKED_STR2FMT_OFFSET 23 // 3 bits - indicies of string parameter 2 format conversion +#define PACKED_STR2FMT_OFFSET 23 // 3 bits - indices of string parameter 2 format conversion #define PACKED_STR2FMT_MASK 0x07 -#define PACKED_STRFMTS_OFFSET 23 // 6 bits - indicies of string parameters 1 & 2. +#define PACKED_STRFMTS_OFFSET 23 // 6 bits - indices of string parameters 1 & 2. #define PACKED_STRFMTS_MASK 0x3f #define PACKED_LEVEL_OFFSET 20 // 3 bits - log level #define PACKED_LEVEL_MASK 0x07 @@ -169,7 +169,7 @@ ALWAYS_INLINE static uint32_t LOG_SECTION_OFFSET(const uint8_t level, const char } // Search for an 's' character succeeding the % characters in fmt. s1-s7 point to the first 's' - // charactres in fmt after the previously found % characters (or NULL if there aren't 7 's' + // characters in fmt after the previously found % characters (or NULL if there aren't 7 's' // characters in fmt). if (p1) s1 = __builtin_strchr(p1, 's'); if (p2) s2 = __builtin_strchr(p2, 's'); @@ -196,7 +196,7 @@ ALWAYS_INLINE static uint32_t LOG_SECTION_OFFSET(const uint8_t level, const char return 0; } - // Format the (maximum) two string parameter indicies as: + // Format the (maximum) two string parameter indices as: // (1-based index of first %s << 3) | (1-based index of second %s << 0) // If there is only one %s parameter, the index will be formatted as: // (1-based index of first %s << 0) @@ -207,7 +207,7 @@ ALWAYS_INLINE static uint32_t LOG_SECTION_OFFSET(const uint8_t level, const char const int a5 = ps5 ? (a4 << 3) + 5 : a4; const int a6 = ps6 ? (a5 << 3) + 6 : a5; const int a7 = ps7 ? (a6 << 3) + 7 : a6; - const int string_indicies = a7; + const int string_indices = a7; // Convert level to packed_level @@ -226,7 +226,7 @@ ALWAYS_INLINE static uint32_t LOG_SECTION_OFFSET(const uint8_t level, const char const uint32_t offset = (((num_params & PACKED_NUM_FMT_MASK) << PACKED_NUM_FMT_OFFSET) | ((packed_level & PACKED_LEVEL_MASK) << PACKED_LEVEL_OFFSET) | - ((string_indicies & PACKED_STRFMTS_MASK) << PACKED_STRFMTS_OFFSET)); + ((string_indices & PACKED_STRFMTS_MASK) << PACKED_STRFMTS_OFFSET)); return (offset - LOG_STRINGS_SECTION_ADDRESS); } diff --git a/src/include/pebbleos/chip_id.h b/src/include/pebbleos/chip_id.h index 4048bcc5..1e3a543e 100644 --- a/src/include/pebbleos/chip_id.h +++ b/src/include/pebbleos/chip_id.h @@ -20,7 +20,7 @@ * chip_id.h * * This file specifies IDs for the different processors on our multi-processor devices. - * The IDs are used to differenetiate the source of system logs, core dumps, etc. + * The IDs are used to differentiate the source of system logs, core dumps, etc. * * The IDs must be unique within a platform and must fit in 2 bits. * If we build a device with more than 4 log/core dump producing processors, this will need to be diff --git a/src/libos/mcu/interrupts_arm.c b/src/libos/mcu/interrupts_arm.c index 1f8519a3..b27b1c8c 100644 --- a/src/libos/mcu/interrupts_arm.c +++ b/src/libos/mcu/interrupts_arm.c @@ -17,6 +17,6 @@ #include "mcu/interrupts.h" bool mcu_state_are_interrupts_enabled(void) { - // When this bit is set, all interrupts (of configureable priority) are disabled + // When this bit is set, all interrupts (of configurable priority) are disabled return ((__get_PRIMASK() & 0x1) == 0x0); } diff --git a/src/libutil/circular_buffer.c b/src/libutil/circular_buffer.c index f56ed7ed..fb511a37 100644 --- a/src/libutil/circular_buffer.c +++ b/src/libutil/circular_buffer.c @@ -53,7 +53,7 @@ bool circular_buffer_write(CircularBuffer* buffer, const void* data, uint16_t le uint16_t write_index = get_write_index(buffer); - // Update the data_length member now beforce we muck with the length parameter + // Update the data_length member now before we muck with the length parameter buffer->data_length += length; const uint16_t remaining_length = buffer->buffer_size - write_index; @@ -143,8 +143,8 @@ bool circular_buffer_read_or_copy(const CircularBuffer* buffer, uint8_t **data_o if (buffer->data_length < length) { return false; } - const uint16_t continguous_length = (buffer->buffer_size - buffer->read_index); - const bool should_malloc_and_copy = (length > continguous_length); + const uint16_t contiguous_length = (buffer->buffer_size - buffer->read_index); + const bool should_malloc_and_copy = (length > contiguous_length); *caller_should_free = should_malloc_and_copy; if (should_malloc_and_copy) { *data_out = (uint8_t *) malloc_imp(length); diff --git a/src/libutil/heap.c b/src/libutil/heap.c index 73c7adff..6667e672 100644 --- a/src/libutil/heap.c +++ b/src/libutil/heap.c @@ -33,7 +33,7 @@ typedef unsigned long Alignment_t; /* specified size if the alignment data. */ #define ALIGNMENT_SIZE sizeof(Alignment_t) -/* The following structure is used to allign data fragments on a */ +/* The following structure is used to align data fragments on a */ /* specified memory boundary. */ typedef union _tagAlignmentStruct_t { @@ -53,7 +53,7 @@ typedef union _tagAlignmentStruct_t /* The following defines the minimum size (in alignment units) of a */ /* fragment that is considered useful. The value is used when trying*/ /* to determine if a fragment that is larger than the requested size */ -/* can be broken into 2 framents leaving a fragment that is of the */ +/* can be broken into 2 fragments leaving a fragment that is of the */ /* requested size and one that is at least as larger as the */ /* MINIMUM_MEMORY_SIZE. */ #define MINIMUM_MEMORY_SIZE 1 @@ -62,13 +62,13 @@ typedef union _tagAlignmentStruct_t /* fragment. */ typedef struct _tagHeapInfo_t { - //! Size of the preceding segment, measured in units of ALIGNMENT_SIZE, including the size of this beginer + //! Size of the preceding segment, measured in units of ALIGNMENT_SIZE, including the size of this header uint16_t PrevSize; //! Whether or not this block is currently allocated (vs being free). bool is_allocated:1; - //! Size of this segment, measured in units of ALIGNMENT_SIZE, including this size of this beginer + //! Size of this segment, measured in units of ALIGNMENT_SIZE, including this size of this header uint16_t Size:15; #ifdef MALLOC_INSTRUMENTATION @@ -81,10 +81,10 @@ typedef struct _tagHeapInfo_t } HeapInfo_t; -//! The size of a block in units of Alignment_t, including the beginer and including _x words of data. +//! The size of a block in units of Alignment_t, including the header and including _x words of data. #define HEAP_INFO_BLOCK_SIZE(_x) ((offsetof(HeapInfo_t, Data) / ALIGNMENT_SIZE) + (_x)) -//! Convert a pointer to the Data member to a pointer to the HeapInfo_t beginer +//! Convert a pointer to the Data member to a pointer to the HeapInfo_t header #define HEAP_INFO_FOR_PTR(ptr) (HeapInfo_t *)(((Alignment_t *)ptr) - HEAP_INFO_BLOCK_SIZE(0)) _Static_assert((offsetof(HeapInfo_t, Data) % ALIGNMENT_SIZE) == 0, "Heap not properly aligned."); @@ -241,7 +241,7 @@ void *heap_malloc(Heap* const heap, unsigned long nbytes, uintptr_t client_pc) { /* size. */ unsigned long allocation_size = (nbytes + (ALIGNMENT_SIZE - 1)) / ALIGNMENT_SIZE; - /* Add the beginer size to the requested size. */ + /* Add the header size to the requested size. */ allocation_size += HEAP_INFO_BLOCK_SIZE(0); /* Verify that the requested size is valid */ @@ -336,7 +336,7 @@ void heap_free(Heap* const heap, void *ptr, uintptr_t client_pc) { /* Check to see if the previous segment can be combined. */ if(!previous_block->is_allocated) { - /* Add the segment to be freed to the new beginer. */ + /* Add the segment to be freed to the new header. */ previous_block->Size += heap_info_ptr->Size; /* Set the pointer to the beginning of the previous */ @@ -369,11 +369,11 @@ void heap_free(Heap* const heap, void *ptr, uintptr_t client_pc) { heap_info_ptr->Size += next_block->Size; /* Since we merged the next segment, we have to update*/ - /* the next next segment's PrevSize field. */ + /* the next segment's PrevSize field. */ HeapInfo_t *next_next_block = get_next_block(heap, heap_info_ptr); /* If we are pointing at the end of the heap, then use*/ - /* the begin as the next next segment. */ + /* the begin as the next segment. */ if(next_next_block == heap->end) { heap->begin->PrevSize = heap_info_ptr->Size; } @@ -449,7 +449,7 @@ static HeapInfo_t *find_segment(Heap* const heap, unsigned long n_units) { /* If the requested size is larger than the limit then*/ /* search backwards for an available buffer, else go */ /* forward. This will hopefully help to reduce */ - /* fragmentataion problems. */ + /* fragmentation problems. */ if (n_units >= LARGE_SIZE) { heap_info_ptr = get_previous_block(heap, heap_info_ptr); } else { @@ -470,7 +470,7 @@ static HeapInfo_t *find_segment(Heap* const heap, unsigned long n_units) { //! Split a block into two smaller blocks, returning a pointer to the new second block. //! The first block will be available at the same location as before, but with a smaller size. //! Assumes the block is big enough to be split and is unallocated. -//! @param first_part_size the size of the new block, in ALIGNMENT_SIZE units, including the beginer +//! @param first_part_size the size of the new block, in ALIGNMENT_SIZE units, including the header static HeapInfo_t* split_block(Heap *heap, HeapInfo_t* block, size_t first_part_size) { HeapInfo_t* second_block = (HeapInfo_t*) (((Alignment_t*) block) + first_part_size); @@ -495,7 +495,7 @@ static HeapInfo_t* split_block(Heap *heap, HeapInfo_t* block, size_t first_part_ } //! Allocated the block in the given HeapInfo_t segment. -//! @param n_units number of ALIGNMENT_SIZE units this segment requires (including space for the beginer). +//! @param n_units number of ALIGNMENT_SIZE units this segment requires (including space for the header). //! @param heap_info_ptr the segment where the block should be allocated. static HeapInfo_t *allocate_block(Heap* const heap, unsigned long n_units, HeapInfo_t* heap_info_ptr) { // Make sure we can use all or part of this block for this allocation. diff --git a/src/libutil/includes/util/circular_buffer.h b/src/libutil/includes/util/circular_buffer.h index e2e5250c..399f0f57 100644 --- a/src/libutil/includes/util/circular_buffer.h +++ b/src/libutil/includes/util/circular_buffer.h @@ -51,7 +51,7 @@ bool circular_buffer_write(CircularBuffer* buffer, const void* data, uint16_t le //! @note After the client is done writing data, it _must_ call circular_buffer_write_finish() //! so that the CircularBuffer can update the length of the data it contains and update its internal //! bookkeeping -//! @param[out] data_out Pointer to storage for the pointer that is set the the start of the +//! @param[out] data_out Pointer to storage for the pointer that is set the start of the //! writable area when the function returns, or NULL if there is no space available. //! @return The maximum number of bytes that can be written starting at the returned the pointer. //! Zero is returned when there is no space available. @@ -59,7 +59,7 @@ uint16_t circular_buffer_write_prepare(CircularBuffer *buffer, uint8_t **data_ou //! To be used after circular_buffer_write_prepare(), to make the CircularBuffer update the length //! of the data it contains. -//! @param written_length The length that has just been writted at the pointer provided by +//! @param written_length The length that has just been written at the pointer provided by //! circular_buffer_write_prepare(). void circular_buffer_write_finish(CircularBuffer *buffer, uint16_t written_length); @@ -68,10 +68,10 @@ void circular_buffer_write_finish(CircularBuffer *buffer, uint16_t written_lengt //! //! If the circular buffer wraps in the middle of the requested data, this function call will return true but will //! provide fewer bytes that requested. When this happens, the length_out parameter will be set to a value smaller -//! than length. A second read call can be made with the remaining smaller length to retreive the rest. +//! than length. A second read call can be made with the remaining smaller length to retrieve the rest. //! //! The reason this read doesn't consume is to avoid having to copy out the data. The data_out pointer should be -//! stable until you explicitely ask for it to be consumed with circular_buffer_consume. +//! stable until you explicitly ask for it to be consumed with circular_buffer_consume. //! //! @param buffer The buffer to read from //! @param length How many bytes to read diff --git a/src/libutil/includes/util/heap.h b/src/libutil/includes/util/heap.h index 1127142a..f9c7caa2 100644 --- a/src/libutil/includes/util/heap.h +++ b/src/libutil/includes/util/heap.h @@ -43,9 +43,9 @@ typedef struct Heap { HeapInfo_t *begin; HeapInfo_t *end; - //! Number of allocated bytes, including beginers + //! Number of allocated bytes, including headers unsigned int current_size; - //! Peak number of allocated bytes, including beginers + //! Peak number of allocated bytes, including headers unsigned int high_water_mark; HeapLockImpl lock_impl; @@ -111,7 +111,7 @@ void* heap_realloc(Heap* const heap, void *ptr, unsigned long nbytes, uintptr_t //! are zero'd. void* heap_zalloc(Heap* const heap, size_t size, uintptr_t client_pc); -//! Allocate a buffer to hold an array of count elements, each of size size (in bytes) +//! Allocate a buffer to hold an array of count elements, each of size (in bytes) //! and initializes all bits to zero. void* heap_calloc(Heap* const heap, size_t count, size_t size, uintptr_t client_pc); diff --git a/src/libutil/includes/util/list.h b/src/libutil/includes/util/list.h index 4e1efff3..6af1033e 100644 --- a/src/libutil/includes/util/list.h +++ b/src/libutil/includes/util/list.h @@ -28,7 +28,7 @@ typedef struct ListNode { typedef bool (*ListFilterCallback)(ListNode *found_node, void *data); //! - If a callback returns true, the iteration continues -//! - If a callback returns false, the ieration stops. +//! - If a callback returns false, the iteration stops. typedef bool (*ListForEachCallback)(ListNode *node, void *context); #define LIST_NODE_NULL { .next = NULL, .prev = NULL } diff --git a/src/libutil/includes/util/math.h b/src/libutil/includes/util/math.h index dc8dfdb9..4fbe2f73 100644 --- a/src/libutil/includes/util/math.h +++ b/src/libutil/includes/util/math.h @@ -88,7 +88,7 @@ static inline int distance_to_mod_boundary(int32_t i, uint16_t n) { } /** - * Compute the next backoff interval using a bounded binary expoential backoff formula. + * Compute the next backoff interval using a bounded binary exponential backoff formula. * * @param[in,out] attempt The number of retries performed so far. This count will be incremented by the function. * @param[in] initial_value The inital backoff interval. Subsequent backoff attempts will be this number multiplied by a power of 2. diff --git a/src/libutil/includes/util/math_fixed.h b/src/libutil/includes/util/math_fixed.h index 312a2830..d171e314 100644 --- a/src/libutil/includes/util/math_fixed.h +++ b/src/libutil/includes/util/math_fixed.h @@ -158,7 +158,7 @@ static __inline__ Fixed_S64_32 Fixed_S64_32_sub(Fixed_S64_32 a, Fixed_S64_32 b) //////////////////////////////////////////////////////////////// /// Mixed operations //////////////////////////////////////////////////////////////// -// This function muliples a Fixed_S16_3 and Fixed_S32_16 and returns result in Fixed_S16_3 format +// This function multiplies a Fixed_S16_3 and Fixed_S32_16 and returns result in Fixed_S16_3 format static __inline__ Fixed_S16_3 Fixed_S16_3_S32_16_mul(Fixed_S16_3 a, Fixed_S32_16 b) { return Fixed_S16_3( a.raw_value * b.raw_value >> FIXED_S32_16_PRECISION ); } diff --git a/src/libutil/math_fixed.c b/src/libutil/math_fixed.c index a147873e..8c28d07e 100644 --- a/src/libutil/math_fixed.c +++ b/src/libutil/math_fixed.c @@ -35,7 +35,7 @@ Fixed_S64_32 math_fixed_recursive_filter(Fixed_S64_32 x, ytmp = Fixed_S64_32_add(ytmp, Fixed_S64_32_mul(cb[i], state_x[i])); } - // Factor in the y * a coeficients + // Factor in the y * a coefficients for (int i = 0; i < num_output_coefficients; i++) { ytmp = Fixed_S64_32_sub(ytmp, Fixed_S64_32_mul(ca[i], state_y[i])); } diff --git a/src/libutil/trig.c b/src/libutil/trig.c index 5f7cfd94..cfab8c1b 100644 --- a/src/libutil/trig.c +++ b/src/libutil/trig.c @@ -548,7 +548,7 @@ static const uint16_t ATAN_LOOKUP[] = { int32_t sin_lookup(int32_t angle) { int32_t mult = 1; - // modify the input angle and output multiplier for use in a first quadrent sine lookup + // modify the input angle and output multiplier for use in a first quadrant sine lookup if (angle < 0) { angle = -angle; mult = -mult; diff --git a/tests/fakes/fake_GAPAPI.c b/tests/fakes/fake_GAPAPI.c index 1f317e4b..2fb44ce3 100644 --- a/tests/fakes/fake_GAPAPI.c +++ b/tests/fakes/fake_GAPAPI.c @@ -114,7 +114,7 @@ static unsigned long s_le_create_connection_callback_param; int GAP_LE_Create_Connection(unsigned int BluetoothStackID, unsigned int ScanInterval, unsigned int ScanWindow, - GAP_LE_Filter_Policy_t InitatorFilterPolicy, + GAP_LE_Filter_Policy_t InitiatorFilterPolicy, GAP_LE_Address_Type_t RemoteAddressType, BD_ADDR_t *RemoteDevice, GAP_LE_Address_Type_t LocalAddressType, @@ -207,7 +207,7 @@ int GAP_LE_Cancel_Create_Connection(unsigned int BluetoothStackID) { return 0; } -// Puts the event that the BT Controller will emit after a succesfull +// Puts the event that the BT Controller will emit after a successful // GAP_LE_Cancel_Create_Connection call. void fake_gap_le_put_cancel_create_event(const BTDeviceInternal *device, bool is_master) { fake_gap_put_connection_event(HCI_ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER, diff --git a/tests/fixtures/activity/sleep_samples/pbl-25945.c b/tests/fixtures/activity/sleep_samples/pbl-25945.c index 21dc85be..44c72e68 100644 --- a/tests/fixtures/activity/sleep_samples/pbl-25945.c +++ b/tests/fixtures/activity/sleep_samples/pbl-25945.c @@ -46,7 +46,7 @@ AlgDlsMinuteData *activity_sample_2015_09_30_23_04_00(int *len) { //> TEST_IN_DEEP_SLEEP_MAX 0 //> TEST_WEIGHT 1.0 - // list of: {steps, orientation, vmc, ligh} + // list of: {steps, orientation, vmc, light} static AlgDlsMinuteData samples[] = { { 11, 0x56, 990, 0x0}, { 0, 0x47, 261, 0x0}, diff --git a/tests/fixtures/activity/sleep_samples/pbl-27896.c b/tests/fixtures/activity/sleep_samples/pbl-27896.c index 9f057869..b68e8ad1 100644 --- a/tests/fixtures/activity/sleep_samples/pbl-27896.c +++ b/tests/fixtures/activity/sleep_samples/pbl-27896.c @@ -46,7 +46,7 @@ AlgDlsMinuteData *activity_sample_2015_10_08_18_58_01(int *len) { //> TEST_IN_DEEP_SLEEP_MAX 0 //> TEST_WEIGHT 1.0 - // list of: {steps, orientation, vmc, ligh} + // list of: {steps, orientation, vmc, light} static AlgDlsMinuteData samples[] = { { 0, 0x55, 148, 0x0}, { 8, 0x55, 374, 0x0}, diff --git a/tests/fixtures/activity/sleep_samples/pbl-27921.c b/tests/fixtures/activity/sleep_samples/pbl-27921.c index 85218478..c8ea79c9 100644 --- a/tests/fixtures/activity/sleep_samples/pbl-27921.c +++ b/tests/fixtures/activity/sleep_samples/pbl-27921.c @@ -46,7 +46,7 @@ AlgDlsMinuteData *activity_sample_2015_10_08_12_35_00(int *len) { //> TEST_IN_DEEP_SLEEP_MAX 0 //> TEST_WEIGHT 1.0 - // list of: {steps, orientation, vmc, ligh} + // list of: {steps, orientation, vmc, light} static AlgDlsMinuteData samples[] = { { 0, 0x0, 0, 0x2}, { 9, 0x7d, 1496, 0x0}, diff --git a/tests/fixtures/activity/sleep_samples/pbl-27937.c b/tests/fixtures/activity/sleep_samples/pbl-27937.c index a2f20459..a0acf65e 100644 --- a/tests/fixtures/activity/sleep_samples/pbl-27937.c +++ b/tests/fixtures/activity/sleep_samples/pbl-27937.c @@ -43,7 +43,7 @@ AlgDlsMinuteData *activity_sample_2015_10_07_14_39_00(int *len) { //> TEST_IN_DEEP_SLEEP_MAX 0 //> TEST_WEIGHT 1.0 - // list of: {steps, orientation, vmc, ligh} + // list of: {steps, orientation, vmc, light} static AlgDlsMinuteData samples[] = { { 0, 0x72, 1836, 0x0}, { 71, 0x5f, 4438, 0x0}, diff --git a/tests/fixtures/activity/sleep_samples/sleep_samples_v1.c b/tests/fixtures/activity/sleep_samples/sleep_samples_v1.c index 8bce792e..c252e85b 100644 --- a/tests/fixtures/activity/sleep_samples/sleep_samples_v1.c +++ b/tests/fixtures/activity/sleep_samples/sleep_samples_v1.c @@ -2671,7 +2671,7 @@ AlgDlsMinuteData *activity_sample_sleep_v1_3(int *len) { // ---------------------------------------------------------------- // Sample captured at: 2015-08-22 19:57:00 local, 2015-08-23 02:57:00 GMT -// Accroding to misfit: +// According to misfit: // total sleep: 374 min // deep: 200 min // light: 174 min diff --git a/tests/fixtures/activity/sleep_samples/sleep_shut_down.c b/tests/fixtures/activity/sleep_samples/sleep_shut_down.c index 1ef4c4b2..0e0e44e5 100644 --- a/tests/fixtures/activity/sleep_samples/sleep_shut_down.c +++ b/tests/fixtures/activity/sleep_samples/sleep_shut_down.c @@ -17,7 +17,7 @@ // DESCRIPTION: // This test stops towards the end of a regular sleep session. - // - Test that we have an orarching Sleep session that starts around 75-90 and lasts + // - Test that we have an overarching Sleep session that starts around 75-90 and lasts // until we shut activity down // - Test that we have 3 full deep sleep sessions. // ---------------------------------------------------------------- @@ -897,7 +897,7 @@ // DESCRIPTION: // This test stops towards the end of a deep sleep session. - // - Test that we have an orarching Sleep session that starts around 75-90 and lasts + // - Test that we have an overarching Sleep session that starts around 75-90 and lasts // until we shut activity down // - Test that we have 2 full deep sleep sessions, and cut off the one in progress at // 18-19 minutes into it. It should not be saved. We judge this based on total time @@ -1779,8 +1779,8 @@ // DESCRIPTION: // This test stops in the middle of a deep sleep session. - // - Test that we have an orarching Sleep session that starts around 75-90 and lasts - // until we shuwn activity down + // - Test that we have an overarching Sleep session that starts around 75-90 and lasts + // until we shut activity down // - Test that we have 2 full deep sleep sessions, and cut off the one in progress at // ~22 minutes into it. It should be saved. We judge this based on total time // in deep sleep diff --git a/tests/fw/applib/bluetooth/test_ble_ad_parse.c b/tests/fw/applib/bluetooth/test_ble_ad_parse.c index 7a28d09b..32cd6c91 100644 --- a/tests/fw/applib/bluetooth/test_ble_ad_parse.c +++ b/tests/fw/applib/bluetooth/test_ble_ad_parse.c @@ -91,7 +91,7 @@ void test_ble_ad_parse__16_bit_uuid_and_device_name(void) { Uuid missing_uuid = bt_uuid_expand_16bit(0xabcd); cl_assert(!ble_ad_includes_service(s_ad_data, &missing_uuid)); - // Test ble_ad_copy_service_uuids, destination array sized larged enough: + // Test ble_ad_copy_service_uuids, destination array sized large enough: const uint8_t count = 4; Uuid copied_uuids[count]; uint8_t found = ble_ad_copy_service_uuids(s_ad_data, copied_uuids, count); diff --git a/tests/fw/applib/test_app_smartstrap.c b/tests/fw/applib/test_app_smartstrap.c index c30ef70b..82337e81 100644 --- a/tests/fw/applib/test_app_smartstrap.c +++ b/tests/fw/applib/test_app_smartstrap.c @@ -183,7 +183,7 @@ void test_app_smartstrap__invalid_args(void) { } void test_app_smartstrap__check_ids(void) { - // craete an attribute + // create an attribute SmartstrapAttribute *attr = app_smartstrap_attribute_create(0x1111, 0x2222, 100); cl_assert(attr != NULL); diff --git a/tests/fw/apps/system_apps/workout/test_workout_active.c b/tests/fw/apps/system_apps/workout/test_workout_active.c index 22fc5fcf..8f56142c 100644 --- a/tests/fw/apps/system_apps/workout/test_workout_active.c +++ b/tests/fw/apps/system_apps/workout/test_workout_active.c @@ -175,8 +175,8 @@ void test_workout_active__cleanup(void) { ////////////////////// static void prv_create_window_and_render(WorkoutActiveWindow *active_window, - int seconday_metric_idx) { - for (int i = 0; i < seconday_metric_idx; i++) { + int secondary_metric_idx) { + for (int i = 0; i < secondary_metric_idx; i++) { prv_cycle_scrollable_metrics(active_window); } diff --git a/tests/fw/comm/test_ams.c b/tests/fw/comm/test_ams.c index e1728386..f6bed6c4 100644 --- a/tests/fw/comm/test_ams.c +++ b/tests/fw/comm/test_ams.c @@ -80,7 +80,7 @@ void launcher_task_add_callback(void (*callback)(void *data), void *data) { s_launcher_task_callback_data = data; } -// Tests: Disover AMS +// Tests: Discover AMS /////////////////////////////////////////////////////////// #define NUM_AMS_INSTANCES 2 static BLECharacteristic s_characteristics[NUM_AMS_INSTANCES][NumAMSCharacteristic] = { @@ -133,10 +133,10 @@ void test_ams__discover_of_ams_should_subscribe_to_entity_update_characteristic( // Pass in 2 instances, it should be able to cope with this prv_discover_ams(2 /* num_instances */); - // Assert ams.c can now handle the characteristic reference for the first instance: + // Assert ams.c can handle the characteristic reference for the first instance: prv_assert_can_handle_characteristics(0, true /* expect_can_handle */); - // Assert ams.c can not handle the characteristic reference for the second instance: + // Assert ams.c cannot handle the characteristic reference for the second instance: prv_assert_can_handle_characteristics(1, false /* expect_can_handle */); // The first instance is expected to be used. diff --git a/tests/fw/comm/test_ams_util.c b/tests/fw/comm/test_ams_util.c index 30386aee..df067b89 100644 --- a/tests/fw/comm/test_ams_util.c +++ b/tests/fw/comm/test_ams_util.c @@ -254,7 +254,7 @@ void test_ams_util__csv_buffer_not_zero_terminated(void) { const char one_value[] = "ABCDEF"; cl_assert(sizeof(one_value) > 2); const uint8_t count = ams_util_csv_parse(one_value, - sizeof(one_value) - 1 /* omit zero teminator */, NULL, + sizeof(one_value) - 1 /* omit zero terminator */, NULL, prv_result_callback); cl_assert_equal_i(s_results_count, 1); cl_assert_equal_i(count, 1); diff --git a/tests/fw/comm/test_ancs.c b/tests/fw/comm/test_ancs.c index 22b02ec1..00247553 100644 --- a/tests/fw/comm/test_ancs.c +++ b/tests/fw/comm/test_ancs.c @@ -187,7 +187,7 @@ BTErrno gatt_client_op_write(BLECharacteristic characteristic, return BTErrnoInvalidParameter; } - const uint32_t comple_dict_uid = ((GetNotificationAttributesMsg*)s_complete_dict)->notification_uid; + const uint32_t complete_dict_uid = ((GetNotificationAttributesMsg*)s_complete_dict)->notification_uid; const uint32_t chunked_dict_uid = ((GetNotificationAttributesMsg*)s_chunked_dict_part_one)->notification_uid; const uint32_t message_size_attr_dict_uid = ((GetNotificationAttributesMsg*)s_message_size_attr_dict)->notification_uid; const uint32_t invalid_dict_uid = ((GetNotificationAttributesMsg*)s_invalid_attribute_length)->notification_uid; @@ -221,7 +221,7 @@ BTErrno gatt_client_op_write(BLECharacteristic characteristic, uint32_t uid = ((GetNotificationAttributesMsg *)buffer)->notification_uid; s_num_requested_notif_attributes++; - if (uid == comple_dict_uid) { + if (uid == complete_dict_uid) { prv_fake_receiving_ds_notification(ARRAY_LENGTH(s_complete_dict), (uint8_t*) s_complete_dict); s_num_ds_notifications_received++; } else if (uid == chunked_dict_uid) { @@ -353,7 +353,7 @@ void test_ancs__should_handle_small_and_large_messages(void) { cl_assert_equal_i(fake_kernel_services_notifications_ancs_notifications_count(), 4 + 4 + 4); } -void test_ancs__should_handle_message_size_attribtue(void) { +void test_ancs__should_handle_message_size_attribute(void) { prv_send_notification((uint8_t *)&s_message_size_attr_dict); cl_assert_equal_i(s_num_requested_notif_attributes, 1); cl_assert_equal_i(s_num_ds_notifications_received, 1); @@ -437,7 +437,7 @@ void test_ancs__ancs_invalid_param(void) { .uid = 0, }; - const uint32_t comple_dict_uid = ((GetNotificationAttributesMsg*)s_complete_dict)->notification_uid; + const uint32_t complete_dict_uid = ((GetNotificationAttributesMsg*)s_complete_dict)->notification_uid; ns_notification.uid = s_invalid_param_uid; // This will return with an error ANCS_INVALID_PARAM @@ -446,7 +446,7 @@ void test_ancs__ancs_invalid_param(void) { cl_assert_equal_i(s_num_requested_notif_attributes, 1 ); cl_assert_equal_i(s_num_ds_notifications_received, 1); - ns_notification.uid = comple_dict_uid; + ns_notification.uid = complete_dict_uid; prv_fake_receiving_ns_notification(sizeof(ns_notification), (uint8_t*) &ns_notification); cl_assert_equal_i(s_num_requested_notif_attributes, 2); cl_assert_equal_i(s_num_ds_notifications_received, 2); @@ -465,7 +465,7 @@ void test_ancs__ancs_invalid_param(void) { cl_assert_equal_i(s_num_requested_notif_attributes, 4); cl_assert_equal_i(s_num_ds_notifications_received, 4); - ns_notification.uid = comple_dict_uid; + ns_notification.uid = complete_dict_uid; prv_fake_receiving_ns_notification(sizeof(ns_notification), (uint8_t*) &ns_notification); cl_assert_equal_i(s_num_requested_notif_attributes, 5); cl_assert_equal_i(s_num_ds_notifications_received, 5); diff --git a/tests/fw/comm/test_gap_le_advert.c b/tests/fw/comm/test_gap_le_advert.c index 8d3d2872..13650226 100644 --- a/tests/fw/comm/test_gap_le_advert.c +++ b/tests/fw/comm/test_gap_le_advert.c @@ -95,8 +95,8 @@ void test_gap_le_advert__initialize(void) { s_unscheduled_job = NULL; s_unscheduled_completed = false; - // This bypasses the work-around for the CC2564 advertising bug, that pauses the round-robinning - // through scheduled advertisment jobs: + // This bypasses the workaround for the CC2564 advertising bug, that pauses the round-robining + // through scheduled advertisement jobs: s_is_connected_as_slave = true; regular_timer_init(); @@ -827,7 +827,7 @@ void test_gap_le_advert__invalid_params(void) { } void test_gap_le_advert__unschedule_non_existent(void) { - // Unscheduling non-existent job should be fine, should not crash: + // Unscheduling nonexistent job should be fine, should not crash: gap_le_advert_unschedule((GAPLEAdvertisingJobRef)(uintptr_t) 0x1234); // Unschedule callback should not have been called: diff --git a/tests/fw/comm/test_gap_le_connect.c b/tests/fw/comm/test_gap_le_connect.c index c6136039..c29bef8e 100644 --- a/tests/fw/comm/test_gap_le_connect.c +++ b/tests/fw/comm/test_gap_le_connect.c @@ -678,7 +678,7 @@ void test_gap_le_connect__slave_disconnection_event_upon_cancel_connect_by_bondi // ------------------------------------------------------------------------------------------------- // Pairing -void __disabled_test_gap_le_connect__one_shot_intent_removed_when_disconnected_before_encrpt(void) { +void __disabled_test_gap_le_connect__one_shot_intent_removed_when_disconnected_before_encrypt(void) { BTDeviceInternal device = prv_dummy_device(1); // Register connection one-shot intent, with pairing required: diff --git a/tests/fw/comm/test_gatt_service_changed_client.c b/tests/fw/comm/test_gatt_service_changed_client.c index dd7e0ec6..1bd77f5c 100644 --- a/tests/fw/comm/test_gatt_service_changed_client.c +++ b/tests/fw/comm/test_gatt_service_changed_client.c @@ -222,7 +222,7 @@ void test_gatt_service_changed_client__handle_indication_service_changed(void) { fake_gatt_is_service_discovery_start_count()); } -void test_gatt_service_changed_client__handle_indication_service_changed_malformatted(void) { +void test_gatt_service_changed_client__handle_indication_service_changed_malformed(void) { fake_gatt_put_discovery_indication_gatt_profile_service(TEST_GATT_CONNECTION_ID, true /* has_service_changed_characteristic */); const uint16_t att_handle = fake_gatt_gatt_profile_service_service_changed_att_handle(); diff --git a/tests/fw/comm/test_ppogatt.c b/tests/fw/comm/test_ppogatt.c index 03ff7173..48a2d6fe 100644 --- a/tests/fw/comm/test_ppogatt.c +++ b/tests/fw/comm/test_ppogatt.c @@ -1101,6 +1101,6 @@ void test_ppogatt__mtu_zero_due_to_service_rediscovery_while_resetting(void) { // No crash nor DUMA failures } -void test_ppogatt__unsubcribe_when_no_memory_for_comm_session(void) { +void test_ppogatt__unsubscribe_when_no_memory_for_comm_session(void) { // TODO } diff --git a/tests/fw/drivers/test_flash_erase.c b/tests/fw/drivers/test_flash_erase.c index 78247c40..7589f4ca 100644 --- a/tests/fw/drivers/test_flash_erase.c +++ b/tests/fw/drivers/test_flash_erase.c @@ -236,7 +236,7 @@ void test_flash_erase__96k_app_banks_1(void) { } void test_flash_erase__96k_app_banks_2(void) { - // App that's in an aligned bank but larger than than 64k + // App that's in an aligned bank but larger than 64k prv_test_erase_optimal_range( 0, 0, 69 * 1024, 96 * 1024, (EraseCommand[]) { @@ -262,7 +262,7 @@ void test_flash_erase__96k_app_banks_3(void) { } void test_flash_erase__96k_app_banks_4(void) { - // App that's in an unaligned bank but larger than than 64k + // App that's in an unaligned bank but larger than 64k prv_test_erase_optimal_range( 32 * 1024, 32 * 1024, (32 + 71) * 1024, (32 + 96) * 1024, (EraseCommand[]) { diff --git a/tests/fw/graphics/test_bitblt.c b/tests/fw/graphics/test_bitblt.c index eeb925a1..91155f1f 100644 --- a/tests/fw/graphics/test_bitblt.c +++ b/tests/fw/graphics/test_bitblt.c @@ -251,7 +251,7 @@ void test_bitblt__8bit_comptint_blend(void) { (GColor8){.a = 3, .r = 2, .g = 1, .b = 0} }; - // Test image with four pixels of all our suported alpha values + // Test image with four pixels of all our supported alpha values GBitmap test_bmp = (GBitmap){ .addr = test_blend_colors, .row_size_bytes = 4, @@ -319,7 +319,7 @@ void test_bitblt__8bit_clipping(void) { // Test horizontal wrapping when dest_rect wider than src_bitmap. // Setup: -// - Source 15 x 10, each row has the folling pattern: +// - Source 15 x 10, each row has the following pattern: // - 2px Red // - 13px Black // - Dest Green 50x50 diff --git a/tests/fw/graphics/test_bitblt_palette_1bit.c b/tests/fw/graphics/test_bitblt_palette_1bit.c index d46c9ffe..534a80a7 100644 --- a/tests/fw/graphics/test_bitblt_palette_1bit.c +++ b/tests/fw/graphics/test_bitblt_palette_1bit.c @@ -143,7 +143,7 @@ void test_bitblt_palette_1bit__2bit_palette_to_1bit_set(void) { // The left half is semi-transparent and the right half is completely opaque // - Dest is 50x50, white. // Result: -// - The image desribed will be tiled in each of the four corners +// - The image described will be tiled in each of the four corners // The top right half will be alternating between dithered gray and black lines // The bottom right half consists of a diagonal white line on a black background // The left half will be completely white @@ -169,13 +169,13 @@ void test_bitblt_palette_1bit__2bit_palette_to_1bit_wrap(void) { // The top right half will be alternating between dithered gray and black lines // The bottom right half consists of a diagonal white line on a black background // The left half will be completely white -void test_bitblt_palette_1bit__2bit_palette_to_1bit_offest(void) { +void test_bitblt_palette_1bit__2bit_palette_to_1bit_offset(void) { GBitmap *src_bitmap = get_gbitmap_from_pbi("test_bitblt_palette_1bit__2bit_palette_to_1bit.pbi"); bitblt_bitmap_into_bitmap(&s_dest_bitmap, src_bitmap, GPoint(20,20), GCompOpAssign, GColorWhite); cl_assert(gbitmap_pbi_eq(&s_dest_bitmap, - "test_bitblt_palette_1bit__2bit_palette_to_1bit_offest-expect.pbi")); + "test_bitblt_palette_1bit__2bit_palette_to_1bit_offset-expect.pbi")); gbitmap_destroy(src_bitmap); } diff --git a/tests/fw/graphics/test_gbitmap_sequence.c b/tests/fw/graphics/test_gbitmap_sequence.c index 2dd18553..7d8a308e 100644 --- a/tests/fw/graphics/test_gbitmap_sequence.c +++ b/tests/fw/graphics/test_gbitmap_sequence.c @@ -88,7 +88,7 @@ static const char *prv_get_image_name(const char* func_name, int index, const ch // Result: // - gbitmaps matches platform decoded APNG void test_gbitmap_sequence__color_2bit_bouncing_ball(void) { -#if PLATFROM_SPALDING +#if PLATFORM_SPALDING uint32_t resource_id = sys_resource_load_file_as_resource(TEST_IMAGES_PATH, GET_APNG_NAME); cl_assert(resource_id != UINT32_MAX); diff --git a/tests/fw/graphics/test_graphics_colors.c b/tests/fw/graphics/test_graphics_colors.c index 6e20cd66..82833d7b 100644 --- a/tests/fw/graphics/test_graphics_colors.c +++ b/tests/fw/graphics/test_graphics_colors.c @@ -93,7 +93,7 @@ void test_graphics_colors__equal__deprecated(void) { void test_graphics_colors__inverted_readable_color(void) { GColor8 (*fun)(GColor8) = gcolor_legible_over; - // transparent colors result in transparen - who has a better idea? + // transparent colors result in transparent - who has a better idea? cl_assert_equal_i(GColorClearARGB8, fun(GColorClear).argb); // // obvious cases diff --git a/tests/fw/graphics/test_graphics_context.template.c b/tests/fw/graphics/test_graphics_context.template.c index b4bd4d23..dfdf1f5d 100644 --- a/tests/fw/graphics/test_graphics_context.template.c +++ b/tests/fw/graphics/test_graphics_context.template.c @@ -831,7 +831,7 @@ void test_graphics_context_${BIT_DEPTH_NAME}__lock_framebuffer_fails_from_8BitCi }; void test_graphics_context_${BIT_DEPTH_NAME}__lock_framebuffer_1Bit_on_8BitCircular_must_fail(void) { - // Test for locking of 1Bit framebuffer when frambuffer is 8Bit Circular + // Test for locking of 1Bit framebuffer when framebuffer is 8Bit Circular GContext ctx = {.dest_bitmap.info.format = GBitmapFormat8BitCircular}; GBitmap *bmp = graphics_capture_frame_buffer_format(&ctx, GBitmapFormat1Bit); cl_assert(ctx.lock == false); diff --git a/tests/fw/graphics/test_graphics_draw_text_flow.c b/tests/fw/graphics/test_graphics_draw_text_flow.c index 677a7c49..12a87eea 100644 --- a/tests/fw/graphics/test_graphics_draw_text_flow.c +++ b/tests/fw/graphics/test_graphics_draw_text_flow.c @@ -426,7 +426,7 @@ void test_graphics_draw_text_flow__no_infinite_loop(void) { .perimeter.impl = &(GPerimeter){.callback = perimeter_for_display_rect}, }, }; - char text[] = "Prevent orhpans for tall-enough pages."; + char text[] = "Prevent orphans for tall-enough pages."; const int16_t line_height = 22; // some more pixels to show that orphan prevention really only applies if there's enough space // for enough *full* lines @@ -471,7 +471,7 @@ void test_graphics_draw_text_flow__no_infinite_loop2(void) { } }, }; - char text[] = "Late again? Can you be on time ever? Seriosly? Dude!!!"; + char text[] = "Late again? Can you be on time ever? Seriously? Dude!!!"; prv_prepare_fb_steps_xy(GSize(180, 360), 1, 1); ctx.draw_state.avoid_text_orphans = true; diff --git a/tests/fw/graphics/test_graphics_fill_circle.template.c b/tests/fw/graphics/test_graphics_fill_circle.template.c index bfa06a4f..c66a30b0 100644 --- a/tests/fw/graphics/test_graphics_fill_circle.template.c +++ b/tests/fw/graphics/test_graphics_fill_circle.template.c @@ -543,7 +543,7 @@ void test_graphics_fill_circle_${BIT_DEPTH_NAME}__radial(void){ #endif uint16_t outer_radius = 30; - int32_t twelveth_of_angle = TRIG_MAX_ANGLE / 12; + int32_t twelfth_of_angle = TRIG_MAX_ANGLE / 12; int32_t quarter_of_angle = TRIG_MAX_ANGLE / 4; GPoint center = GPoint(72, 84); @@ -564,9 +564,9 @@ void test_graphics_fill_circle_${BIT_DEPTH_NAME}__radial(void){ graphics_fill_radial_internal(&ctx, pt, test_radiuses[i].radius, outer_radius, test_quadrants[j].angle_start + offset_angle - - twelveth_of_angle, + twelfth_of_angle, test_quadrants[j].angle_end + offset_angle + - twelveth_of_angle); + twelfth_of_angle); offset_angle += quarter_of_angle; } @@ -605,7 +605,7 @@ void test_graphics_fill_circle_${BIT_DEPTH_NAME}__radial_precise(void){ // Drawing setup_test_aa_sw(&ctx, fb, ORIGIN_RECT_NO_CLIP, ORIGIN_RECT_NO_CLIP, true, 1); graphics_fill_radial_precise_internal(&ctx, center, radius_inner, radius_outer, angle_start, angle_end); - cl_check(gbitmap_pbi_eq(&ctx.dest_bitmap, "fill_radial_origin_aa_precise_halfs_letter_c.${BIT_DEPTH_NAME}.pbi")); + cl_check(gbitmap_pbi_eq(&ctx.dest_bitmap, "fill_radial_origin_aa_precise_halves_letter_c.${BIT_DEPTH_NAME}.pbi")); } typedef struct { @@ -719,7 +719,7 @@ void prv_draw_radial_in_rect_debugged(GContext *ctx, int16_t width, int16_t heig int32_t angle_start, int32_t angle_end){ int offset_angle = 0; - int32_t twelveth_of_angle = TRIG_MAX_ANGLE / 12; + int32_t twelfth_of_angle = TRIG_MAX_ANGLE / 12; GPoint center = GPoint(72, 84); for (int i=0; i<4; i++) { @@ -739,8 +739,8 @@ void prv_draw_radial_in_rect_debugged(GContext *ctx, int16_t width, int16_t heig graphics_context_set_stroke_color(ctx, GColorBlack); graphics_fill_radial(ctx, rect, scale_mode, inset, - angle_start + offset_angle - twelveth_of_angle, - angle_end + offset_angle + twelveth_of_angle); + angle_start + offset_angle - twelfth_of_angle, + angle_end + offset_angle + twelfth_of_angle); offset_angle += TRIG_MAX_ANGLE / 4; } diff --git a/tests/fw/graphics/test_graphics_gpath.template.c b/tests/fw/graphics/test_graphics_gpath.template.c index 98da5943..e397e3d5 100644 --- a/tests/fw/graphics/test_graphics_gpath.template.c +++ b/tests/fw/graphics/test_graphics_gpath.template.c @@ -448,7 +448,7 @@ void test_graphics_gpath_8bit__clipping_aa(void) { // NOTE: Expected result of this test is to have an antialiased stripe go through the screen, // where antialiased edges are being nicely cut off on top and bottom of the stripe // (antialiased gradient would dive into the stripe near screen edges), also top - // left corner is intentinally ending just before screen cuts it out to verify that + // left corner is intentionally ending just before screen cuts it out to verify that // fractional anti-aliasing is not bleeding into row before (would occur as pixels on // right side of the screen) cl_check(gbitmap_pbi_eq(&ctx.dest_bitmap, diff --git a/tests/fw/graphics/util.h b/tests/fw/graphics/util.h index 3e92183d..9f6538b8 100644 --- a/tests/fw/graphics/util.h +++ b/tests/fw/graphics/util.h @@ -98,7 +98,7 @@ static char get_terminal_color(uint8_t c) { } } -// A simple functon for printing 8-bit gbitmaps to the console. +// A simple function for printing 8-bit gbitmaps to the console. // Makes it easy to quickly review failing test cases. void print_bitmap(const GBitmap *bmp) { printf("Row Size Bytes: %d\n", bmp->row_size_bytes); @@ -238,7 +238,7 @@ static void prv_write_diff_to_file(const char *filename, GBitmap *expected_bmp, strncpy(ext, EXPECTED_PBI_FILE_EXTENSION, strlen(EXPECTED_PBI_FILE_EXTENSION) + 1); cl_assert(tests_write_gbitmap_to_pbi(expected_bmp, bmp_filename)); - // TODO: PBL-20932 Add 1-bit and palletized support + // TODO: PBL-20932 Add 1-bit and palettized support if (actual_bmp->info.format == GBitmapFormat8Bit && diff_bmp) { // Only write the diff file if there is an expected image strncpy(bmp_filename, filename, PATH_STRING_LENGTH - strlen(DIFF_PBI_FILE_EXTENSION) - 1); @@ -306,7 +306,7 @@ bool gbitmap_eq(GBitmap *actual_bmp, GBitmap *expected_bmp, const char *filename for (int y = start_y; y < end_y; ++y) { uint8_t *line = ((uint8_t*)diff_bmp->addr) + (diff_bmp->row_size_bytes * y); - // TODO: PBL-20932 Add 1-bit and palletized support + // TODO: PBL-20932 Add 1-bit and palettized support if (actual_bmp->info.format == GBitmapFormat8Bit) { line[(diff_bmp->row_size_bytes / 3) + 1] = GColorClear.argb; // Separator pixel between images line[(2 * diff_bmp->row_size_bytes / 3) + 1] = GColorClear.argb; // Separator pixel between images @@ -346,7 +346,7 @@ bool gbitmap_eq(GBitmap *actual_bmp, GBitmap *expected_bmp, const char *filename rc = false; } - // TODO: PBL-20932 Add 1-bit and palletized support + // TODO: PBL-20932 Add 1-bit and palettized support if (actual_bmp->info.format == GBitmapFormat8Bit) { if (actual_bmp_color.argb != expected_bmp_color.argb) { GColor8 diff_bmp_color = DIFF_COLOR; diff --git a/tests/fw/javascript/test_rocky_api_global.c b/tests/fw/javascript/test_rocky_api_global.c index 05a920f3..d297514e 100644 --- a/tests/fw/javascript/test_rocky_api_global.c +++ b/tests/fw/javascript/test_rocky_api_global.c @@ -166,7 +166,7 @@ void test_rocky_api_global__calls_init_and_notifies_about_apis(void) { cl_assert(*s_log_internal__expected == NULL); } -void test_rocky_api_global__can_unsubsribe_event_handlers(void) { +void test_rocky_api_global__can_unsubscribe_event_handlers(void) { static const RockyGlobalAPI api = { .add_handler = prv_api_add, .remove_handler = prv_api_remove, diff --git a/tests/fw/javascript/test_rocky_api_graphics.c b/tests/fw/javascript/test_rocky_api_graphics.c index 0e5b9193..99d42b98 100644 --- a/tests/fw/javascript/test_rocky_api_graphics.c +++ b/tests/fw/javascript/test_rocky_api_graphics.c @@ -606,7 +606,7 @@ void test_rocky_api_graphics__fill_text_aligned(void) { void test_rocky_api_graphics__text_align(void) { prv_global_init_and_set_ctx(); - // intial value + // initial value cl_assert_equal_i(GTextAlignmentLeft, s_rocky_text_state.alignment); s_rocky_text_state.alignment = (GTextAlignment)-1; diff --git a/tests/fw/kernel/test_pulse_logging.c b/tests/fw/kernel/test_pulse_logging.c index c18ab7cd..c4e42263 100644 --- a/tests/fw/kernel/test_pulse_logging.c +++ b/tests/fw/kernel/test_pulse_logging.c @@ -131,7 +131,7 @@ void test_pulse_logging__simple(void) { cl_assert_equal_s(s_log_message_buffer, "TestTestTestTestTest"); } -void test_pulse_logging__simple_trucate(void) { +void test_pulse_logging__simple_truncate(void) { pulse_logging_log(LOG_LEVEL_DEBUG, "", 0, "TestTestTestTestTestTestTestTestTestTest" "TestTestTestTestTestTestTestTestTestTest" "TestTestTestTestTestTestTestTestTestTest" @@ -169,7 +169,7 @@ void test_pulse_logging__isr_simple(void) { cl_assert_equal_s(s_log_message_buffer, "TestTestTestTestTest"); } -void test_pulse_logging__isr_trucate(void) { +void test_pulse_logging__isr_truncate(void) { s_in_critical_section = true; pulse_logging_log(LOG_LEVEL_DEBUG, "", 0, "TestTestTestTestTestTestTestTestTestTest" diff --git a/tests/fw/services/activity/test_activity.c b/tests/fw/services/activity/test_activity.c index 5839489a..c1b86d86 100644 --- a/tests/fw/services/activity/test_activity.c +++ b/tests/fw/services/activity/test_activity.c @@ -89,7 +89,7 @@ static const struct tm s_init_time_tm = { #define ACTIVITY_FIXTURE_PATH "activity" -// The expected resting kcalories is determined empirically from a known good commmit and +// The expected resting kcalories is determined empirically from a known good commit and // is based on the current time of day and the user's weight, age etc. const int s_exp_5pm_resting_kcalories = 1031; const int s_exp_full_day_resting_kcalories = 1455; @@ -496,7 +496,7 @@ bool activity_algorithm_deinit(void) { } void activity_algorithm_handle_accel(AccelRawData *data, uint32_t num_samples, uint64_t timestamp) { - // For testing purposes, we'll use the x movment as the steps and y as the sleep state + // For testing purposes, we'll use the x movement as the steps and y as the sleep state ActivitySleepState prior_state = s_test_alg_state.minute_data.sleep_state; time_t now_secs = rtc_get_time(); s_test_alg_state.minute_data.last_captured_utc = now_secs; @@ -744,7 +744,7 @@ bool activity_algorithm_test_send_fake_minute_data_dls_record(void) { // .x : the number of steps to increment by (either 0 or 1) // .y : the current sleep state // .z : 0 -static void prv_feed_cannned_accel_data(uint32_t num_sec, uint32_t steps_per_minute, +static void prv_feed_canned_accel_data(uint32_t num_sec, uint32_t steps_per_minute, ActivitySleepState sleep_state) { uint32_t num_steps = (steps_per_minute * num_sec + 30) / 60; uint32_t num_samples = num_sec * ALGORITHM_SAMPLING_RATE; @@ -1069,9 +1069,9 @@ void test_activity__init_history(void) { fake_system_task_callbacks_invoke_pending(); // Feed in 100 steps/min over 1 min, 1 minute of deep and 1 minute of light sleep - prv_feed_cannned_accel_data(60, 100, ActivitySleepStateAwake); - prv_feed_cannned_accel_data(60, 0, ActivitySleepStateLightSleep); - prv_feed_cannned_accel_data(60, 0, ActivitySleepStateRestfulSleep); + prv_feed_canned_accel_data(60, 100, ActivitySleepStateAwake); + prv_feed_canned_accel_data(60, 0, ActivitySleepStateLightSleep); + prv_feed_canned_accel_data(60, 0, ActivitySleepStateRestfulSleep); // Put in a stepping activity time_t day_start = time_util_get_midnight_of(rtc_get_time()); @@ -1095,7 +1095,7 @@ void test_activity__init_history(void) { // Wait long enough for our recompute sleep and periodic update logic to run. uint32_t wait_min = MAX(ACTIVITY_SESSION_UPDATE_MIN, ACTIVITY_SETTINGS_UPDATE_MIN); - prv_feed_cannned_accel_data(SECONDS_PER_MINUTE * wait_min, 0, ActivitySleepStateAwake); + prv_feed_canned_accel_data(SECONDS_PER_MINUTE * wait_min, 0, ActivitySleepStateAwake); ASSERT_EQUAL_METRIC_HISTORY(ActivityMetricStepCount, ((const uint32_t [ACTIVITY_HISTORY_DAYS]){100, 0, 0, 0, 0, 0, 0})); ASSERT_EQUAL_METRIC_HISTORY(ActivityMetricSleepTotalSeconds, @@ -1251,12 +1251,12 @@ void test_activity__day_rollover(void) { fake_system_task_callbacks_invoke_pending(); // Feed in 100 steps/min over 1 min, 1 minute of deep and 1 minute of light sleep - prv_feed_cannned_accel_data(60, 100, ActivitySleepStateAwake); - prv_feed_cannned_accel_data(60, 0, ActivitySleepStateLightSleep); - prv_feed_cannned_accel_data(60, 0, ActivitySleepStateRestfulSleep); + prv_feed_canned_accel_data(60, 100, ActivitySleepStateAwake); + prv_feed_canned_accel_data(60, 0, ActivitySleepStateLightSleep); + prv_feed_canned_accel_data(60, 0, ActivitySleepStateRestfulSleep); // Wait long enough for our recompute sleep logic to run. - prv_feed_cannned_accel_data(SECONDS_PER_MINUTE * ACTIVITY_SESSION_UPDATE_MIN, 0, + prv_feed_canned_accel_data(SECONDS_PER_MINUTE * ACTIVITY_SESSION_UPDATE_MIN, 0, ActivitySleepStateAwake); ASSERT_EQUAL_METRIC_HISTORY(ActivityMetricStepCount, ((const uint32_t [ACTIVITY_HISTORY_DAYS]){100, 0, 0, 0, 0, 0, 0})); @@ -1313,7 +1313,7 @@ void test_activity__day_rollover(void) { // Wait long enough for our midnight rollover to occur. We init time at 5pm, so we need to wait // for at least 7 hours. const int minutes_till_midnight = (7 * MINUTES_PER_HOUR) - ACTIVITY_SESSION_UPDATE_MIN - 3; - prv_feed_cannned_accel_data(SECONDS_PER_MINUTE * (minutes_till_midnight + 1), 0, + prv_feed_canned_accel_data(SECONDS_PER_MINUTE * (minutes_till_midnight + 1), 0, ActivitySleepStateAwake); ASSERT_EQUAL_METRIC_HISTORY(ActivityMetricStepCount, ((const uint32_t [ACTIVITY_HISTORY_DAYS]){0, 100, 0, 0, 0, 0, 0})); @@ -1389,7 +1389,7 @@ void test_activity__step_derived_metrics(void) { cl_assert_equal_i(health_service_sum_today(HealthMetricRestingKCalories), value); // Feed in 100 steps/minute over 1 hour (walking rate) - prv_feed_cannned_accel_data(SECONDS_PER_HOUR, 100, ActivitySleepStateAwake); + prv_feed_canned_accel_data(SECONDS_PER_HOUR, 100, ActivitySleepStateAwake); const int k_exp_steps = 100 * MINUTES_PER_HOUR; // Test the derived metrics @@ -1415,10 +1415,10 @@ void test_activity__step_derived_metrics(void) { // Test that ActivityMetricStepMinutes responds correctly - prv_feed_cannned_accel_data(1 * SECONDS_PER_MINUTE, 100, ActivitySleepStateAwake); - prv_feed_cannned_accel_data(1 * SECONDS_PER_MINUTE, 10, ActivitySleepStateAwake); - prv_feed_cannned_accel_data(1 * SECONDS_PER_MINUTE, 100, ActivitySleepStateAwake); - prv_feed_cannned_accel_data(1 * SECONDS_PER_MINUTE, 10, ActivitySleepStateAwake); + prv_feed_canned_accel_data(1 * SECONDS_PER_MINUTE, 100, ActivitySleepStateAwake); + prv_feed_canned_accel_data(1 * SECONDS_PER_MINUTE, 10, ActivitySleepStateAwake); + prv_feed_canned_accel_data(1 * SECONDS_PER_MINUTE, 100, ActivitySleepStateAwake); + prv_feed_canned_accel_data(1 * SECONDS_PER_MINUTE, 10, ActivitySleepStateAwake); activity_get_metric(ActivityMetricActiveSeconds, 1, &value); cl_assert_equal_i(value, SECONDS_PER_HOUR + (2 * SECONDS_PER_MINUTE)); cl_assert_equal_i(health_service_sum_today(HealthMetricActiveSeconds), @@ -1455,7 +1455,7 @@ void test_activity__step_derived_metrics(void) { ACTIVITY_CALORIES_PER_KCAL)); // Feed in 125 steps/minute over 60 minutes - prv_feed_cannned_accel_data(60 * SECONDS_PER_MINUTE, 125, ActivitySleepStateAwake); + prv_feed_canned_accel_data(60 * SECONDS_PER_MINUTE, 125, ActivitySleepStateAwake); const int k_exp_steps_2 = 125 * MINUTES_PER_HOUR; // Test the derived metrics @@ -1492,27 +1492,27 @@ void test_activity__sleep_derived_metrics(void) { // at 10pm, takes 30 minutes to fall asleep, and wakes up at 6am. // Light walking, 50 steps/minute, until 10pm - prv_feed_cannned_accel_data(5 * SECONDS_PER_HOUR, 50, ActivitySleepStateAwake); + prv_feed_canned_accel_data(5 * SECONDS_PER_HOUR, 50, ActivitySleepStateAwake); // Falling asleep for 30 minutes - prv_feed_cannned_accel_data(30 * SECONDS_PER_MINUTE, 5, ActivitySleepStateAwake); + prv_feed_canned_accel_data(30 * SECONDS_PER_MINUTE, 5, ActivitySleepStateAwake); // Starting at 10:30pm: 2 Cycles of light (60 min), deep (50 min), awake (10 min) for (int i = 0; i < 2; i++) { - prv_feed_cannned_accel_data(60 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); + prv_feed_canned_accel_data(60 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); activity_get_metric(ActivityMetricSleepState, 1, &value); cl_assert_equal_i(value, ActivitySleepStateLightSleep); - prv_feed_cannned_accel_data(50 * SECONDS_PER_MINUTE, 0, ActivitySleepStateRestfulSleep); + prv_feed_canned_accel_data(50 * SECONDS_PER_MINUTE, 0, ActivitySleepStateRestfulSleep); activity_get_metric(ActivityMetricSleepState, 1, &value); cl_assert_equal_i(value, ActivitySleepStateRestfulSleep); - prv_feed_cannned_accel_data(10 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); + prv_feed_canned_accel_data(10 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); } // 30 minute "morning walk" 4 hours later at 2:30am - prv_feed_cannned_accel_data(30 * SECONDS_PER_MINUTE, 50, ActivitySleepStateAwake); + prv_feed_canned_accel_data(30 * SECONDS_PER_MINUTE, 50, ActivitySleepStateAwake); activity_get_metric(ActivityMetricSleepState, 1, &value); cl_assert_equal_i(value, ActivitySleepStateAwake); cl_assert_equal_i(health_service_peek_current_activities(), HealthActivityNone); @@ -1555,22 +1555,22 @@ void test_activity__sleep_history(void) { // All of our tests start at 5pm. Let's enter a sleep cycle where the user has a sleep session // before the cut-off for the new day // Light walking, 50 steps/minute, until 6pm - prv_feed_cannned_accel_data(1 * SECONDS_PER_HOUR, 50, ActivitySleepStateAwake); + prv_feed_canned_accel_data(1 * SECONDS_PER_HOUR, 50, ActivitySleepStateAwake); // 2.5 hours of sleep, put's us at 8:30pm. The cut-off for the next day is // ACTIVITY_LAST_SLEEP_MINUTE_OF_DAY, currently set for 9pm so this session should be // registered for today - prv_feed_cannned_accel_data(150 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); + prv_feed_canned_accel_data(150 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); // Awake for 30 minutes which puts us at 9pm. - prv_feed_cannned_accel_data(30 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); + prv_feed_canned_accel_data(30 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); // Another 2 hour sleep session starting at 9pm. This will leave us at 11pm. Since this - // session ends after the the cutoff, it should be registered for the next day - prv_feed_cannned_accel_data(120 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); + // session ends after the cutoff, it should be registered for the next day + prv_feed_canned_accel_data(120 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); // Awake for 2 hours which puts us at 1am - prv_feed_cannned_accel_data(120 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); + prv_feed_canned_accel_data(120 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); // Now if we get sleep history, we should have 2.5 hours yesterday, and 2 hours today ASSERT_EQUAL_METRIC_HISTORY(ActivityMetricSleepTotalSeconds, @@ -1578,10 +1578,10 @@ void test_activity__sleep_history(void) { 150 * SECONDS_PER_MINUTE})); // Another 2 hour sleep session starting at 1am. This will leave us at 3am. - prv_feed_cannned_accel_data(120 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); + prv_feed_canned_accel_data(120 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); // Awake for 1 hour which puts us at 4am - prv_feed_cannned_accel_data(60 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); + prv_feed_canned_accel_data(60 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); ASSERT_EQUAL_METRIC_HISTORY(ActivityMetricSleepTotalSeconds, ((const uint32_t [ACTIVITY_HISTORY_DAYS]){240 * SECONDS_PER_MINUTE, @@ -1684,22 +1684,22 @@ void test_activity__get_sleep_sessions(void) { fake_system_task_callbacks_invoke_pending(); // Light walking, 50 steps/minute, until 10pm - prv_feed_cannned_accel_data(5 * SECONDS_PER_HOUR, 50, ActivitySleepStateAwake); + prv_feed_canned_accel_data(5 * SECONDS_PER_HOUR, 50, ActivitySleepStateAwake); // Falling asleep for 30 minutes - prv_feed_cannned_accel_data(30 * SECONDS_PER_MINUTE, 5, ActivitySleepStateAwake); + prv_feed_canned_accel_data(30 * SECONDS_PER_MINUTE, 5, ActivitySleepStateAwake); // Starting at 10:30pm: 2 Cycles of light (60 min), deep (50 min), awake (10 min) for (int i = 0; i < 2; i++) { - prv_feed_cannned_accel_data(60 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); + prv_feed_canned_accel_data(60 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); - prv_feed_cannned_accel_data(50 * SECONDS_PER_MINUTE, 0, ActivitySleepStateRestfulSleep); + prv_feed_canned_accel_data(50 * SECONDS_PER_MINUTE, 0, ActivitySleepStateRestfulSleep); - prv_feed_cannned_accel_data(10 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); + prv_feed_canned_accel_data(10 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); } // 30 minute "morning walk" 4 hours later at 2:30am - prv_feed_cannned_accel_data(30 * SECONDS_PER_MINUTE, 50, ActivitySleepStateAwake); + prv_feed_canned_accel_data(30 * SECONDS_PER_MINUTE, 50, ActivitySleepStateAwake); activity_get_metric(ActivityMetricSleepState, 1, &value); cl_assert_equal_i(value, ActivitySleepStateAwake); @@ -1793,10 +1793,10 @@ static uint16_t prv_step_avg_slot(int hour, int min) { // feed in for the given 15-minute time slot int prv_expected_steps_per_min(int slot, int multiplier) { if (multiplier == 1) { - // The slot % 50 was chosen so that the total # of steps per day does not exceeed 2^16 + // The slot % 50 was chosen so that the total # of steps per day does not exceed 2^16 return ((slot % 50) + 1); } else if (multiplier == 2) { - // The slot % 30 was chosen so that the total # of steps per day does not exceeed 2^16 + // The slot % 30 was chosen so that the total # of steps per day does not exceed 2^16 return 2 * ((slot % 30) + 1); } else { cl_assert(false); @@ -1842,36 +1842,36 @@ static void prv_save_known_settings_file(const char *filename) { fake_system_task_callbacks_invoke_pending(); // Feed in 100 steps/min over 1 min, 1 minute of deep and 1 minute of light sleep - prv_feed_cannned_accel_data(60, 100, ActivitySleepStateAwake); - prv_feed_cannned_accel_data(60, 0, ActivitySleepStateRestfulSleep); - prv_feed_cannned_accel_data(60, 0, ActivitySleepStateLightSleep); + prv_feed_canned_accel_data(60, 100, ActivitySleepStateAwake); + prv_feed_canned_accel_data(60, 0, ActivitySleepStateRestfulSleep); + prv_feed_canned_accel_data(60, 0, ActivitySleepStateLightSleep); // Wait long enough for our recompute sleep logic to run. - prv_feed_cannned_accel_data(SECONDS_PER_MINUTE * ACTIVITY_SESSION_UPDATE_MIN, 0, + prv_feed_canned_accel_data(SECONDS_PER_MINUTE * ACTIVITY_SESSION_UPDATE_MIN, 0, ActivitySleepStateAwake); // Advance to next day - prv_feed_cannned_accel_data(SECONDS_PER_HOUR * 24, 0, ActivitySleepStateAwake); + prv_feed_canned_accel_data(SECONDS_PER_HOUR * 24, 0, ActivitySleepStateAwake); // Feed in 100 steps/min over 2 min, 2 minute of deep and 2 minute of light sleep - prv_feed_cannned_accel_data(120, 100, ActivitySleepStateAwake); - prv_feed_cannned_accel_data(120, 0, ActivitySleepStateRestfulSleep); - prv_feed_cannned_accel_data(120, 0, ActivitySleepStateLightSleep); + prv_feed_canned_accel_data(120, 100, ActivitySleepStateAwake); + prv_feed_canned_accel_data(120, 0, ActivitySleepStateRestfulSleep); + prv_feed_canned_accel_data(120, 0, ActivitySleepStateLightSleep); // Wait long enough for our recompute sleep logic to run. - prv_feed_cannned_accel_data(SECONDS_PER_MINUTE * ACTIVITY_SESSION_UPDATE_MIN, 0, + prv_feed_canned_accel_data(SECONDS_PER_MINUTE * ACTIVITY_SESSION_UPDATE_MIN, 0, ActivitySleepStateAwake); // Advance to next day - prv_feed_cannned_accel_data(SECONDS_PER_HOUR * 24, 0, ActivitySleepStateAwake); + prv_feed_canned_accel_data(SECONDS_PER_HOUR * 24, 0, ActivitySleepStateAwake); // Feed in 100 steps/min over 3 min, 3 minute of deep and 3 minute of light sleep - prv_feed_cannned_accel_data(180, 100, ActivitySleepStateAwake); - prv_feed_cannned_accel_data(180, 0, ActivitySleepStateRestfulSleep); - prv_feed_cannned_accel_data(180, 0, ActivitySleepStateLightSleep); + prv_feed_canned_accel_data(180, 100, ActivitySleepStateAwake); + prv_feed_canned_accel_data(180, 0, ActivitySleepStateRestfulSleep); + prv_feed_canned_accel_data(180, 0, ActivitySleepStateLightSleep); // Wait long enough for our recompute sleep logic to run. - prv_feed_cannned_accel_data(SECONDS_PER_MINUTE * ACTIVITY_SESSION_UPDATE_MIN, 0, + prv_feed_canned_accel_data(SECONDS_PER_MINUTE * ACTIVITY_SESSION_UPDATE_MIN, 0, ActivitySleepStateAwake); // Make sure they are what we expected @@ -1985,7 +1985,7 @@ void test_activity__health_events(void) { // Test that we receive step update events fake_event_reset_count(); // Feed in 100 steps/minute over 1 minute. We should get some step update events - prv_feed_cannned_accel_data(1 * SECONDS_PER_MINUTE, 100, ActivitySleepStateAwake); + prv_feed_canned_accel_data(1 * SECONDS_PER_MINUTE, 100, ActivitySleepStateAwake); uint32_t event_count = fake_event_get_count(); // Our fake algorithm generates a step update once a second @@ -2000,23 +2000,23 @@ void test_activity__health_events(void) { prv_reset_captured_dls_data(); // Falling asleep for 30 minutes - prv_feed_cannned_accel_data(30 * SECONDS_PER_MINUTE, 5, ActivitySleepStateAwake); + prv_feed_canned_accel_data(30 * SECONDS_PER_MINUTE, 5, ActivitySleepStateAwake); // Starting at 10:31pm: 1 Cycle of light (60 min), deep (50 min) fake_event_reset_count(); fake_event_set_callback(prv_fake_sleep_event_cb); s_captured_sleep_event = (PebbleEvent) { }; s_num_captured_sleep_events = 0; - prv_feed_cannned_accel_data(60 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); - prv_feed_cannned_accel_data(50 * SECONDS_PER_MINUTE, 0, ActivitySleepStateRestfulSleep); + prv_feed_canned_accel_data(60 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); + prv_feed_canned_accel_data(50 * SECONDS_PER_MINUTE, 0, ActivitySleepStateRestfulSleep); - prv_feed_cannned_accel_data(15 * SECONDS_PER_MINUTE, 0, ActivitySleepStateAwake); + prv_feed_canned_accel_data(15 * SECONDS_PER_MINUTE, 0, ActivitySleepStateAwake); - prv_feed_cannned_accel_data(60 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); - prv_feed_cannned_accel_data(50 * SECONDS_PER_MINUTE, 0, ActivitySleepStateRestfulSleep); + prv_feed_canned_accel_data(60 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); + prv_feed_canned_accel_data(50 * SECONDS_PER_MINUTE, 0, ActivitySleepStateRestfulSleep); // Wait long enough for our recompute sleep logic to run. - prv_feed_cannned_accel_data(SECONDS_PER_MINUTE * ACTIVITY_SESSION_UPDATE_MIN, 60, + prv_feed_canned_accel_data(SECONDS_PER_MINUTE * ACTIVITY_SESSION_UPDATE_MIN, 60, ActivitySleepStateAwake); // See if we got the expected sleep events @@ -2039,7 +2039,7 @@ void test_activity__health_events(void) { // Wait long enough for a midnight rollover. All tests start at 5pm, so if we wait // 7 hours, we should get a midnight rollover - prv_feed_cannned_accel_data(7 * SECONDS_PER_HOUR, 0, ActivitySleepStateAwake); + prv_feed_canned_accel_data(7 * SECONDS_PER_HOUR, 0, ActivitySleepStateAwake); // See if we got the expected history events cl_assert_equal_i(s_num_captured_history_events, 1); @@ -2071,7 +2071,7 @@ void test_activity__sleep_after_timezone_change(void) { fake_system_task_callbacks_invoke_pending(); // Advance to 6pm EST - prv_feed_cannned_accel_data(6 * SECONDS_PER_HOUR, 50, ActivitySleepStateAwake); + prv_feed_canned_accel_data(6 * SECONDS_PER_HOUR, 50, ActivitySleepStateAwake); // switch into PST (which would be 3pm) tz_info = (TimezoneInfo) { @@ -2081,13 +2081,13 @@ void test_activity__sleep_after_timezone_change(void) { time_util_update_timezone(&tz_info); // Walk some more until 11pm PST - prv_feed_cannned_accel_data(8 * SECONDS_PER_HOUR, 50, ActivitySleepStateAwake); + prv_feed_canned_accel_data(8 * SECONDS_PER_HOUR, 50, ActivitySleepStateAwake); // Starting at 11pm: 2 Cycles of 3 hrs each light (165 min), awake (15 min) for (int i = 0; i < 2; i++) { - prv_feed_cannned_accel_data(165 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); + prv_feed_canned_accel_data(165 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); - prv_feed_cannned_accel_data(15 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); + prv_feed_canned_accel_data(15 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); } activity_get_metric(ActivityMetricSleepEnterAtSeconds, 1, &value); @@ -2107,7 +2107,7 @@ void test_activity__sleep_after_timezone_change(void) { // The previous test left us at 5am PST. Let's try going the other way and switch from PST to // EST right before we fall asleep // Advance to 11pm PST - prv_feed_cannned_accel_data(18 * SECONDS_PER_HOUR, 50, ActivitySleepStateAwake); + prv_feed_canned_accel_data(18 * SECONDS_PER_HOUR, 50, ActivitySleepStateAwake); // It is now 11pm PST. Switch to EST, which would be 2am tz_info = (TimezoneInfo) { @@ -2118,9 +2118,9 @@ void test_activity__sleep_after_timezone_change(void) { // Starting at 2am EST: 2 Cycles of 3 hrs each light (165 min), awake (15 min) for (int i = 0; i < 2; i++) { - prv_feed_cannned_accel_data(165 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); + prv_feed_canned_accel_data(165 * SECONDS_PER_MINUTE, 0, ActivitySleepStateLightSleep); - prv_feed_cannned_accel_data(15 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); + prv_feed_canned_accel_data(15 * SECONDS_PER_MINUTE, 20, ActivitySleepStateAwake); } activity_get_metric(ActivityMetricSleepEnterAtSeconds, 1, &value); @@ -2155,17 +2155,17 @@ void test_activity__health_service_interpolation(void) { fake_system_task_callbacks_invoke_pending(); // Feed in 100 steps/min over 10 minutes, for a total of 1000 steps for today - prv_feed_cannned_accel_data(10 * SECONDS_PER_MINUTE, 100, ActivitySleepStateAwake); + prv_feed_canned_accel_data(10 * SECONDS_PER_MINUTE, 100, ActivitySleepStateAwake); // Wait long enough until we start the next day (15 hours) - prv_feed_cannned_accel_data(SECONDS_PER_HOUR * 15, 0, + prv_feed_canned_accel_data(SECONDS_PER_HOUR * 15, 0, ActivitySleepStateAwake); ASSERT_EQUAL_METRIC_HISTORY(ActivityMetricStepCount, ((const uint32_t [ACTIVITY_HISTORY_DAYS]){0, 1000, 0, 0, 0, 0, 0})); // Feed in 100 steps/min over 20 minutes, for a total of 2000 steps for today - prv_feed_cannned_accel_data(20 * SECONDS_PER_MINUTE, 100, ActivitySleepStateAwake); + prv_feed_canned_accel_data(20 * SECONDS_PER_MINUTE, 100, ActivitySleepStateAwake); ASSERT_EQUAL_METRIC_HISTORY(ActivityMetricStepCount, ((const uint32_t [ACTIVITY_HISTORY_DAYS]){2000, 1000, 0, 0, 0, 0, 0})); @@ -2265,7 +2265,7 @@ void test_activity__distance(void) { int exp_distance_m = ROUND(params->exp_distance_m * k_elapsed_sec, params->seconds); // Feed in the test cadence for the given amount of time - prv_feed_cannned_accel_data(k_elapsed_sec, steps_per_minute, ActivitySleepStateAwake); + prv_feed_canned_accel_data(k_elapsed_sec, steps_per_minute, ActivitySleepStateAwake); activity_get_metric(ActivityMetricStepCount, 1, &value); cl_assert_near(value, ROUND(steps_per_minute * k_elapsed_sec, SECONDS_PER_MINUTE), 5); diff --git a/tests/fw/services/activity/test_kraepelin_algorithm.c b/tests/fw/services/activity/test_kraepelin_algorithm.c index f2ff7fab..73147377 100644 --- a/tests/fw/services/activity/test_kraepelin_algorithm.c +++ b/tests/fw/services/activity/test_kraepelin_algorithm.c @@ -2017,7 +2017,7 @@ static void prv_feed_activity_minutes(KAlgTestActivityMinute *samples, int sampl } // --------------------------------------------------------------------------------------- -// Test that we correectly recognize walk and run activities +// Test that we correctly recognize walk and run activities void test_kraepelin_algorithm__walks_and_runs(void) { const int k_minute_data_len = 60; const int k_minute_data_bytes = k_minute_data_len * sizeof(KAlgTestActivityMinute); diff --git a/tests/fw/services/analytics/test_analytics_heartbeat.c b/tests/fw/services/analytics/test_analytics_heartbeat.c index a2180814..6f99e742 100644 --- a/tests/fw/services/analytics/test_analytics_heartbeat.c +++ b/tests/fw/services/analytics/test_analytics_heartbeat.c @@ -37,7 +37,7 @@ static Uuid test_uuid = (Uuid){0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF}; // A minimal, basic test that heartbeats don't overwrite adjacent data when -// fields next to eachother are set. We set UUID first (well, create_app does), +// fields next to each other are set. We set UUID first (well, create_app does), // and then set the fields on either side, and verify that UUID remains // unchanged. // struct AppHeartbeat { diff --git a/tests/fw/services/blob_db/test_health_db.c b/tests/fw/services/blob_db/test_health_db.c index 669586a6..05cf643f 100644 --- a/tests/fw/services/blob_db/test_health_db.c +++ b/tests/fw/services/blob_db/test_health_db.c @@ -250,7 +250,7 @@ void test_health_db__movement_data(void) { cl_assert_equal_i(s_metric_updated_count, NUM_CURRENT_MOVEMENT_METRICS); - // check typicals (not stored) + // check typical (not stored) int32_t val_out; cl_assert(!health_db_get_typical_value(ActivityMetricStepCount, Monday, &val_out)); @@ -272,7 +272,7 @@ void test_health_db__sleep_data(void) { cl_assert_equal_i(s_metric_updated_count, NUM_CURRENT_SLEEP_METRICS); - // check typicals + // check typical int32_t val_out; cl_assert(health_db_get_typical_value(ActivityMetricSleepTotalSeconds, Monday, &val_out)); @@ -296,7 +296,7 @@ void test_health_db__hr_zone_data(void) { cl_assert_equal_i(s_metric_updated_count, NUM_CURRENT_HR_ZONE_METRICS); - // check typicals (not stored) + // check typical (not stored) int32_t val_out; cl_assert(!health_db_get_typical_value(ActivityMetricHeartRateZone1Minutes, Monday, &val_out)); diff --git a/tests/fw/services/blob_db/test_reminder_db.c b/tests/fw/services/blob_db/test_reminder_db.c index eac4a598..7ab8b630 100644 --- a/tests/fw/services/blob_db/test_reminder_db.c +++ b/tests/fw/services/blob_db/test_reminder_db.c @@ -266,7 +266,7 @@ void test_reminder_db__delete_parent(void) { prv_insert_default_reminders(); const TimelineItemId *parent_id = &item1.header.parent_id; - // cnfirm the two are here + // confirm the two are here cl_assert(reminder_db_get_len((uint8_t *)&item1.header.id, sizeof(Uuid)) > 0); cl_assert(reminder_db_get_len((uint8_t *)&item2.header.id, sizeof(Uuid)) > 0); // remove the two that share a parent @@ -283,7 +283,7 @@ void test_reminder_db__bad_item(void) { cl_assert(S_SUCCESS != reminder_db_insert((uint8_t *)&bad_item.common.id, UUID_SIZE, (uint8_t *)&bad_item, sizeof(bad_item))); } -void test_reminder_db__read_nonexistant(void) { +void test_reminder_db__read_nonexistent(void) { TimelineItem item = {{{0}}}; cl_assert_equal_i(E_DOES_NOT_EXIST, reminder_db_read_item(&item, &bad_item.common.id)); } @@ -301,7 +301,7 @@ void test_reminder_db__find_by_timestamp_title(void) { cl_assert_equal_b(reminder_db_find_by_timestamp_title(0, "nonexistent title", NULL, &reminder), false); - // Test matching timstamp, but not title + // Test matching timestamp, but not title cl_assert_equal_b(reminder_db_find_by_timestamp_title(title_item1.header.timestamp, "nonexistent title", NULL, &reminder), false); diff --git a/tests/fw/services/bluetooth/test_ble_hrm.c b/tests/fw/services/bluetooth/test_ble_hrm.c index 88dbec83..25a71062 100644 --- a/tests/fw/services/bluetooth/test_ble_hrm.c +++ b/tests/fw/services/bluetooth/test_ble_hrm.c @@ -380,7 +380,7 @@ void test_ble_hrm__grant_after_disconnection(void) { // Fake disconnection: s_connections[0] = NULL; - // Grabt permission after disconnection. + // Grab permission after disconnection. // Request object should be freed and thing shouldn't crash. prv_assert_permissions_ui_and_respond(true /* is_granted */); diff --git a/tests/fw/services/bluetooth/test_bluetooth_persistent_storage.c b/tests/fw/services/bluetooth/test_bluetooth_persistent_storage.c index 8511b306..f758619f 100644 --- a/tests/fw/services/bluetooth/test_bluetooth_persistent_storage.c +++ b/tests/fw/services/bluetooth/test_bluetooth_persistent_storage.c @@ -337,7 +337,7 @@ void test_bluetooth_persistent_storage__ble_store_and_get(void) { cl_assert_equal_m(&irk_out, &pairing_2.irk, sizeof(irk_out)); cl_assert_equal_m(&device_out, &pairing_2.identity, sizeof(device_out)); - // Add a thrid pairing + // Add a third pairing SMPairingInfo pairing_3; memset(&pairing_3, 0x00, sizeof(pairing_3)); pairing_3 = (SMPairingInfo) { @@ -726,7 +726,7 @@ void test_bluetooth_persistent_storage__bt_classic_store_and_get(void) { cl_assert_equal_s(name_2, name_out); cl_assert_equal_i(platform_bits_2, platform_bits_out); - // Add a thrid pairing + // Add a third pairing BTDeviceAddress addr_3 = {{0x31, 0x32, 0x33, 0x34, 0x35, 0x36}}; SM128BitKey link_key_3 = {{0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30}}; diff --git a/tests/fw/services/bluetooth/test_bluetooth_persistent_storage_prf.c b/tests/fw/services/bluetooth/test_bluetooth_persistent_storage_prf.c index ffd6aad4..088a8514 100644 --- a/tests/fw/services/bluetooth/test_bluetooth_persistent_storage_prf.c +++ b/tests/fw/services/bluetooth/test_bluetooth_persistent_storage_prf.c @@ -440,7 +440,7 @@ void test_bluetooth_persistent_storage_prf__bt_classic_store_and_get(void) { cl_assert_equal_s(name_2, name_out); cl_assert_equal_i(platform_bits_2, platform_bits_out); - // Add a thrid pairing + // Add a third pairing BTDeviceAddress addr_3 = {.octets = {0x31, 0x32, 0x33, 0x34, 0x35, 0x36}}; SM128BitKey link_key_3 = { .data = { diff --git a/tests/fw/services/comm_session/test_session.c b/tests/fw/services/comm_session/test_session.c index 0a5d5676..27724ae0 100644 --- a/tests/fw/services/comm_session/test_session.c +++ b/tests/fw/services/comm_session/test_session.c @@ -256,7 +256,7 @@ void test_session__last_system_session_wins(void) { comm_session_close(system_session2, CommSessionCloseReason_UnderlyingDisconnection); // The transport's .close is supposed to call this. - // The stub in this test doens't, so clean up manually: + // The stub in this test doesn't, so clean up manually: comm_session_close(system_session, CommSessionCloseReason_UnderlyingDisconnection); } diff --git a/tests/fw/services/comm_session/test_session_receive_router.c b/tests/fw/services/comm_session/test_session_receive_router.c index bcb9df4a..302aaa88 100644 --- a/tests/fw/services/comm_session/test_session_receive_router.c +++ b/tests/fw/services/comm_session/test_session_receive_router.c @@ -141,7 +141,7 @@ static void prv_set_connection_responsiveness(Transport *transport, } -// Referenced from protocol_endppints_table.auto.h override header: +// Referenced from protocol_endpoints_table.auto.h override header: /////////////////////////////////////////////////////////// typedef enum { diff --git a/tests/fw/services/compositor/test_compositor.c b/tests/fw/services/compositor/test_compositor.c index b7c547c3..fb7dcae6 100644 --- a/tests/fw/services/compositor/test_compositor.c +++ b/tests/fw/services/compositor/test_compositor.c @@ -276,7 +276,7 @@ void test_compositor__app_render_busy(void) { compositor_app_render_ready(); cl_assert_equal_i(s_count_display_update, 0); - // Now fake the display update completeing. The app should know draw. + // Now fake the display update completing. The app should know draw. s_display_update_in_progress = false; prv_handle_display_update_complete(); cl_assert_equal_i(s_count_display_update, 1); diff --git a/tests/fw/services/health/test_health.c b/tests/fw/services/health/test_health.c index 2d90d9b9..0939cc29 100644 --- a/tests/fw/services/health/test_health.c +++ b/tests/fw/services/health/test_health.c @@ -500,7 +500,7 @@ void test_health__range_to_day_id_clamps_values(void) { } void test_health__sum_full_days(void) { - // use values structured as binary mask so we can detect if we sum up currect days + // use values structured as binary mask so we can detect if we sum up correct days s_sys_activity_get_metric_values.out.history[0] = 1000; s_sys_activity_get_metric_values.out.history[1] = 2000; s_sys_activity_get_metric_values.out.history[2] = 4000; @@ -606,7 +606,7 @@ void test_health__process_range(void) { } void test_health__sum_fraction_days(void) { - // use values structured as binary mask so we can detect if we sum up currect days + // use values structured as binary mask so we can detect if we sum up correct days s_sys_activity_get_metric_values.out.history[0] = 1000; s_sys_activity_get_metric_values.out.history[1] = 2000; s_sys_activity_get_metric_values.out.history[2] = 4000; @@ -1308,7 +1308,7 @@ void test_health__avg_full_days(void) { time_util_get_midnight_of(now), HealthServiceTimeScopeDaily); cl_assert_equal_i(result, exp_daily); - // All of our tests set "now" to Mon, 28 Dec 2015 09:12:22 GMT, so yesteday was a Sunday + // All of our tests set "now" to Mon, 28 Dec 2015 09:12:22 GMT, so yesterday was a Sunday result = health_service_sum_averaged(HealthMetricStepCount, time_util_get_midnight_of(now) - SECONDS_PER_DAY, time_util_get_midnight_of(now), @@ -1434,7 +1434,7 @@ void test_health__avg_partial_days(void) { // --- // Compute weekend HealthMetricActiveSeconds average from 4am to 9am. This should use the - // daily totals since we don't havce 15-minute averages maintained for this metric + // daily totals since we don't have 15-minute averages maintained for this metric exp_value = (k_daily_total * 5 * MINUTES_PER_HOUR) / MINUTES_PER_DAY; // Since "today" is Monday, going back 24 hours puts us on a weekend @@ -1532,17 +1532,17 @@ static void prv_update_stats(HealthServiceStats *stats, HealthValue value) { // valid aggregation functions. The sum function is only applicable to cumulative metrics and is // tested above in test_health__sum_full_days(). -// DISBLAED because the firmware doesn't actually store daily history of HRM values. +// DISABLED because the firmware doesn't actually store daily history of HRM values. void DISABLED_test_health__min_max_avg_full_days(void) { // Get the current time and day const time_t now = rtc_get_time(); - const time_t yeserday_utc = now - SECONDS_PER_DAY; + const time_t yesterday_utc = now - SECONDS_PER_DAY; struct tm local_tm; localtime_r(&now, &local_tm); DayInWeek todays_day_in_week = local_tm.tm_wday; - localtime_r(&yeserday_utc, &local_tm); + localtime_r(&yesterday_utc, &local_tm); DayInWeek yesterday_day_in_week = local_tm.tm_wday; bool yesterday_was_weekend = (yesterday_day_in_week == Sunday) || (yesterday_day_in_week == Saturday); diff --git a/tests/fw/services/notifications/test_ancs_filtering.c b/tests/fw/services/notifications/test_ancs_filtering.c index 5c3fad26..90fae357 100644 --- a/tests/fw/services/notifications/test_ancs_filtering.c +++ b/tests/fw/services/notifications/test_ancs_filtering.c @@ -127,7 +127,7 @@ void test_ancs_filtering__record_app_no_action_needed(void) { } void test_ancs_filtering__record_app_no_prefs_yet(void) { - // No existing prefs yet, we should instert all the defaults + // No existing prefs yet, we should insert all the defaults iOSNotifPrefs *existing_prefs = NULL; AttributeList attr_list = { diff --git a/tests/fw/services/notifications/test_ancs_notifications.c b/tests/fw/services/notifications/test_ancs_notifications.c index f4c4d87f..1c5d2e75 100644 --- a/tests/fw/services/notifications/test_ancs_notifications.c +++ b/tests/fw/services/notifications/test_ancs_notifications.c @@ -142,7 +142,7 @@ void test_ancs_notifications__handle_phone_call_message(void) { ancs_notifications_handle_message(37, properties, notif_attributes, app_attributes); - // We just processed an incomming phone call event, there better be a phone event scheduled! + // We just processed an incoming phone call event, there better be a phone event scheduled! PebbleEvent event = fake_event_get_last(); cl_assert_equal_i(event.type, PEBBLE_PHONE_EVENT); diff --git a/tests/fw/services/notifications/test_nexmo.c b/tests/fw/services/notifications/test_nexmo.c index fa98d8eb..aba0ae56 100644 --- a/tests/fw/services/notifications/test_nexmo.c +++ b/tests/fw/services/notifications/test_nexmo.c @@ -68,7 +68,7 @@ void test_nexmo__initialize(void) { void test_nexmo__cleanup(void) { } -void test_nexmo__is_reuath_sms(void) { +void test_nexmo__is_reauth_sms(void) { uint8_t expected_app_id_buf[128]; ANCSAttribute *expected_app_id = (ANCSAttribute *)&expected_app_id_buf; expected_app_id->length = strlen(IOS_SMS_APP_ID); @@ -103,7 +103,7 @@ void test_nexmo__is_reuath_sms(void) { cl_assert(!nexmo_is_reauth_sms(bad_app_id, bad_message)); } -void test_nexmo__handle_reuath_sms(void) { +void test_nexmo__handle_reauth_sms(void) { // UID const uint32_t uid = 42; s_expected_uid = uid; diff --git a/tests/fw/services/protobuf_log/test_protobuf_log.c b/tests/fw/services/protobuf_log/test_protobuf_log.c index 7ae7551b..127f2da7 100644 --- a/tests/fw/services/protobuf_log/test_protobuf_log.c +++ b/tests/fw/services/protobuf_log/test_protobuf_log.c @@ -690,7 +690,7 @@ void test_protobuf_log__measurements_auto_flush(void) { values[i] = i * 3; } - // Create a session with an artifically small buffer size which will cause it to flush + // Create a session with an artificially small buffer size which will cause it to flush // automatically time_t start_time = rtc_get_time(); ProtobufLogConfig log_config = { diff --git a/tests/fw/services/settings/test_settings_file.c b/tests/fw/services/settings/test_settings_file.c index bce29773..631561d8 100644 --- a/tests/fw/services/settings/test_settings_file.c +++ b/tests/fw/services/settings/test_settings_file.c @@ -107,7 +107,7 @@ static void set_and_verify(SettingsFile *file, uint8_t *key, int key_len, } void test_settings_file__set_get_one(void) { - printf("\nTesting setting and retreiving a single key a single time...\n"); + printf("\nTesting setting and retrieving a single key a single time...\n"); SettingsFile file; cl_must_pass(settings_file_open(&file, "test_file_set_get_one", 4096)); uint8_t key[4]; @@ -121,7 +121,7 @@ void test_settings_file__set_get_one(void) { } void test_settings_file__set_get_one_many_times(void) { - printf("\nTesting setting and retreiving a key several times...\n"); + printf("\nTesting setting and retrieving a key several times...\n"); SettingsFile file; cl_must_pass(settings_file_open(&file, "test_file_set_get_one_many_times", 4096)); uint8_t key[4]; @@ -320,7 +320,7 @@ void test_settings_file__used_space_tracking(void) { set_and_verify(&file, key, key_len, val, val_len); } - // Then, write to the same key many many times. This should only use up 16 + // Then, write to the same key many, many, times. This should only use up 16 // more bytes of the file if our used/free space tracking is working // correctly, but may end up being counted as more if it's broken. snprintf((char *)key, sizeof(key), "k%03d", 128); @@ -405,7 +405,7 @@ static RecordResult write_and_change_record_aborting_after_bytes(int after_n_byt return RecordResultNew; } // Should not get here! This means that neither the old nor the new value - // could be retreived, and thus the atomicity is broken! Aaaaaaaaaaaaaah!! + // could be retrieved, and thus the atomicity is broken! Aaaaaaaaaaaaaah!! cl_assert(false); } fake_spi_flash_force_future_failure(after_n_bytes, &jmp); diff --git a/tests/fw/services/test_do_not_disturb.c b/tests/fw/services/test_do_not_disturb.c index 623c2fc0..231faafb 100644 --- a/tests/fw/services/test_do_not_disturb.c +++ b/tests/fw/services/test_do_not_disturb.c @@ -321,7 +321,7 @@ void test_do_not_disturb__disabling_manual_dnd_should_override_scheduled(void) { active = do_not_disturb_is_active(); cl_assert(active == true); // Both OFF - do_not_disturb_set_manually_enabled(false); // turned Manual OFF, scheduled should be overriden + do_not_disturb_set_manually_enabled(false); // turned Manual OFF, scheduled should be overridden cl_assert(do_not_disturb_is_manually_enabled() == false); cl_assert(do_not_disturb_is_schedule_enabled(WeekdaySchedule) == true); active = do_not_disturb_is_active(); diff --git a/tests/fw/services/test_hrm_manager.c b/tests/fw/services/test_hrm_manager.c index 441f17c9..ed63ff6d 100644 --- a/tests/fw/services/test_hrm_manager.c +++ b/tests/fw/services/test_hrm_manager.c @@ -217,7 +217,7 @@ void test_hrm_manager__subscription(void) { cl_assert_equal_b(hrm_is_enabled(HRM), false); } -// When we cleanup after an app process, its subscription, if any, should get an expriration time +// When we cleanup after an app process, its subscription, if any, should get an expiration time // placed on it void test_hrm_manager__app_cleanup(void) { stub_pebble_tasks_set_current(PebbleTask_App); diff --git a/tests/fw/services/test_music_endpoint.c b/tests/fw/services/test_music_endpoint.c index b6a3903a..0b0c002e 100644 --- a/tests/fw/services/test_music_endpoint.c +++ b/tests/fw/services/test_music_endpoint.c @@ -296,19 +296,19 @@ void test_music_endpoint__receive_zero_length_now_playing(void) { cl_assert_equal_b(music_has_now_playing(), false); } -void test_music_endpoint__ignore_malformatted_messages(void) { +void test_music_endpoint__ignore_malformed_messages(void) { // Android app connects: prv_receive_app_info_event(true /* is_android */); - const uint8_t malformatted_artist[] = { + const uint8_t malformed_artist[] = { 0x10, 14, 'o', 'n', 'e', 3, 't', 'w', 'o', 5, 't', 'h', 'r', 'e', 'e' }; - const uint8_t malformatted_album[] = { + const uint8_t malformed_album[] = { 0x10, 3, 'o', 'n', 'e', 10, 't', 'w', 'o', 5, 't', 'h', 'r', 'e', 'e' }; - const uint8_t malformatted_title[] = { + const uint8_t malformed_title[] = { 0x10, 3, 'o', 'n', 'e', 3, 't', 'w', 'o', 6, 't', 'h', 'r', 'e', 'e' }; - const uint8_t malformatted_player[] = { + const uint8_t malformed_player[] = { 0x13, 17, 'c', 'o', 'm', '.', 's', 'p', 'o', 't', 'i', 'f', 'y', '.', 'm', 'u', 's', 'i', 'c', 9, 'S', 'p', 'o', 't', 'i', 'f', 'y' }; @@ -316,10 +316,10 @@ void test_music_endpoint__ignore_malformatted_messages(void) { const uint8_t *data; uint16_t length; } test_vectors[] = { - { malformatted_artist, sizeof(malformatted_artist) }, - { malformatted_album, sizeof(malformatted_album) }, - { malformatted_title, sizeof(malformatted_title) }, - { malformatted_player, sizeof(malformatted_player) } + { malformed_artist, sizeof(malformed_artist) }, + { malformed_album, sizeof(malformed_album) }, + { malformed_title, sizeof(malformed_title) }, + { malformed_player, sizeof(malformed_player) } }; for (int i = 0; i < ARRAY_LENGTH(test_vectors); ++i) { prv_receive_pp_data(test_vectors[i].data, test_vectors[i].length); diff --git a/tests/fw/services/test_pfs.c b/tests/fw/services/test_pfs.c index 1b6221a5..2c95b97e 100644 --- a/tests/fw/services/test_pfs.c +++ b/tests/fw/services/test_pfs.c @@ -671,7 +671,7 @@ void test_pfs__migration(void) { pfs_init(true); ftl_force_version(1); - // simulate a migration by leaving leaving files in various states + // simulate a migration by leaving files in various states // in the first region. Then try to add another region and confirm // none of the files have been corrupted char file_small[10]; @@ -930,7 +930,7 @@ void test_pfs__start_page_collides_with_gc_page(void) { test_force_recalc_of_gc_region(); pfs_init(false); - int expected_remaing_files = pages_per_sector - 1; + int expected_remaining_files = pages_per_sector - 1; // scatter files across two sectors for (int i = 0; i < (pages_per_sector + start_page_offset); i++) { @@ -941,14 +941,14 @@ void test_pfs__start_page_collides_with_gc_page(void) { pfs_close(fd); // delete some files in the region so a garbage collection will do something - if (i >= expected_remaing_files) { + if (i >= expected_remaining_files) { pfs_remove(filename); } } test_force_garbage_collection(pages_per_sector); - for (int i = 0; i < expected_remaing_files; i++) { + for (int i = 0; i < expected_remaining_files; i++) { char filename[20]; sprintf(filename, "test%d", i + start_page_offset); int fd = pfs_open(filename, OP_FLAG_READ, FILE_TYPE_STATIC, 10); diff --git a/tests/fw/services/test_shared_prf_storage_v3.c b/tests/fw/services/test_shared_prf_storage_v3.c index 6bcc2e55..4d54a844 100644 --- a/tests/fw/services/test_shared_prf_storage_v3.c +++ b/tests/fw/services/test_shared_prf_storage_v3.c @@ -424,7 +424,7 @@ void test_shared_prf_storage_v3__write_in_loop_getting_started_confirm_data_stil } // Sets the getting started field, then corrupts the getting_started crc -void test_shared_prf_storage_v3__handle_currupt_field_same(void) { +void test_shared_prf_storage_v3__handle_corrupt_field_same(void) { bool GETTING_STARTED_COMPLETE = true; shared_prf_storage_set_getting_started_complete(GETTING_STARTED_COMPLETE); cl_assert_equal_i(shared_prf_storage_get_valid_page_number(), 0); @@ -470,7 +470,7 @@ void test_shared_prf_storage_v3__handle_currupt_field_same(void) { // Sets the getting started field, then corrupts the ble_pairing_data crc // This tests that when setting a value, all fields in the struct must be valid. -void test_shared_prf_storage_v3__handle_currupt_field_during_setting(void) { +void test_shared_prf_storage_v3__handle_corrupt_field_during_setting(void) { bool GETTING_STARTED_COMPLETE = true; shared_prf_storage_set_getting_started_complete(GETTING_STARTED_COMPLETE); cl_assert_equal_i(shared_prf_storage_get_valid_page_number(), 0); diff --git a/tests/fw/services/test_smartstrap_comms.c b/tests/fw/services/test_smartstrap_comms.c index 36975940..e0aafcbd 100644 --- a/tests/fw/services/test_smartstrap_comms.c +++ b/tests/fw/services/test_smartstrap_comms.c @@ -147,7 +147,7 @@ void test_smartstrap_comms__send_receive_data(void) { // faked on-the-wire data for response uint8_t response_raw[] = {0x7E, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x43, 0x7E}; - // send the rquest + // send the request prv_do_send(&write_mbuf, &read_mbuf, expected, sizeof(expected)); // process the fake response prv_do_read(response_raw, sizeof(response_raw), &read_mbuf, test_data, sizeof(test_data)); diff --git a/tests/fw/services/test_timezone_database.c b/tests/fw/services/test_timezone_database.c index 4192bab7..1ccff647 100644 --- a/tests/fw/services/test_timezone_database.c +++ b/tests/fw/services/test_timezone_database.c @@ -46,7 +46,7 @@ void test_timezone_database__get_region_count(void) { } void test_timezone_database__find_region_by_name_simple(void) { - // Unforunately we don't really care what the resulting region ids are, we should + // Unfortunately we don't really care what the resulting region ids are, we should // just make sure the ones that exist are there and they're unique from each other. const int america_new_york_region = FIND_REGION("America/New_York"); diff --git a/tests/fw/services/test_voice_endpoint.c b/tests/fw/services/test_voice_endpoint.c index ce0063c7..e00f53d2 100644 --- a/tests/fw/services/test_voice_endpoint.c +++ b/tests/fw/services/test_voice_endpoint.c @@ -506,7 +506,7 @@ void test_voice_endpoint__handle_nlp_result(void) { cl_assert_equal_i(s_session_result, VoiceEndpointResultSuccess); cl_assert_equal_i(s_session_id, 0x2211); - // test non nexistent timestamp msg + // test nonexistent timestamp msg nlp_result[8] = 1; s_session_id = 0; voice_endpoint_protocol_msg_callback(NULL, nlp_result, sizeof(nlp_result) - 7); diff --git a/tests/fw/services/timeline/test_timeline_peek_event.c b/tests/fw/services/timeline/test_timeline_peek_event.c index 8c17a3d7..602b3c58 100644 --- a/tests/fw/services/timeline/test_timeline_peek_event.c +++ b/tests/fw/services/timeline/test_timeline_peek_event.c @@ -741,7 +741,7 @@ void test_timeline_peek_event__one_persistent_event_lifecycle(void) { CHECK_NO_EVENTS( .count = 6, .is_future_empty = true ); } -void test_timeline_peek_event__upcoming_priotized_over_persistent_event_lifecycle(void) { +void test_timeline_peek_event__upcoming_prioritized_over_persistent_event_lifecycle(void) { TimelineItem item = DEFINE_EVENT( .id = 0x01, .timestamp = 20 * SECONDS_PER_MINUTE, .duration = 70, .persistent = true ); diff --git a/tests/fw/system/test_flash_region.c b/tests/fw/system/test_flash_region.c index fab8aad9..5ba1a55a 100644 --- a/tests/fw/system/test_flash_region.c +++ b/tests/fw/system/test_flash_region.c @@ -148,7 +148,7 @@ void test_flash_region__erase_optimal_range_96k_app_banks(void) { s_command_list_index = 0; - // App that's in an aligned bank but larger than than 64k + // App that's in an aligned bank but larger than 64k flash_region_erase_optimal_range(0, 0, 69 * 1024, 96 * 1024); cl_assert_equal_i(s_command_list_index, 3); @@ -185,7 +185,7 @@ void test_flash_region__erase_optimal_range_96k_app_banks(void) { s_command_list_index = 0; - // App that's in an unaligned bank but larger than than 64k + // App that's in an unaligned bank but larger than 64k flash_region_erase_optimal_range(32 * 1024, 32 * 1024, (32 + 71) * 1024, (32 + 96) * 1024); cl_assert_equal_i(s_command_list_index, 9); diff --git a/tests/fw/test_alarm_common.h b/tests/fw/test_alarm_common.h index aaf9a8ae..db7f1f9b 100644 --- a/tests/fw/test_alarm_common.h +++ b/tests/fw/test_alarm_common.h @@ -114,7 +114,7 @@ static int s_current_day = 0; static const int s_thursday = 1426118400; // Friday March 13, 2015, 00:00 UTC static const int s_friday = 1426204800; -// Saturaday March 14, 2015, 00:00 UTC +// Saturday March 14, 2015, 00:00 UTC static const int s_saturday = 1426291200; // Sunday March 15, 2015, 00:00 UTC static const int s_sunday = 1426377600; diff --git a/tests/fw/test_app_run_state.c b/tests/fw/test_app_run_state.c index edbf88b7..dd63d226 100644 --- a/tests/fw/test_app_run_state.c +++ b/tests/fw/test_app_run_state.c @@ -206,7 +206,7 @@ void test_app_run_state__send_update(void) { } void test_app_run_state__protocol_msg_callback(void) { - // Tests app_run_state_procotol_msg_callback which should take data + // Tests app_run_state_protocol_msg_callback which should take data // from a source and perform the appropriate command prv_set_remote_active(); prv_set_remote_capability(CommSessionRunState); diff --git a/tests/fw/test_debug_db.c b/tests/fw/test_debug_db.c index 88e16452..eb35e8a7 100644 --- a/tests/fw/test_debug_db.c +++ b/tests/fw/test_debug_db.c @@ -39,7 +39,7 @@ void test_debug_db__initialize(void) { void test_debug_db__cleanup(void) { } -void test_debug_db__unitialized(void) { +void test_debug_db__uninitialized(void) { int index; uint8_t id; diff --git a/tests/fw/test_heap.c b/tests/fw/test_heap.c index a9893c9b..f62a3d32 100644 --- a/tests/fw/test_heap.c +++ b/tests/fw/test_heap.c @@ -234,7 +234,7 @@ void test_heap___heap_bytes_free(void) { int after_available = heap_bytes_free(); - // make sure the two values are within 16 bytes (usually shoule be 0-8, but 16 for safety) + // make sure the two values are within 16 bytes (usually should be 0-8, but 16 for safety) cl_assert(abs((before_available - malloc_size_bytes) - after_available) < 16); heap_free(heap, ptr, 0); @@ -263,7 +263,7 @@ void test_heap__heap_bytes_used(void) { int after_used = heap_bytes_used(); - // make sure the two values are within 16 bytes (usually shoule be 0-8, but 16 for safety) + // make sure the two values are within 16 bytes (usually should be 0-8, but 16 for safety) cl_assert(abs((before_used + malloc_size_bytes) - (after_used)) < 16); heap_free(heap, ptr, 0); @@ -331,7 +331,7 @@ static void prv_alloc_and_test_fuzz_on_free(bool enabled) { heap_free(heap, test, 0); if (enabled) { - // the memory was fuzz'ed, better not match + // the memory was fuzzed, better not match cl_assert(memcmp(test, test_string, strlen(test_string)) != 0); } else { // free'd data should match what was already there diff --git a/tests/fw/test_launcher_app_message.c b/tests/fw/test_launcher_app_message.c index f281bf54..3a1f5502 100644 --- a/tests/fw/test_launcher_app_message.c +++ b/tests/fw/test_launcher_app_message.c @@ -138,7 +138,7 @@ void test_launcher_app_message__cleanup(void) { fake_system_task_callbacks_cleanup(); } -void test_launcher_app_message__ingore_too_short_message(void) { +void test_launcher_app_message__ignore_too_short_message(void) { uint8_t too_short = 0; launcher_app_message_protocol_msg_callback_deprecated(s_session, &too_short, sizeof(too_short)); fake_comm_session_process_send_next(); diff --git a/tests/fw/test_phone_formatting.c b/tests/fw/test_phone_formatting.c index 90ee4277..f7278aa0 100644 --- a/tests/fw/test_phone_formatting.c +++ b/tests/fw/test_phone_formatting.c @@ -108,7 +108,7 @@ void test_phone_formatting__overflowing_first_name(void) { char dest[NAME_LENGTH]; memset(dest, GUARD_CHAR, NAME_LENGTH); - phone_format_caller_name("Pankajavalli Balamarugan", dest, buffer_length); + phone_format_caller_name("Pankajavalli Balamurugan", dest, buffer_length); cl_assert_equal_s(dest, "Pankajava"); cl_assert_equal_m(dest + buffer_length, GUARD_REFERENCE, NAME_LENGTH - buffer_length); diff --git a/tests/fw/test_resource.c b/tests/fw/test_resource.c index eb3b1230..1c6d577e 100644 --- a/tests/fw/test_resource.c +++ b/tests/fw/test_resource.c @@ -373,7 +373,7 @@ void test_resource__read_past_last_byte_resource(void) { size_t image_size = resource_size(resource_bank, no_litter_res_id); uint8_t image_buf[image_size]; - // read the last byte, and make sure it returns a a failure 0 byte return value + // read the last byte, and make sure it returns a failure 0 byte return value cl_assert_equal_i( resource_load_byte_range_system(resource_bank, no_litter_res_id, image_size, image_buf, 1), 0); diff --git a/tests/fw/test_utf8_iterator.c b/tests/fw/test_utf8_iterator.c index 93dc58ef..c0f68f15 100644 --- a/tests/fw/test_utf8_iterator.c +++ b/tests/fw/test_utf8_iterator.c @@ -197,7 +197,7 @@ void test_utf8_iterator__each_codepoint_invalid(void) { cl_assert_equal_i(s_each_count, 0); } -void test_utf8_iterator__each_codepoint_emptry_string(void) { +void test_utf8_iterator__each_codepoint_empty_string(void) { void *context = (void *)(uintptr_t)0x42; const char *str = ""; s_each_count = 0; diff --git a/tests/fw/ui/test_animation.c b/tests/fw/ui/test_animation.c index c56afdd9..81bdfb25 100644 --- a/tests/fw/ui/test_animation.c +++ b/tests/fw/ui/test_animation.c @@ -159,7 +159,7 @@ static uint64_t prv_now_ms(void) { static void prv_advance_by_ms_no_timers(uint64_t ms_delta) { uint64_t target_ms = prv_now_ms() + ms_delta; - // Comppensate for rounding errors + // Compensate for rounding errors uint64_t new_ticks = rtc_get_ticks() + (ms_delta * RTC_TICKS_HZ + 500 ) / 1000; uint64_t new_ms = (new_ticks * 1000 + RTC_TICKS_HZ / 2) / RTC_TICKS_HZ; if (new_ms == target_ms - 1) { @@ -1126,7 +1126,7 @@ void test_animation__property_gcolor8(void) { // -------------------------------------------------------------------------------------- // Test that the schedule/unschedule calls work correctly. -// We should be able to unschedule an amimation parthway through +// We should be able to unschedule an animation partway through void test_animation__unschedule(void) { #ifdef TEST_INCLUDE_BASIC PropertyAnimation *prop_h; @@ -3466,7 +3466,7 @@ void test_animation__sequence_of_already_completed(void) { // -------------------------------------------------------------------------------------- -// Test creating a spawn where where some children are already scheduled and some have +// Test creating a spawn where some children are already scheduled and some have // already completed. // // Here's a graph of what we are doing diff --git a/tests/fw/ui/test_kino_player.c b/tests/fw/ui/test_kino_player.c index d190c27f..b7a91e26 100644 --- a/tests/fw/ui/test_kino_player.c +++ b/tests/fw/ui/test_kino_player.c @@ -115,7 +115,7 @@ void test_kino_player__cleanup(void) { extern void prv_play_animation_update(Animation *animation, const AnimationProgress normalized); -void test_kino_player__finite_animation_finite_reel_foward(void) { +void test_kino_player__finite_animation_finite_reel_forward(void) { // Choose duration and elapsed to have clean division for // ANIMATION_NORMALIZED_MAX * elapsed / duration = whole_number test_reel_data->duration_ms = 300; @@ -127,7 +127,7 @@ void test_kino_player__finite_animation_finite_reel_foward(void) { cl_assert_equal_i(kino_reel_get_elapsed(test_reel), 20); } -void test_kino_player__create_finite_animation_finite_reel_foward(void) { +void test_kino_player__create_finite_animation_finite_reel_forward(void) { // Choose duration and elapsed to have clean division for // ANIMATION_NORMALIZED_MAX * elapsed / duration = whole_number test_reel_data->duration_ms = 300; diff --git a/tests/fw/ui/test_window_stack.c b/tests/fw/ui/test_window_stack.c index de282bee..5ca537cc 100644 --- a/tests/fw/ui/test_window_stack.c +++ b/tests/fw/ui/test_window_stack.c @@ -532,7 +532,7 @@ void test_window_stack__insert_next(void) { // Description: // During the push of a window, we push another window in the load handler of -// the window being pushed. This causes the loading window to disappaer from +// the window being pushed. This causes the loading window to disappear from // the screen (before it even appeared) and become subverted by the new window. void test_window_stack__push_during_window_load(void) { Window *window = window_create(); diff --git a/tests/fw/util/test_ihex.c b/tests/fw/util/test_ihex.c index 755f17a8..0a8015f3 100644 --- a/tests/fw/util/test_ihex.c +++ b/tests/fw/util/test_ihex.c @@ -32,7 +32,7 @@ void test_ihex__initialize(void) { static void prv_assert_ihex(const char *expected) { int len = strlen(expected); - // Cehck that bytes aren't touched past the end of the record. + // Check that bytes aren't touched past the end of the record. for (int i=len; i < sizeof(s_result); ++i) { cl_assert_equal_i(0x20, s_result[i]); } diff --git a/tests/fw/util/test_mbuf.c b/tests/fw/util/test_mbuf.c index 787221a6..cf16f62a 100644 --- a/tests/fw/util/test_mbuf.c +++ b/tests/fw/util/test_mbuf.c @@ -99,7 +99,7 @@ void test_mbuf__length(void) { } void test_mbuf__iter_empty(void) { - // test iteratoring over empty mbuf chains + // test iterating over empty mbuf chains MBuf mbuf1 = MBUF_EMPTY; MBuf mbuf2 = MBUF_EMPTY; MBufIterator iter; @@ -133,7 +133,7 @@ void test_mbuf__iter_modify(void) { for (int i = 0; i < 6; i++) { cl_assert(!mbuf_iterator_is_finished(&write_iter)); cl_assert(!mbuf_iterator_is_finished(&read_iter)); - // check we're on the exected mbuf + // check we're on the expected mbuf if (i < 3) { cl_assert(mbuf_iterator_get_current_mbuf(&write_iter) == &mbuf1); cl_assert(mbuf_iterator_get_current_mbuf(&read_iter) == &mbuf1); diff --git a/tests/fw/util/test_mktime.c b/tests/fw/util/test_mktime.c index 0530ea8d..d6995644 100644 --- a/tests/fw/util/test_mktime.c +++ b/tests/fw/util/test_mktime.c @@ -21,7 +21,7 @@ // Tests /////////////////////////////////////////////////////////// -void test_mktime__bithdays(void) { +void test_mktime__birthdays(void) { struct tm francois_birthday = { .tm_sec = 0, .tm_min = 44, diff --git a/tests/libc/printf/test_sprintf.c b/tests/libc/printf/test_sprintf.c index dc39c17d..06cc9b61 100644 --- a/tests/libc/printf/test_sprintf.c +++ b/tests/libc/printf/test_sprintf.c @@ -601,7 +601,7 @@ void test_sprintf__percent_n(void) { snprintf(dstbuf, 256, "%n", &val); cl_assert_equal_i(val, 0); - snprintf(dstbuf, 256, "Incredible mechanical monster%n comming soon%n!!", &val, &val2); + snprintf(dstbuf, 256, "Incredible mechanical monster%n coming soon%n!!", &val, &val2); cl_assert_equal_i(val, 29); cl_assert_equal_i(val2, 42); diff --git a/tests/libutil/test_circular_buffer.c b/tests/libutil/test_circular_buffer.c index 5ac5ab2a..347f3ee4 100644 --- a/tests/libutil/test_circular_buffer.c +++ b/tests/libutil/test_circular_buffer.c @@ -213,7 +213,7 @@ void test_circular_buffer__read_or_copy_returns_false_when_length_is_too_long(vo malloc, &caller_should_free)); } -void test_circular_buffer__read_or_copy_doesnt_copy_when_already_continguously_stored(void) { +void test_circular_buffer__read_or_copy_doesnt_copy_when_already_contiguously_stored(void) { CircularBuffer buffer; uint8_t storage[8]; circular_buffer_init(&buffer, storage, sizeof(storage)); @@ -230,7 +230,7 @@ static void *prv_oom_malloc(size_t length) { return NULL; } -void test_circular_buffer__read_or_copy_does_copy_when_not_continguously_stored(void) { +void test_circular_buffer__read_or_copy_does_copy_when_not_contiguously_stored(void) { CircularBuffer buffer; uint8_t storage[8]; circular_buffer_init(&buffer, storage, sizeof(storage)); diff --git a/tests/libutil/test_math_fixed.c b/tests/libutil/test_math_fixed.c index c84bf092..f22d7ec2 100644 --- a/tests/libutil/test_math_fixed.c +++ b/tests/libutil/test_math_fixed.c @@ -230,7 +230,7 @@ void test_math_fixed__S16_3_rounding(void) { // This test shows how the in between fractional values evaluate to the fixed representation // Positive numbers round down to nearest fraction - // Negative numbers round up to neareset fraction + // Negative numbers round up to nearest fraction test_num = (int16_t)((float)-1.249 * (1 << FIXED_S16_3_PRECISION)); num = (Fixed_S16_3){ .raw_value = test_num }; cl_assert(num.integer == -2); @@ -444,7 +444,7 @@ void test_math_fixed__S32_16_mul(void) { Fixed_S32_16 num1, num2; Fixed_S32_16 mul, mul_c; - // Test number muliplication + // Test number multiplication num1 = FIXED_S32_16_ONE; num2 = FIXED_S32_16_ONE; mul = Fixed_S32_16_mul(num1, num2); diff --git a/tests/libutil/test_string.c b/tests/libutil/test_string.c index a107f83c..8fbffb92 100644 --- a/tests/libutil/test_string.c +++ b/tests/libutil/test_string.c @@ -109,7 +109,7 @@ void test_string__test_itoa_int(void) { } void test_string__test_byte_stream_to_hex_string(void) { - char result_buf[256]; // arbitraily large + char result_buf[256]; // arbitrarily large const uint8_t byte_stream[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; const char *expected_result_fwd = "00010203040506070809"; diff --git a/tests/overrides/default/README.md b/tests/overrides/default/README.md index 8b3b6417..bd67c947 100644 --- a/tests/overrides/default/README.md +++ b/tests/overrides/default/README.md @@ -30,7 +30,7 @@ test's `clar()` build rule. files `#include`'ing these files always fail to compile unless overridden? - Is using `#ifdef __ARM__` conditional compilation to replace - ARM-specific code with a gneric version insufficient? Would it require + ARM-specific code with a generic version insufficient? Would it require adding test-harness code to the source tree? If the answer to any of the above questions is "no", then adding an diff --git a/tests/test_images/fill_radial_origin_aa_precise_halfs_letter_c.1bit.png b/tests/test_images/fill_radial_origin_aa_precise_halves_letter_c.1bit.png similarity index 100% rename from tests/test_images/fill_radial_origin_aa_precise_halfs_letter_c.1bit.png rename to tests/test_images/fill_radial_origin_aa_precise_halves_letter_c.1bit.png diff --git a/tests/test_images/fill_radial_origin_aa_precise_halfs_letter_c.8bit.png b/tests/test_images/fill_radial_origin_aa_precise_halves_letter_c.8bit.png similarity index 100% rename from tests/test_images/fill_radial_origin_aa_precise_halfs_letter_c.8bit.png rename to tests/test_images/fill_radial_origin_aa_precise_halves_letter_c.8bit.png diff --git a/tools/activity/fft.py b/tools/activity/fft.py index 8b57d3bf..f62e69c1 100644 --- a/tools/activity/fft.py +++ b/tools/activity/fft.py @@ -305,7 +305,7 @@ def compute_magnitude(x): ################################################################################################### -def apply_gausian(x, width=0.1): +def apply_gaussian(x, width=0.1): """ Multiply x by the gaussian function. Width is a fraction, like 0.1 """ result = [] @@ -377,8 +377,8 @@ if __name__ == '__main__': print "\n############ INPUT ######################" print_graph(input) - print "\n############ GAUSIAN OF INPUT ############" - # input = apply_gausian(input, 0.1) + print "\n############ GAUSSIAN OF INPUT ############" + # input = apply_gaussian(input, 0.1) print_graph(input) result = real_value_fft(input) @@ -425,7 +425,7 @@ if __name__ == '__main__': input = [x - mean_mag for x in input] print "\n############ INPUT ######################" - # input = apply_gausian(input) + # input = apply_gaussian(input) print_graph(input) result = real_value_fft(input) diff --git a/tools/activity/parse_activity_data_logging_records.py b/tools/activity/parse_activity_data_logging_records.py index 18fa7320..990a92fd 100644 --- a/tools/activity/parse_activity_data_logging_records.py +++ b/tools/activity/parse_activity_data_logging_records.py @@ -164,7 +164,7 @@ class JIRASupport(object): watch_logs = [] got_device_logs = False for path in sorted(local_attachment_paths): - # iOS uses "watch_logs...", Android <2.1 uses "pebble.log", and Androind >=2.1 (Holo) + # iOS uses "watch_logs...", Android <2.1 uses "pebble.log", and Android >=2.1 (Holo) # uses "device-logs.log" if "watch_logs" not in path and "pebble.log" not in path and "device-logs" not in path: # Not a watch_logs... file @@ -505,7 +505,7 @@ class ParseMinuteStatsFile(object): print(" // The unit tests parse the //> TEST_.* lines below for test values") print(" //> TEST_NAME %s" % (self.sample_prefix)) print(SLEEP_DEFAULT_EXPECTED_TEXT) - print(" // list of: {steps, orientation, vmc, ligh}") + print(" // list of: {steps, orientation, vmc, light}") print(" static AlgDlsMinuteData samples[] = {") else: diff --git a/tools/analyze_mcu_flash_find_unclaimed.py b/tools/analyze_mcu_flash_find_unclaimed.py index 15e7d504..961f376a 100755 --- a/tools/analyze_mcu_flash_find_unclaimed.py +++ b/tools/analyze_mcu_flash_find_unclaimed.py @@ -28,7 +28,7 @@ def contains(a, b): def claim(c, unclaimed_regions, symbol): """ Removes region (c_start, c_end) from the set of unclaimed_regions - Return True if the region was sucessfully removed, False if it was + Return True if the region was successfully removed, False if it was already claimed. """ diff --git a/tools/analyze_mcu_flash_usage_treemap.html b/tools/analyze_mcu_flash_usage_treemap.html index 6f9ae497..9d27fc95 100644 --- a/tools/analyze_mcu_flash_usage_treemap.html +++ b/tools/analyze_mcu_flash_usage_treemap.html @@ -168,7 +168,7 @@ function renderJson(root) { // Aggregate the values for internal nodes. This is normally done by the // treemap layout, but not here because of our custom implementation. // We also take a snapshot of the original children (_children) to avoid - // the children being overwritten when when layout is computed. + // the children being overwritten when layout is computed. function accumulate(d) { return (d._children = d.children) ? d.value = d.children.reduce(function(p, v) { return p + accumulate(v); }, 0) diff --git a/tools/app_header.py b/tools/app_header.py index 921413d1..80f2cf27 100644 --- a/tools/app_header.py +++ b/tools/app_header.py @@ -28,7 +28,7 @@ class PebbleAppHeader(object): # 116 bytes V1_STRUCT_VERSION = (0x08, 0x01) - V1_STRUCT_DEFINTION = [ + V1_STRUCT_DEFINITION = [ # format, name, deserialization transform, serialization transform ('B', 'sdk_version_major', None, None), ('B', 'sdk_version_minor', None, None), @@ -49,9 +49,9 @@ class PebbleAppHeader(object): # 120 bytes V2_STRUCT_VERSION = (0x10, 0x00) - V2_STRUCT_DEFINTION = list(V1_STRUCT_DEFINTION) - del V2_STRUCT_DEFINTION[12] # relocation list was dropped in v2.x - V2_STRUCT_DEFINTION += [ + V2_STRUCT_DEFINITION = list(V1_STRUCT_DEFINITION) + del V2_STRUCT_DEFINITION[12] # relocation list was dropped in v2.x + V2_STRUCT_DEFINITION += [ ('I', 'resource_crc', None, None), ('I', 'resource_timestamp', None, None), ('H', 'virtual_size', None, None), @@ -59,8 +59,8 @@ class PebbleAppHeader(object): V2_HEADER_LENGTH = 10 + 120 DEFINITION_MAP = { - V1_STRUCT_VERSION: V1_STRUCT_DEFINTION, - V2_STRUCT_VERSION: V2_STRUCT_DEFINTION, + V1_STRUCT_VERSION: V1_STRUCT_DEFINITION, + V2_STRUCT_VERSION: V2_STRUCT_DEFINITION, } @classmethod diff --git a/tools/applib_malloc.py b/tools/applib_malloc.py index f9e38e32..a1be6e47 100644 --- a/tools/applib_malloc.py +++ b/tools/applib_malloc.py @@ -36,7 +36,7 @@ class ApplibType(object): def get_total_3x_padding(self, all_types): """ Return the amount of padding to use for the 3x version of the struct including both the direct padding we add for this struct in particular as well as all padding needed - for all dependenant structs. + for all dependent structs. """ if self.total_3x_padding is not None: diff --git a/tools/clar/clar.c b/tools/clar/clar.c index e5bb35d0..cdf556f1 100644 --- a/tools/clar/clar.c +++ b/tools/clar/clar.c @@ -281,7 +281,7 @@ clar_usage(const char *arg) printf(" -q \t\tOnly report tests that had an error\n"); printf(" -Q \t\tQuit as soon as a test fails\n"); printf(" -l \t\tPrint suite, category, and test names\n"); - printf(" -tXX\t\tRun a specifc test by name\n"); + printf(" -tXX\t\tRun a specific test by name\n"); exit(-1); } diff --git a/tools/commander/commander.py b/tools/commander/commander.py index 886265f9..90616c9f 100644 --- a/tools/commander/commander.py +++ b/tools/commander/commander.py @@ -77,7 +77,7 @@ class PebbleCommander(object): `PebbleCommander` as the first argument, and the rest of the argument strings as subsequent arguments. For errors, `fn` should throw an exception. - # TODO: Probably make the return something structured instead of stringly typed. + # TODO: Probably make the return something structured instead of strongly typed. """ def decorator(fn): # Story time: @@ -136,7 +136,7 @@ class PebbleCommander(object): def send_prompt_command(self, cmd): """ Send a prompt command string. - Unfortunately this is indeed stringly typed, a better solution is necessary. + Unfortunately this is indeed strongly typed, a better solution is necessary. """ return self.connection.prompt.command_and_response(cmd) diff --git a/tools/deploy_pbz_to_pebblefw.py b/tools/deploy_pbz_to_pebblefw.py index 363c6305..635234af 100644 --- a/tools/deploy_pbz_to_pebblefw.py +++ b/tools/deploy_pbz_to_pebblefw.py @@ -85,7 +85,7 @@ def deploy_bundle(bundle_path, bucket, stage, notes_path, layouts_path=None, dry with open(notes_path, 'r') as f: deploy_manifest['notes'] = f.read().strip() - # Fetch the current lastest.json + # Fetch the current latest.json latest_key = _build_s3_path(board, stage, 'latest.json') r = requests.get(_build_s3_url(bucket, latest_key)) if r.status_code == 403: diff --git a/tools/font/README.md b/tools/font/README.md index 2ab0d84e..fb8460b8 100644 --- a/tools/font/README.md +++ b/tools/font/README.md @@ -1,7 +1,7 @@ Pebble Font Renderer Script =========================== -These Python scripts take TrueType font files, renders a set of glyps and outputs them into .h files in the appropriate structure for consumption by Pebble's text rendering routines. +These Python scripts take TrueType font files, renders a set of glyphs and outputs them into .h files in the appropriate structure for consumption by Pebble's text rendering routines. Requirements: ------------- diff --git a/tools/fw_binary_info.py b/tools/fw_binary_info.py index 33899342..9ae61132 100755 --- a/tools/fw_binary_info.py +++ b/tools/fw_binary_info.py @@ -23,7 +23,7 @@ import stm32_crc class PebbleFirmwareBinaryInfo(object): V1_STRUCT_VERSION = 1 - V1_STRUCT_DEFINTION = [ + V1_STRUCT_DEFINITION = [ ('20s', 'build_id'), ('L', 'version_timestamp'), ('32s', 'version_tag'), @@ -67,7 +67,7 @@ class PebbleFirmwareBinaryInfo(object): def _get_footer_struct(self): fmt = '<' + reduce(lambda s, t: s + t[0], - PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINTION, '') + PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINITION, '') return struct.Struct(fmt) def _get_footer_data_from_elf(self, path): @@ -85,7 +85,7 @@ class PebbleFirmwareBinaryInfo(object): return footer_data def _parse_footer_data(self, footer_data): - z = zip(PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINTION, + z = zip(PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINITION, self.struct.unpack(footer_data)) return {entry[1]: data for entry, data in z} diff --git a/tools/fw_elf_obfuscate.py b/tools/fw_elf_obfuscate.py index aa8b837a..6c38f11a 100644 --- a/tools/fw_elf_obfuscate.py +++ b/tools/fw_elf_obfuscate.py @@ -39,7 +39,7 @@ PRESERVE_SYMBOLS = [ 'app_crashed', ] -# I have NO idea why we need to preserve `g_default_draw_implementation`, but we do. It's bizzare. +# I have NO idea why we need to preserve `g_default_draw_implementation`, but we do. It's bizarre. # We can at least obfuscate the name. OBFUSCATE_SYMBOLS = [ 'g_default_draw_implementation', @@ -69,10 +69,10 @@ class ELFFileHeader(ELFObjectBase): elf_class = None # The class of the ELF file (whether it's 32-bit or 64-bit) data = None # The format of the data in the ELF file (endianness) version = None # The version of the ELF file format - osabi = None # The OS- or ABI-specific extensios used in this ELF file + osabi = None # The OS- or ABI-specific extensions used in this ELF file abi_version = None # The version of the ABI this file is targeted for type = None # The object file type - machine = None # The machine artictecture + machine = None # The machine architecture entry = None # The program entry point ph_offset = None # The offset of the program header table in bytes sh_offset = None # The offset of the section header table in bytes @@ -90,7 +90,7 @@ class ELFFileHeader(ELFObjectBase): assert(self.elf_class == self.CLASS_32_BIT) # we only support little-endian files assert(self.data == self.DATA_2_LSB) - # current ELF verison + # current ELF version assert(self.version == self.VERSION) assert(self.osabi == self.OS_ABI) assert(self.abi_version == self.ABI_VERSION) @@ -140,7 +140,7 @@ class ELFSectionHeader(ELFObjectBase): size = None # The size of the section in bytes link = None # The section header table link (interpretation various based on type) info = None # Extra info - addr_align = None # Address alignment contraint for the section + addr_align = None # Address alignment constraint for the section entry_size = None # The size of entries within the section in bytes (if applicable) def unpack(self, data, offset=0): @@ -434,7 +434,7 @@ def obfuscate(src_path, dst_path, no_text): if __name__ == '__main__': parser = argparse.ArgumentParser(description='Pebble Firmware ELF Obfuscation') - parser.add_argument('input_elf', help='The source ELF file to be obfuscaated') + parser.add_argument('input_elf', help='The source ELF file to be obfuscated') parser.add_argument('output_elf', help='Output file path') parser.add_argument('--no-text', help='Removes the .text section', action='store_true') args = parser.parse_args() diff --git a/tools/gdb_scripts/gdb_tintin.py b/tools/gdb_scripts/gdb_tintin.py index c9b90e79..b9d5896a 100644 --- a/tools/gdb_scripts/gdb_tintin.py +++ b/tools/gdb_scripts/gdb_tintin.py @@ -441,7 +441,7 @@ class StackRecover(gdb.Command): def __init__(self): super(StackRecover, self).__init__('pbl stackwizard', gdb.COMMAND_USER) - desc = "Attempts to recover a backtrace from a corrupted stack (i.e stack oveflow)" + desc = "Attempts to recover a backtrace from a corrupted stack (i.e stack overflow)" self.parser = gdb_utils.GdbArgumentParser(prog='pbl stackwizard', description=desc) def print_usage(self): diff --git a/tools/generate_native_sdk/README.md b/tools/generate_native_sdk/README.md index a902cea6..4ece9deb 100644 --- a/tools/generate_native_sdk/README.md +++ b/tools/generate_native_sdk/README.md @@ -75,6 +75,6 @@ Each exported symbol in the `exports` table is formatted as follows: When adding new functions, make sure to bump up the `revision` field, and use that value as the new functions' `addedRevision` field. This guarantees that new versions of TintinOS are backwards compatible when compiled against older `libpebble.a`. Seriously, ***make sure to do this***!!. ## Bugs -+ The script doesn't check the the resulting `pebble.h` file will compile, that is left as an exercise to the reader. ++ The script doesn't check the resulting `pebble.h` file will compile, that is left as an exercise to the reader. + The script's error reporting is a little funky/unfriendly in places + The script does not do any checking of the function revision numbers, beyond a simple check that the file's revision is not lower than any function's. diff --git a/tools/mkbundle.py b/tools/mkbundle.py index dfac34f3..4be71098 100644 --- a/tools/mkbundle.py +++ b/tools/mkbundle.py @@ -414,7 +414,7 @@ def cmd_firmware(args): make_firmware_bundle(**vars(args)) def cmd_watchapp(args): - args.sdk_verison = dict(zip(['major', 'minor'], [int(x) for x in args.sdk_version.split('.')])) + args.sdk_version = dict(zip(['major', 'minor'], [int(x) for x in args.sdk_version.split('.')])) make_watchapp_bundle(**vars(args)) diff --git a/tools/mpu_calc.py b/tools/mpu_calc.py index d7636f13..426e7f05 100644 --- a/tools/mpu_calc.py +++ b/tools/mpu_calc.py @@ -22,7 +22,7 @@ NUM_SUBREGIONS = 8 def round_up_to_power_of_two(x): - """ Find the next power of two that is eqaul to or greater than x + """ Find the next power of two that is equal to or greater than x >>> round_up_to_power_of_two(4) 4 @@ -63,7 +63,7 @@ def find_subregions_for_region(address, size): smallest_block_size = max(round_up_to_power_of_two(size), MIN_REGION_SIZE) largest_block_size = min(round_up_to_power_of_two(size * NUM_SUBREGIONS), MAX_REGION_SIZE) - # Iterate over the potentional candidates from smallest to largest + # Iterate over the potential candidates from smallest to largest current_block_size = smallest_block_size while current_block_size <= largest_block_size: subregion_size = current_block_size // NUM_SUBREGIONS @@ -76,9 +76,9 @@ def find_subregions_for_region(address, size): end_in_block <= current_block_size): # This region fits in the provided region and both the start and end are aligned with - # subregion boundries. This will work! + # subregion boundaries. This will work! - block_start_addresss = address - start_in_block + block_start_address = address - start_in_block start_enabled_subregion = start_in_block / subregion_size end_enabled_subregion = end_in_block / subregion_size @@ -90,7 +90,7 @@ def find_subregions_for_region(address, size): disabled_subregions_bytes = disabled_subregions.tobytes() disabled_subregions_int, = struct.unpack('B', disabled_subregions_bytes) - return MpuRegion(block_start_addresss, current_block_size, disabled_subregions_int) + return MpuRegion(block_start_address, current_block_size, disabled_subregions_int) current_block_size *= 2 else: diff --git a/tools/pulse/flash_imaging.py b/tools/pulse/flash_imaging.py index ebcd8d11..528d1aa0 100644 --- a/tools/pulse/flash_imaging.py +++ b/tools/pulse/flash_imaging.py @@ -47,7 +47,7 @@ class EraseCommand(object): if unpacked.address != self.address or unpacked.length != self.length: raise exceptions.ResponseParseError( 'Response does not match command: ' - 'address=%#.08x legnth=%d (expected %#.08x, %d)' % ( + 'address=%#.08x length=%d (expected %#.08x, %d)' % ( unpacked.address, unpacked.length, self.address, self.length)) return unpacked @@ -110,7 +110,7 @@ class CrcCommand(object): if unpacked.address != self.address or unpacked.length != self.length: raise exceptions.ResponseParseError( 'Response does not match command: ' - 'address=%#.08x legnth=%d (expected %#.08x, %d)' % ( + 'address=%#.08x length=%d (expected %#.08x, %d)' % ( unpacked.address, unpacked.length, self.address, self.length)) return unpacked diff --git a/tools/qemu/qemu_gdb_proxy.py b/tools/qemu/qemu_gdb_proxy.py index 428fad27..d2a4ab22 100755 --- a/tools/qemu/qemu_gdb_proxy.py +++ b/tools/qemu/qemu_gdb_proxy.py @@ -23,7 +23,7 @@ created in the Pebble. This proxy talks to the QEMU gdb server using primitive gdb remote commands and inspects the FreeRTOS task structures to figure out which threads have been created, their saved registers, etc. and then returns that information to gdb when it asks for thread info from the target system. For -most other requests recevied from gdb, this proxy simply acts as a passive pass thru to the QEMU gdb +most other requests received from gdb, this proxy simply acts as a passive pass thru to the QEMU gdb server. This module is designed to be run as a separate process from both QEMU and gdb. It connects to the @@ -694,7 +694,7 @@ if __name__ == '__main__': # Collect our command line arguments parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--port', type=int, default=1233, - help="Port to accept incomming connections on") + help="Port to accept incoming connections on") parser.add_argument('--target', default='localhost:1234', help="target to connect to ") parser.add_argument('--connect_timeout', type=float, default=1.0, diff --git a/tools/resources/resource_map/resource_generator.py b/tools/resources/resource_map/resource_generator.py index 83192644..9e185d0f 100644 --- a/tools/resources/resource_map/resource_generator.py +++ b/tools/resources/resource_map/resource_generator.py @@ -31,7 +31,7 @@ class ResourceGeneratorMetaclass(type): if cls.type: _ResourceGenerators[cls.type] = cls -# Instatiate the metaclass into a baseclass we can use elsewhere. +# Instantiate the metaclass into a baseclass we can use elsewhere. ResourceGeneratorBase = ResourceGeneratorMetaclass('ResourceGenerator', (object,), {}) @@ -46,7 +46,7 @@ class ResourceGenerator(ResourceGeneratorBase): 'filename': str(definition_dict['file'] if 'file' in definition_dict else None)} resources = [resource] - # Now generate ResourceDefintion objects for each resource + # Now generate ResourceDefinition objects for each resource target_platforms = definition_dict.get('targetPlatforms', None) aliases = definition_dict.get('aliases', []) builtin = False if bld.variant == 'applib' else definition_dict.get('builtin', False) diff --git a/tools/tests/test_check_elf_log_strings.py b/tools/tests/test_check_elf_log_strings.py index 0c5fd864..a0f7775e 100644 --- a/tools/tests/test_check_elf_log_strings.py +++ b/tools/tests/test_check_elf_log_strings.py @@ -25,7 +25,7 @@ from log_hashing.check_elf_log_strings import check_dict_log_strings class TestCheckLogStrings(unittest.TestCase): - def test_some_acceptible_strings(self): + def test_some_acceptable_strings(self): log_dict = { 1: {'file': 'test.c', 'line': '1', 'msg': 'test %s'}, 2: {'file': 'test.c', 'line': '2', 'msg': 'test %-2hx'}, diff --git a/tools/tests/test_deploy_pbz_to_pebblefw.py b/tools/tests/test_deploy_pbz_to_pebblefw.py index 5bd8e320..a57ce012 100644 --- a/tools/tests/test_deploy_pbz_to_pebblefw.py +++ b/tools/tests/test_deploy_pbz_to_pebblefw.py @@ -102,7 +102,7 @@ class TestDeployPbzToPebbleFw(unittest.TestCase): def boto_key_func(boto_bucket, key): if key == 'pebble/bb2/porksmoothie/latest.json': - # Only validate us uploading to latest.json and return unamed mocks for the other + # Only validate us uploading to latest.json and return unnamed mocks for the other # paths. return mock_latest_key diff --git a/tools/tests/test_json2commands.py b/tools/tests/test_json2commands.py index b5235e66..c67e43fc 100644 --- a/tools/tests/test_json2commands.py +++ b/tools/tests/test_json2commands.py @@ -481,7 +481,7 @@ class MyTestCase(unittest.TestCase): self.assertTrue(open_path_command.open) def test_parse_json_sequence(self): - # Test mix of fills and open paths with mulitple frames + # Test mix of fills and open paths with multiple frames current_path = os.path.dirname(os.path.realpath(__file__)) filename = current_path + '/json2commands_test.json' diff --git a/tools/tool_check.py b/tools/tool_check.py index 0d0a3339..dc1a2efe 100644 --- a/tools/tool_check.py +++ b/tools/tool_check.py @@ -86,7 +86,7 @@ def text_to_req_list(req_list_text): req_list.append((line, None, None)) continue if match.group('package').endswith(','): - # Muliple requirements + # Multiple requirements match2 = VERSION_PATTERN.match(match.group('package').strip(',')) if not match2: Logs.pprint('RED', 'Don\'t understand line \'%s\'' % raw_line) diff --git a/waftools/binary_header.py b/waftools/binary_header.py index af980654..98ae90cd 100644 --- a/waftools/binary_header.py +++ b/waftools/binary_header.py @@ -109,7 +109,7 @@ def process_binary_header(self): sparse length encoding (see waftools/sparse_length_encoding.py). The name of the array variable defaults to the source file name with all - characters that are invaid C identifiers replaced with underscores. The name + characters that are invalid C identifiers replaced with underscores. The name can be explicitly specified by setting the *array_name* parameter. This method overrides the processing by diff --git a/waftools/clang_compilation_database.py b/waftools/clang_compilation_database.py index 93be6313..89c011d4 100644 --- a/waftools/clang_compilation_database.py +++ b/waftools/clang_compilation_database.py @@ -46,7 +46,7 @@ def write_compilation_database(ctx): if not os.path.exists(file_path): with open(file_path, 'w') as f: f.write('[]') - Logs.info("Store compile comands in %s" % file_path) + Logs.info("Store compile commands in %s" % file_path) clang_db = dict((x["file"], x) for x in json.load(database_file)) for task in getattr(ctx, 'clang_compilation_database_tasks', []): try: @@ -64,7 +64,7 @@ def write_compilation_database(ctx): def options(opt): - "opitions for clang_compilation_database" + "options for clang_compilation_database" pass diff --git a/waftools/emscripten.py b/waftools/emscripten.py index 809ffa70..7f2f342c 100644 --- a/waftools/emscripten.py +++ b/waftools/emscripten.py @@ -41,7 +41,7 @@ import os from waflib import Logs, Task, TaskGen -# Insipred on https://github.com/waf-project/waf/blob/4ff5b8b7a74dd2ad23600ed7af6a505b90235387/playground/strip/strip.py +# Inspired by https://github.com/waf-project/waf/blob/4ff5b8b7a74dd2ad23600ed7af6a505b90235387/playground/strip/strip.py def wrap_cprogram_task_class(): classname = 'cprogram' orig_cls = Task.classes[classname] @@ -66,7 +66,7 @@ def wrap_cprogram_task_class(): self.env.env = {} self.env.env.update(os.environ) for key in ['EMCC_DEBUG', 'EMCC_CORES', 'EM_CACHE']: - if self.env[key]: # If not explicitely set, empty list is returned + if self.env[key]: # If not explicitly set, empty list is returned self.env.env[key] = str(self.env[key]) emx_cls.__init__ = init @@ -159,7 +159,7 @@ def process_emscripten_cprogram_link_args(self): for s in get_rule_and_env_values('emx_other_settings'): add_emcc_settings('-s', s) - # Emscripten implicitely regenerates caches (libc.bc, dlmalloc.bc, + # Emscripten implicitly regenerates caches (libc.bc, dlmalloc.bc, # struct_info.compiled.json and optimizer.exe) as needed. # When running multiple instantiations of emcc in parallel, this is # problematic because they will each race to generate the caches, diff --git a/waftools/pebble_arm_gcc.py b/waftools/pebble_arm_gcc.py index 7091ce1b..0e5cd71e 100644 --- a/waftools/pebble_arm_gcc.py +++ b/waftools/pebble_arm_gcc.py @@ -94,7 +94,7 @@ def options(opt): help='Build in release mode' ' (--beta and --release are mutually exclusive)') opt.add_option('--fat_firmware', action='store_true', - help='build in GDB mode WITH logs; requires 1M of onbaord flash') + help='build in GDB mode WITH logs; requires 1M of onboard flash') opt.add_option('--gdb', action='store_true', help='build in GDB mode (no optimization, no logs)') opt.add_option('--lto', action='store_true', help='Enable link-time optimization') diff --git a/waftools/sparse_length_encoding.py b/waftools/sparse_length_encoding.py index 452da5ec..b06d459d 100755 --- a/waftools/sparse_length_encoding.py +++ b/waftools/sparse_length_encoding.py @@ -58,8 +58,8 @@ def encode(source): frequency.update(source) # most_common() doesn't define what happens if there's a tie in frequency. Let's always pick # the lowest value of that frequency to make the encoding predictable. - occurences = frequency.most_common() - escape = min(x[0] for x in occurences if x[1] == occurences[-1][1]) + occurrences = frequency.most_common() + escape = min(x[0] for x in occurrences if x[1] == occurrences[-1][1]) yield escape for b, g in groupby(source): if b == b'\0': diff --git a/wscript b/wscript index d1faedeb..d32ef6ec 100644 --- a/wscript +++ b/wscript @@ -145,7 +145,7 @@ def options(opt): opt.add_option('--file', action='store', help='Specify a file to use with the flash_fw command') opt.add_option('--tty', help='Selects a tty to use for serial imaging. Must be specified for all image commands') - opt.add_option('--baudrate', action='store', type=int, help='Optional: specifies the baudrate to run the targetted uart at') + opt.add_option('--baudrate', action='store', type=int, help='Optional: specifies the baudrate to run the targeted uart at') opt.add_option('--onlysdk', action='store_true', help="only build the sdk") opt.add_option('--qemu_host', default='localhost:12345', help='host:port for the emulator console connection') @@ -419,7 +419,7 @@ def configure(conf): conf.env.NOJS = conf.options.nojs # The BT controller is the only thing different between robert_es and robert_evt, so just - # retend robert_es is robert_evt. We'll be removing robert_es fairly soon anyways. + # pretend robert_es is robert_evt. We'll be removing robert_es fairly soon anyways. bt_board = None if conf.options.board == 'robert_es': bt_board = 'robert_es' @@ -1129,7 +1129,7 @@ def _create_qemu_image_micro(ctx, path_to_firmware_hex): img = IntelHex(ctx.env.BOOTLOADER_HEX) img.merge(IntelHex(path_to_firmware_hex), overlap='replace') - # Write firwmare image and pad up to next 512 byte multiple. This is because QEMU + # Write firmware image and pad up to next 512 byte multiple. This is because QEMU # assumes all block devices are multiples of 512 byte sectors img.padding = 0xff flash_end = ((img.maxaddr() + 511) // 512) * 512 @@ -1186,7 +1186,7 @@ def mfg_image_spi(ctx): prf_begin = 0x200000 image_size = 0x800000 else: - ctx.fatal("MFG Image not suppored for board: {}".format(ctx.env.BOARD)) + ctx.fatal("MFG Image not supported for board: {}".format(ctx.env.BOARD)) spi_flash_path = _create_spi_flash_image(ctx, 'mfg_prf_image.bin') mfg_spi_img_file = open(spi_flash_path, 'wb') @@ -1252,7 +1252,7 @@ def ble_console(ctx): """Starts miniterm with the serial console for the BLE chip.""" ctx.recurse('platform', mandatory=False) - # FIXME: We have the ability to progam PIDs into the new round of Big Boards. TTY + # FIXME: We have the ability to program PIDs into the new round of Big Boards. TTY # path discovery should be able to use that (PBL-31111). For now, just make a best # guess at what the path should be @@ -1429,7 +1429,7 @@ class gdb_prf(BuildContext): def openocd(ctx): """ Starts openocd and leaves it running. It will reset the board to - increase the chances of attaching succesfully. """ + increase the chances of attaching successfully. """ waftools.openocd.run_command(ctx, 'init; reset', shutdown=False)