From fbee85bfbcb36dc7cdfd7466f27825e6e59c4b65 Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 12 Apr 2021 02:36:38 -0700 Subject: [PATCH] Correct typos in comments and documentation --- examples/PrimoDeepSleep/PrimoDeepSleep.ino | 10 +++++----- examples/TianStandby/TianStandby.ino | 6 +++--- keywords.txt | 4 ++-- src/nrf52/ArduinoLowPower.cpp | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/PrimoDeepSleep/PrimoDeepSleep.ino b/examples/PrimoDeepSleep/PrimoDeepSleep.ino index 9e7d9f8..702d8a9 100644 --- a/examples/PrimoDeepSleep/PrimoDeepSleep.ino +++ b/examples/PrimoDeepSleep/PrimoDeepSleep.ino @@ -4,16 +4,16 @@ Written by Chiara Ruggeri (chiara@arduino.org) This example for the Arduino Primo board shows how to use - low power library to enter in power off mode and save power. - This mode ensure the deepest power saving mode. If you need + Arduino Low Power library to enter in power off mode and save power. + This mode ensures the deepest power saving mode. If you need a faster response from the board use standby function instead. Please note that once exited from the deepest sleep mode the board will reset (so setup will be run again). The functions enableWakeupFrom set the peripheral that will wake up - the board. By calling it more than once you can choose more than - a wakeup source. + the board. By calling it more than once you can choose multiple + wakeup sources. The board will be reset when it wakes up from power off. You can use wakeUpCause() function to find out what signals woke up the board if you use more than one wakeUpBy.. function. @@ -27,7 +27,7 @@ // Pin used to wakeup the board const int digitalPin = 10; -// Pin used in Compatarot module to wake up the board +// Pin used in Comparator module to wake up the board const int analogPin = A0; diff --git a/examples/TianStandby/TianStandby.ino b/examples/TianStandby/TianStandby.ino index e74c53e..7fc18c4 100644 --- a/examples/TianStandby/TianStandby.ino +++ b/examples/TianStandby/TianStandby.ino @@ -1,12 +1,12 @@ /* TianStandby - This sketch demonstrates the usage of SAMD chip to furtherly reduce the power usage of Tian + This sketch demonstrates the usage of SAMD chip to further reduce the power usage of the Tian board. This method can be applied to any board with companion chips which expose a method (via direct pin interrupt or via a command) to enter and exit standby. - Sleep modes allow a significant drop in the power usage of a board while it does nothing waiting for an event to happen. Battery powered application can take advantage of these modes to enhance battery life significantly. + Sleep modes allow a significant drop in the power usage of a board while it does nothing waiting for an event to happen. Battery powered applications can take advantage of these modes to enhance battery life significantly. - In this sketch, the internal RTC of SAMD chip will wake up the processor every 20 seconds. + In this sketch, the internal RTC of the SAMD chip will wake up the processor every 20 seconds. Before going to sleep, the SAMD chip tells the MIPS CPU to standby too. Please note that, if the processor is sleeping, a new sketch can't be uploaded. To overcome this, manually reset the board (usually with a single or double tap to the RESET button) diff --git a/keywords.txt b/keywords.txt index d0813b7..95fa6c9 100644 --- a/keywords.txt +++ b/keywords.txt @@ -1,5 +1,5 @@ ####################################### -# Syntax Coloring Map For Energy Saving +# Syntax Coloring Map For Arduino Low Power ####################################### ####################################### @@ -30,4 +30,4 @@ wakeupReason KEYWORD2 OTHER_WAKEUP LITERAL1 GPIO_WAKEUP LITERAL1 NFC_WAKEUP LITERAL1 -ANALOG_COMPARATOR_WAKEUP LITERAL1 \ No newline at end of file +ANALOG_COMPARATOR_WAKEUP LITERAL1 diff --git a/src/nrf52/ArduinoLowPower.cpp b/src/nrf52/ArduinoLowPower.cpp index 75889a1..898b774 100644 --- a/src/nrf52/ArduinoLowPower.cpp +++ b/src/nrf52/ArduinoLowPower.cpp @@ -64,7 +64,7 @@ void ArduinoLowPowerClass::deepSleep() { //this is achieved by disabling all peripheral that use it NRF_UARTE0->ENABLE = UARTE_ENABLE_ENABLE_Disabled; //disable UART NRF_SAADC ->ENABLE = (SAADC_ENABLE_ENABLE_Disabled << SAADC_ENABLE_ENABLE_Pos); //disable ADC - NRF_PWM0 ->ENABLE = (PWM_ENABLE_ENABLE_Disabled << PWM_ENABLE_ENABLE_Pos); //disable all pwm instance + NRF_PWM0 ->ENABLE = (PWM_ENABLE_ENABLE_Disabled << PWM_ENABLE_ENABLE_Pos); //disable all PWM instances NRF_PWM1 ->ENABLE = (PWM_ENABLE_ENABLE_Disabled << PWM_ENABLE_ENABLE_Pos); NRF_PWM2 ->ENABLE = (PWM_ENABLE_ENABLE_Disabled << PWM_ENABLE_ENABLE_Pos); NRF_TWIM1 ->ENABLE = (TWIM_ENABLE_ENABLE_Disabled << TWIM_ENABLE_ENABLE_Pos); //disable TWI Master @@ -118,7 +118,7 @@ void ArduinoLowPowerClass::enableWakeupFrom(wakeup_reason peripheral, uint32_t p nrf_lpcomp_config_t config={(nrf_lpcomp_ref_t)event, (nrf_lpcomp_detect_t)mode}; nrf_lpcomp_configure(&config); if(pin<14 && pin>19) - return; //no analog pin is choosen + return; //no analog pin was chosen nrf_lpcomp_input_select(aPin[pin-14]); nrf_lpcomp_enable(); nrf_lpcomp_task_trigger(NRF_LPCOMP_TASK_START);