From 9f641cb6b7c542f040cfed785762e087c1bceaf3 Mon Sep 17 00:00:00 2001 From: zhangzhenwu Date: Tue, 13 Feb 2024 19:15:08 +0800 Subject: [PATCH] Add spell_check.yml - Enable "Check word spell" - Actions run every 'push' and 'pull_request' --- .github/workflows/spell_check.yml | 28 +++++++++++++++++++ .../hardware/cores/arduino/Arduino.h | 2 +- .../hardware/cores/arduino/PowerManagement.h | 2 +- .../hardware/cores/arduino/Stream.cpp | 2 +- .../hardware/cores/arduino/Stream.h | 2 +- .../hardware/cores/arduino/WString.h | 4 +-- .../hardware/cores/arduino/ard_ssl.c | 2 +- .../hardware/cores/arduino/font5x7.h | 2 +- .../hardware/cores/arduino/wifi_drv.cpp | 2 +- .../hardware/cores/arduino/wifi_drv.h | 10 +++---- .../hardware/cores/arduino/wiring.h | 2 +- .../hardware/cores/arduino/wiring_os.h | 4 +-- .../hardware/cores/arduino/wiring_watchdog.h | 2 +- .../hardware/cores/arduino/wl_definitions.h | 4 +-- .../hardware/libraries/Analog/AmebaServo.h | 2 +- .../hardware/libraries/Audio/Alexa.cpp | 10 +++---- .../examples/alexa_basic/alexa_basic.ino | 2 +- .../hardware/libraries/Fatfs/SdFatFile.h | 14 +++++----- .../hardware/libraries/Fatfs/SdFatFs.h | 8 +++--- .../libraries/FlashMemory/FlashMemory.h | 6 ++-- .../ReadWriteOneWord/ReadWriteOneWord.ino | 2 +- .../hardware/libraries/GPIO/DHT.cpp | 2 +- .../HCSR04Ultrasonic/HCSR04Ultrasonic.ino | 2 +- .../libraries/GPIO/library.properties | 2 +- .../hardware/libraries/Http/HttpClient.h | 2 +- .../AmebaCloud_SmartCurtain.ino | 6 ++-- ...AmebaCloud_WindowSecuritySystem_Switch.ino | 2 +- .../amazon_awsiot_basic.ino | 4 +-- .../amazon_awsiot_with_ack.ino | 4 +-- .../lass_for_dht_plus_ps_nfc.ino | 8 +++--- .../mqtt_publish_in_callback.ino | 2 +- .../libraries/MQTTClient/src/PubSubClient.h | 2 +- .../hardware/libraries/NFC/NfcTag.h | 12 ++++---- .../examples/ota_non_block/ota_non_block.ino | 2 +- .../hardware/libraries/SPI/SPI.cpp | 4 +-- .../libraries/SoftwareSerial/PMS3003.cpp | 14 +++++----- .../SoftwareSerialIrqCallback.ino | 4 +-- Arduino_package/hardware/libraries/UVC/UVC.h | 10 +++---- .../libraries/UVC/uvc_basic/uvc_basic.ino | 2 +- .../UVC/uvc_with_ap_mode/uvc_with_ap_mode.ino | 2 +- .../SimpleWebServerWiFi.ino | 2 +- .../examples/WiFiWebServer/WiFiWebServer.ino | 2 +- .../CalculateUdpReceiveDelay.ino | 2 +- .../CalculateUdpReceiveTimeout.ino | 4 +-- .../CalculateUdpSendDelay.ino | 2 +- .../hardware/libraries/Wire/I2CIO.cpp | 2 +- .../hardware/libraries/Wire/LCD.cpp | 2 +- Arduino_package/hardware/libraries/Wire/LCD.h | 10 +++---- .../hardware/libraries/Wire/Wire.cpp | 14 +++++----- 49 files changed, 133 insertions(+), 105 deletions(-) create mode 100644 .github/workflows/spell_check.yml diff --git a/.github/workflows/spell_check.yml b/.github/workflows/spell_check.yml new file mode 100644 index 0000000..56cc1b3 --- /dev/null +++ b/.github/workflows/spell_check.yml @@ -0,0 +1,28 @@ +# This workflow runs spell_check test for Ameba Arduino SDK + +name: Check word spell +on: [push, pull_request] +# workflow_dispatch: +jobs: + spell-check: + name: Run spell-check check + runs-on: ubuntu-latest + strategy: + matrix: + path: + - 'Arduino_package/hardware/cores' + - 'Arduino_package/hardware/libraries' + steps: + - name: Checkout repository # and submodules + uses: actions/checkout@v4 +# with: +# submodules: recursive + - name: Run spell-check for multi-floders +# uses: codespell-project/actions-codespell@master + uses: codespell-project/actions-codespell@v2 + with: + skip: Arduino_package/hardware/libraries/SoftwareSerial/Adafruit_GPS.cpp,Arduino_package/hardware/libraries/SoftwareSerial/Adafruit_GPS.h,Arduino_package/hardware/libraries/SoftwareSerial/SoftwareSerial.cpp,Arduino_package/hardware/libraries/SoftwareSerial/SoftwareSerial.h +# DHT.cpp - celcius + ignore_words_list: ameba,celcius +# ignore_words_file: Ameba_misc/Spell_Check_Ignore/.codespellignore + path: ${{ matrix.path }} diff --git a/Arduino_package/hardware/cores/arduino/Arduino.h b/Arduino_package/hardware/cores/arduino/Arduino.h index b11b951..c5d8041 100644 --- a/Arduino_package/hardware/cores/arduino/Arduino.h +++ b/Arduino_package/hardware/cores/arduino/Arduino.h @@ -100,7 +100,7 @@ typedef struct _PinDescription } PinDescription ; -/* Pins table to be instanciated into variant.cpp */ +/* Pins table to be instantiated into variant.cpp */ extern PinDescription g_APinDescription[]; #ifdef __cplusplus diff --git a/Arduino_package/hardware/cores/arduino/PowerManagement.h b/Arduino_package/hardware/cores/arduino/PowerManagement.h index c7689f6..77e1757 100644 --- a/Arduino_package/hardware/cores/arduino/PowerManagement.h +++ b/Arduino_package/hardware/cores/arduino/PowerManagement.h @@ -54,7 +54,7 @@ class PowerManagementClass { * then he would find it's hard to flash image. * In this case, he can pull up pin 18. * - * @return true if system not allowed enter any power save state, and false vise versa + * @return true if system not allowed enter any power save state, and false vice versa */ static bool safeLock(); diff --git a/Arduino_package/hardware/cores/arduino/Stream.cpp b/Arduino_package/hardware/cores/arduino/Stream.cpp index b31942f..04a78bd 100644 --- a/Arduino_package/hardware/cores/arduino/Stream.cpp +++ b/Arduino_package/hardware/cores/arduino/Stream.cpp @@ -131,7 +131,7 @@ long Stream::parseInt(char skipChar) do{ if(c == skipChar) - ; // ignore this charactor + ; // ignore this character else if(c == '-') isNegative = true; else if(c >= '0' && c <= '9') // is c a digit? diff --git a/Arduino_package/hardware/cores/arduino/Stream.h b/Arduino_package/hardware/cores/arduino/Stream.h index 0d9a49a..6a34131 100644 --- a/Arduino_package/hardware/cores/arduino/Stream.h +++ b/Arduino_package/hardware/cores/arduino/Stream.h @@ -25,7 +25,7 @@ #include #include "Print.h" -// compatability macros for testing +// compatibility macros for testing /* #define getInt() parseInt() #define getInt(skipChar) parseInt(skipchar) diff --git a/Arduino_package/hardware/cores/arduino/WString.h b/Arduino_package/hardware/cores/arduino/WString.h index b047980..3f651ae 100644 --- a/Arduino_package/hardware/cores/arduino/WString.h +++ b/Arduino_package/hardware/cores/arduino/WString.h @@ -95,7 +95,7 @@ class String // returns true on success, false on failure (in which case, the string // is left unchanged). if the argument is null or invalid, the - // concatenation is considered unsucessful. + // concatenation is considered unsuccessful. unsigned char concat(const String &str); unsigned char concat(const char *cstr); unsigned char concat(char c); @@ -152,7 +152,7 @@ class String unsigned char startsWith(const String &prefix, unsigned int offset) const; unsigned char endsWith(const String &suffix) const; - // character acccess + // character access char charAt(unsigned int index) const; void setCharAt(unsigned int index, char c); char operator [] (unsigned int index) const; diff --git a/Arduino_package/hardware/cores/arduino/ard_ssl.c b/Arduino_package/hardware/cores/arduino/ard_ssl.c index e95dfb9..4bde9f2 100644 --- a/Arduino_package/hardware/cores/arduino/ard_ssl.c +++ b/Arduino_package/hardware/cores/arduino/ard_ssl.c @@ -7,7 +7,7 @@ #include #include "ard_ssl.h" -#define ARDUINO_MBEDTLS_DEBUG_LEVEL 0 // Set to 0 to disable debug messsages, 5 to enable all debug messages +#define ARDUINO_MBEDTLS_DEBUG_LEVEL 0 // Set to 0 to disable debug messages, 5 to enable all debug messages static unsigned int ard_ssl_arc4random(void) { diff --git a/Arduino_package/hardware/cores/arduino/font5x7.h b/Arduino_package/hardware/cores/arduino/font5x7.h index e217128..cd94c32 100644 --- a/Arduino_package/hardware/cores/arduino/font5x7.h +++ b/Arduino_package/hardware/cores/arduino/font5x7.h @@ -15,7 +15,7 @@ * where 1 is font color, and 0 is background color * * So it's 'A' if we look it in counter-clockwise for 90 degree. - * In general case, we also add a background line to seperate from other character: + * In general case, we also add a background line to separate from other character: * 0x7C: 01111100 * 0x12: 00010010 * 0x11: 00010001 diff --git a/Arduino_package/hardware/cores/arduino/wifi_drv.cpp b/Arduino_package/hardware/cores/arduino/wifi_drv.cpp index 5392dd3..b9c34d9 100644 --- a/Arduino_package/hardware/cores/arduino/wifi_drv.cpp +++ b/Arduino_package/hardware/cores/arduino/wifi_drv.cpp @@ -167,7 +167,7 @@ int8_t WiFiDrv::wifiSetKey(char* ssid, uint8_t ssid_len, uint8_t key_idx, const wifi.security_type = RTW_SECURITY_WEP_PSK; memset(password, 0, sizeof(password)); - // convert hex sring to hex value + // convert hex string to hex value for (i=0, idx=0; i= '0' && k[i] <= '9' ) { diff --git a/Arduino_package/hardware/cores/arduino/wifi_drv.h b/Arduino_package/hardware/cores/arduino/wifi_drv.h index ae59fe7..035dc7d 100644 --- a/Arduino_package/hardware/cores/arduino/wifi_drv.h +++ b/Arduino_package/hardware/cores/arduino/wifi_drv.h @@ -68,7 +68,7 @@ class WiFiDrv * The ssid of the desired network should be specified. * * param ssid: The ssid of the desired network. - * param ssid_len: Lenght of ssid string. + * param ssid_len: Length of ssid string. * return: WL_SUCCESS or WL_FAILURE */ static int8_t wifiSetNetwork(char* ssid, uint8_t ssid_len); @@ -77,10 +77,10 @@ class WiFiDrv * the most secure supported mode will be automatically selected * * param ssid: Pointer to the SSID string. - * param ssid_len: Lenght of ssid string. + * param ssid_len: Length of ssid string. * param passphrase: Passphrase. Valid characters in a passphrase * must be between ASCII 32-126 (decimal). - * param len: Lenght of passphrase string. + * param len: Length of passphrase string. * return: WL_SUCCESS or WL_FAILURE */ static int8_t wifiSetPassphrase(char* ssid, uint8_t ssid_len, const char *passphrase, const uint8_t len); @@ -90,10 +90,10 @@ class WiFiDrv * is determined by the size of the key (5 bytes for WEP-40, 13 bytes for WEP-104). * * param ssid: Pointer to the SSID string. - * param ssid_len: Lenght of ssid string. + * param ssid_len: Length of ssid string. * param key_idx: The key index to set. Valid values are 0-3. * param key: Key input buffer. - * param len: Lenght of key string. + * param len: Length of key string. * return: WL_SUCCESS or WL_FAILURE */ static int8_t wifiSetKey(char* ssid, uint8_t ssid_len, uint8_t key_idx, const void *key, const uint8_t len); diff --git a/Arduino_package/hardware/cores/arduino/wiring.h b/Arduino_package/hardware/cores/arduino/wiring.h index 653f69c..c7b6014 100644 --- a/Arduino_package/hardware/cores/arduino/wiring.h +++ b/Arduino_package/hardware/cores/arduino/wiring.h @@ -51,7 +51,7 @@ extern uint32_t millis( void ) ; extern uint32_t micros( void ) ; /** - * \brief Pauses the program for the amount of time (in miliseconds) specified as parameter. + * \brief Pauses the program for the amount of time (in milliseconds) specified as parameter. * (There are 1000 milliseconds in a second.) * * \param dwMs the number of milliseconds to pause (uint32_t) diff --git a/Arduino_package/hardware/cores/arduino/wiring_os.h b/Arduino_package/hardware/cores/arduino/wiring_os.h index d4d0402..5ba6535 100644 --- a/Arduino_package/hardware/cores/arduino/wiring_os.h +++ b/Arduino_package/hardware/cores/arduino/wiring_os.h @@ -2,7 +2,7 @@ /** * @defgroup wiring_os wiring_os - * OS realted function for thread, signal, software timer, semaphore + * OS related function for thread, signal, software timer, semaphore * @{ */ @@ -142,7 +142,7 @@ extern uint32_t os_thread_terminate(uint32_t thread_id); * @brief Pass control to next thread that is in state \b READY. * * By default the minimal execution unit is 1 millisecond. In a scenario that if a thread with smaller want to handout execution right to a thread with - * higher priority immediately without waiting for the ending of current 1 millisecond, then invoke os_thread_yield can transfer exection right to + * higher priority immediately without waiting for the ending of current 1 millisecond, then invoke os_thread_yield can transfer execution right to * OS's idle task and check which is the next execution thread. * * @return os_status code diff --git a/Arduino_package/hardware/cores/arduino/wiring_watchdog.h b/Arduino_package/hardware/cores/arduino/wiring_watchdog.h index 6e5cdae..8a6e391 100644 --- a/Arduino_package/hardware/cores/arduino/wiring_watchdog.h +++ b/Arduino_package/hardware/cores/arduino/wiring_watchdog.h @@ -25,7 +25,7 @@ extern void wdt_reset(); * @ingroup watchdog * @brief Enable watchdog * - * After enbling watchdog, user defined code needs to reset it before watchdog barks. Otherwise it would make system reboot. + * After enabling watchdog, user defined code needs to reset it before watchdog barks. Otherwise it would make system reboot. * * @param[in] timeout_ms The timeout value that watchdog barks. The maximum value is 8 seconds. */ diff --git a/Arduino_package/hardware/cores/arduino/wl_definitions.h b/Arduino_package/hardware/cores/arduino/wl_definitions.h index 0ef45a9..6249b56 100644 --- a/Arduino_package/hardware/cores/arduino/wl_definitions.h +++ b/Arduino_package/hardware/cores/arduino/wl_definitions.h @@ -38,13 +38,13 @@ #define WL_IPV4_LENGTH 4 // Maximum size of a SSID list #define WL_NETWORKS_LIST_MAXNUM 50 -// Maxmium number of socket +// Maximum number of socket #define MAX_SOCK_NUM 4 // Socket not available constant #define SOCK_NOT_AVAIL 255 // Default state value for Wifi state field #define NA_STATE -1 -//Maximum number of attempts to establish wifi connection +// Maximum number of attempts to establish wifi connection #define WL_MAX_ATTEMPT_CONNECTION 10 typedef enum { diff --git a/Arduino_package/hardware/libraries/Analog/AmebaServo.h b/Arduino_package/hardware/libraries/Analog/AmebaServo.h index ac61b89..423bdba 100644 --- a/Arduino_package/hardware/libraries/Analog/AmebaServo.h +++ b/Arduino_package/hardware/libraries/Analog/AmebaServo.h @@ -27,7 +27,7 @@ disabled when the first servo is attached. Timers are seized as needed in groups of 12 servos - 24 servos use two timers, 48 servos will use four. - The sequence used to sieze timers is defined in timers.h + The sequence used to seize timers is defined in timers.h The methods are: diff --git a/Arduino_package/hardware/libraries/Audio/Alexa.cpp b/Arduino_package/hardware/libraries/Audio/Alexa.cpp index 9abece0..0bd2e61 100644 --- a/Arduino_package/hardware/libraries/Audio/Alexa.cpp +++ b/Arduino_package/hardware/libraries/Audio/Alexa.cpp @@ -62,7 +62,7 @@ static i2s_t i2s_obj; /** * The wakeup pin. * - * When ALC5680 reconize the wakeup word it will toggle this pin + * When ALC5680 recognize the wakeup word it will toggle this pin */ #define GPIO_IRQ_VOICE_PIN PC_5 static gpio_irq_t gpio_audio; @@ -94,7 +94,7 @@ static gtimer_t timer_led; // The mp3 download from AVS has 1152 bytes decoded in each frame #define ALEXA_I2S_DMA_PAGE_SIZE 1152 -#define ALEXA_I2S_DMA_PAGE_NUM 4 // Vaild number is 2~4 +#define ALEXA_I2S_DMA_PAGE_NUM 4 // Valid number is 2~4 // DMA buffer for I2S SDRAM_BSS_SECTION static uint8_t i2s_tx_buf[ALEXA_I2S_DMA_PAGE_SIZE*ALEXA_I2S_DMA_PAGE_NUM]; @@ -134,7 +134,7 @@ static xQueueHandle content_queue; * Cached mp3 data. * * When play mp3 data, the source data may not complete and need further data to decode. - * We use this varaible to cache the un-decoded data + * We use this variable to cache the un-decoded data */ #define DIALOG_DATA_CACHE_SIZE (16384+4096) uint32_t dialog_data_len = 0; @@ -246,7 +246,7 @@ static void init_alexa_i2s() } /** - * The Audio callback fucntion as AVS audio part is ready for initiialize. + * The Audio callback function as AVS audio part is ready for initialize. */ static void init_audio_codec() { @@ -460,7 +460,7 @@ static void do_alert() } if ((ptx_buf = i2s_get_tx_page(&i2s_obj)) == NULL) { - // alerts has less priorty than dialog. We should break here to check if we have dialog came in + // alerts has less priority than dialog. We should break here to check if we have dialog came in vTaskDelay(ALEXA_AUDIO_I2S_TX_BUF_DELAY); break; } diff --git a/Arduino_package/hardware/libraries/Audio/examples/alexa_basic/alexa_basic.ino b/Arduino_package/hardware/libraries/Audio/examples/alexa_basic/alexa_basic.ino index 809af9d..3a91de9 100644 --- a/Arduino_package/hardware/libraries/Audio/examples/alexa_basic/alexa_basic.ino +++ b/Arduino_package/hardware/libraries/Audio/examples/alexa_basic/alexa_basic.ino @@ -5,7 +5,7 @@ Realtek Audio Shield (ALC5680) x1 Speaker x1 - This sketch requre I2S interface. + This sketch require I2S interface. According to Teensy Audio Shield pinout, we connect pins as below: Ameba Audio Shield diff --git a/Arduino_package/hardware/libraries/Fatfs/SdFatFile.h b/Arduino_package/hardware/libraries/Fatfs/SdFatFile.h index 0b89bfa..5fa5640 100644 --- a/Arduino_package/hardware/libraries/Fatfs/SdFatFile.h +++ b/Arduino_package/hardware/libraries/Fatfs/SdFatFile.h @@ -30,7 +30,7 @@ class SdFatFile : public Stream { * @brief Write one byte to file * * @param[in] c The character to be written - * @return The succeessful written byte count + * @return The successful written byte count */ virtual size_t write(uint8_t c); @@ -39,7 +39,7 @@ class SdFatFile : public Stream { * * @param[in] buf The buffer to be written * @param[in] size The length of buffer to be written - * @return The succeessful written byte count + * @return The successful written byte count */ virtual size_t write(const uint8_t *buf, size_t size); @@ -51,16 +51,16 @@ class SdFatFile : public Stream { virtual int read(); /** - * @brief Read one byte from file without move curser + * @brief Read one byte from file without move cursor * * @return The read character */ virtual int peek(); /** - * @brief Check if curser is at EOF + * @brief Check if cursor is at EOF * - * @return Return 1 if is not at EOF. And 0 vise versa. + * @return Return 1 if is not at EOF. And 0 vice versa. */ virtual int available(); @@ -83,12 +83,12 @@ class SdFatFile : public Stream { * * @param[in] buf The buffer to store the content * @param[in] nbyte The buffer size. (Or can be regarded as desired length to read) - * @return The succeessful written byte count + * @return The successful written byte count */ int read(void *buf, uint16_t nbyte); /** - * @brief Change curser to sepcific position + * @brief Change cursor to specific position * * @param[in] pos The desired position * @return Return 0 if success. Return negative value if failure. diff --git a/Arduino_package/hardware/libraries/Fatfs/SdFatFs.h b/Arduino_package/hardware/libraries/Fatfs/SdFatFs.h index fc51039..d63d4bf 100644 --- a/Arduino_package/hardware/libraries/Fatfs/SdFatFs.h +++ b/Arduino_package/hardware/libraries/Fatfs/SdFatFs.h @@ -50,7 +50,7 @@ class SdFatFs * @brief List items under specific folder * * List items under specific folder and store the result in the buffer that user specified. - * Each item are seperated by '\0'. + * Each item are separated by '\0'. * * @param[in] path The absolute directory path to be listed * @param[in] result_buf The buffer to be stored results @@ -79,7 +79,7 @@ class SdFatFs * @brief Check if a specific path is a directory * * @param[in] absolute_path The absolute path to be queried - * @return Return 1 if it is directory. And 0 vise versa. + * @return Return 1 if it is directory. And 0 vice versa. */ unsigned char isDir(char *absolute_path); @@ -87,7 +87,7 @@ class SdFatFs * @brief Check if a specific path is a file * * @param[in] absolute_path The absolute path to be queried - * @return Return 1 if it is file. And 0 vise versa. + * @return Return 1 if it is file. And 0 vice versa. */ unsigned char isFile(char *absolute_path); @@ -132,7 +132,7 @@ class SdFatFs /** * @brief Return current status of SD * - * @return Return 1 if ready to use. Return 0 if status is inactivate or abnormal. + * @return Return 1 if ready to use. Return 0 if status is not activate or abnormal. */ int status(); diff --git a/Arduino_package/hardware/libraries/FlashMemory/FlashMemory.h b/Arduino_package/hardware/libraries/FlashMemory/FlashMemory.h index 03ce7e2..91e2e5f 100644 --- a/Arduino_package/hardware/libraries/FlashMemory/FlashMemory.h +++ b/Arduino_package/hardware/libraries/FlashMemory/FlashMemory.h @@ -5,7 +5,7 @@ * @brief The default flash address for application usage * * This is reference flash address that user can use. - * If user use flash address overwirte image address, the it would corrupt image content. + * If user use flash address overwrite image address, the it would corrupt image content. **/ #define FLASH_MEMORY_APP_BASE 0xFF000 @@ -13,7 +13,7 @@ * @class FlashMemoryClass FlashMemory.h * @brief Flash memory api * - * There are 2 ways to operate memroy in this class. \n + * There are 2 ways to operate memory in this class. \n * The first one is to allocate a buf and mirror the content of flash. We operate this buf and update flash when needed. * In this way we can reduce flash memory operation since it cost time. \n * The second one is write to flash immediately. It would cost time but save buf. @@ -68,7 +68,7 @@ class FlashMemoryClass /** * @brief Read fore bytes from flash memory * - * Read 4 byte from specifc offet based on base address. + * Read 4 byte from specific offset based on base address. * * @param[in] offset The offset according to base address * @return the read data with size of 4 bytes diff --git a/Arduino_package/hardware/libraries/FlashMemory/examples/ReadWriteOneWord/ReadWriteOneWord.ino b/Arduino_package/hardware/libraries/FlashMemory/examples/ReadWriteOneWord/ReadWriteOneWord.ino index bd342f1..72d0c74 100644 --- a/Arduino_package/hardware/libraries/FlashMemory/examples/ReadWriteOneWord/ReadWriteOneWord.ino +++ b/Arduino_package/hardware/libraries/FlashMemory/examples/ReadWriteOneWord/ReadWriteOneWord.ino @@ -1,5 +1,5 @@ /* - This sketch shows how to request flash memory larger than defaut 4K, and read/write one specific word. + This sketch shows how to request flash memory larger than default 4K, and read/write one specific word. */ #include diff --git a/Arduino_package/hardware/libraries/GPIO/DHT.cpp b/Arduino_package/hardware/libraries/GPIO/DHT.cpp index 16d76f2..94ba3e8 100644 --- a/Arduino_package/hardware/libraries/GPIO/DHT.cpp +++ b/Arduino_package/hardware/libraries/GPIO/DHT.cpp @@ -142,7 +142,7 @@ boolean DHT::read(bool force) { // Send start signal. See DHT datasheet for full signal diagram: // http://www.adafruit.com/datasheets/Digital%20humidity%20and%20temperature%20sensor%20AM2302.pdf - // Go into high impedence state to let pull-up raise data line level and + // Go into high impedance state to let pull-up raise data line level and // start the reading process. digitalWrite(_pin, HIGH); delay(250); diff --git a/Arduino_package/hardware/libraries/GPIO/examples/HCSR04Ultrasonic/HCSR04Ultrasonic.ino b/Arduino_package/hardware/libraries/GPIO/examples/HCSR04Ultrasonic/HCSR04Ultrasonic.ino index aa35ab9..45deff8 100644 --- a/Arduino_package/hardware/libraries/GPIO/examples/HCSR04Ultrasonic/HCSR04Ultrasonic.ino +++ b/Arduino_package/hardware/libraries/GPIO/examples/HCSR04Ultrasonic/HCSR04Ultrasonic.ino @@ -8,7 +8,7 @@ * * HC-SR04 works at 5V domain. * It means the echo pin needs level shift from 5V to 3.3V. - * We can either use a level converter or use resister to devide the level. + * We can either use a level converter or use resister to divide the level. * **/ diff --git a/Arduino_package/hardware/libraries/GPIO/library.properties b/Arduino_package/hardware/libraries/GPIO/library.properties index 0ad2ebc..d3aacda 100644 --- a/Arduino_package/hardware/libraries/GPIO/library.properties +++ b/Arduino_package/hardware/libraries/GPIO/library.properties @@ -2,7 +2,7 @@ name=AmebaGPIO version=1.0.1 author=Realtek maintainer=Realtek -sentence=With this library you can find useful ditial application. +sentence=With this library you can find useful digital application. paragraph= category=Signal Input/Output url=http://www.amebaiot.com/ameba-arduino-peripherals-examples/ diff --git a/Arduino_package/hardware/libraries/Http/HttpClient.h b/Arduino_package/hardware/libraries/Http/HttpClient.h index 8fea302..2bc4df7 100644 --- a/Arduino_package/hardware/libraries/Http/HttpClient.h +++ b/Arduino_package/hardware/libraries/Http/HttpClient.h @@ -408,7 +408,7 @@ class HttpClient : public Client // Number of milliseconds that we wait each time there isn't any data // available to be read (during status code and header processing) static const int kHttpWaitForDataDelay = 1000; - // Number of milliseconds that we'll wait in total without receiveing any + // Number of milliseconds that we'll wait in total without receiving any // data before returning HTTP_ERROR_TIMED_OUT (during status code and header // processing) static const int kHttpResponseTimeout = 30*1000; diff --git a/Arduino_package/hardware/libraries/MQTTClient/examples/AmebaCloud_SmartCurtain/AmebaCloud_SmartCurtain.ino b/Arduino_package/hardware/libraries/MQTTClient/examples/AmebaCloud_SmartCurtain/AmebaCloud_SmartCurtain.ino index 45b07b7..6109bc6 100644 --- a/Arduino_package/hardware/libraries/MQTTClient/examples/AmebaCloud_SmartCurtain/AmebaCloud_SmartCurtain.ino +++ b/Arduino_package/hardware/libraries/MQTTClient/examples/AmebaCloud_SmartCurtain/AmebaCloud_SmartCurtain.ino @@ -31,7 +31,7 @@ char publishTopic[] = "amebapubto"; char publishHello[] = "---MQTT server Connected!---"; char subscribeTopic[] = "amebasubto"; char pubClosing[] = "Curtain closing"; -char pubOpenning[] = "Curtain openning"; +char pubOpenning[] = "Curtain opening"; // Callback function header void callback(char* topic, byte* payload, unsigned int length); @@ -53,7 +53,7 @@ void callback(char* topic, byte* payload, unsigned int length) { } if ((arr[0] == 'o') && (arr[1] == 'p') && (arr[2] == 'e') && (arr[3] == 'n')) { - printf("---Received a OPEN msg, openning curtain now---\n"); + printf("---Received a OPEN msg, opening curtain now---\n"); myservo.write(openCurtain); client.publish(publishTopic,pubOpenning); } else if ((arr[0] == 'c') && (arr[1] == 'l') && (arr[2] == 'o') && (arr[3] == 's') && (arr[4] == 'e')) { @@ -69,7 +69,7 @@ void callback(char* topic, byte* payload, unsigned int length) { void setup() { Serial.begin(9600); myservo.attach(9); // attaches the servo on pin 9 to the servo object - myservo.write(closeCurtain); //defualt curtain is close + myservo.write(closeCurtain); //default curtain is close while (status != WL_CONNECTED) { Serial.print("Attempting to connect to SSID: "); diff --git a/Arduino_package/hardware/libraries/MQTTClient/examples/AmebaCloud_WindowSecuritySystem_Switch/AmebaCloud_WindowSecuritySystem_Switch.ino b/Arduino_package/hardware/libraries/MQTTClient/examples/AmebaCloud_WindowSecuritySystem_Switch/AmebaCloud_WindowSecuritySystem_Switch.ino index 08708b3..7ea69b3 100644 --- a/Arduino_package/hardware/libraries/MQTTClient/examples/AmebaCloud_WindowSecuritySystem_Switch/AmebaCloud_WindowSecuritySystem_Switch.ino +++ b/Arduino_package/hardware/libraries/MQTTClient/examples/AmebaCloud_WindowSecuritySystem_Switch/AmebaCloud_WindowSecuritySystem_Switch.ino @@ -78,7 +78,7 @@ int counter = 1; void loop() { //magnetSensor() normally return FALSE when window is closed, TRUE when window opened if (magnetSensor()) { - //counter ensure only publish once everytime window state changes + //counter ensure only publish once every time window state changes if (counter > 0) { client.publish(publishTopic, publishClose); Serial.println("###"); diff --git a/Arduino_package/hardware/libraries/MQTTClient/examples/amazon_awsiot_basic/amazon_awsiot_basic.ino b/Arduino_package/hardware/libraries/MQTTClient/examples/amazon_awsiot_basic/amazon_awsiot_basic.ino index d81949c..bf23267 100644 --- a/Arduino_package/hardware/libraries/MQTTClient/examples/amazon_awsiot_basic/amazon_awsiot_basic.ino +++ b/Arduino_package/hardware/libraries/MQTTClient/examples/amazon_awsiot_basic/amazon_awsiot_basic.ino @@ -65,7 +65,7 @@ char* rootCABuff = \ "hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq\n" \ "-----END CERTIFICATE-----\n"; -/* Fill your certificate.pem.crt wiht LINE ENDING */ +/* Fill your certificate.pem.crt with LINE ENDING */ char* certificateBuff = \ "-----BEGIN CERTIFICATE-----\n" \ "MIIDWTCCAkGgAwIBAgIUE1UsPqN2mfvCGh2DLX2HWs3NOIYwDQYJKoZIhvcNAQEL\n" \ @@ -88,7 +88,7 @@ char* certificateBuff = \ "9z2+uzKgCYuugQk+w+8JmC6hR0EH4q4+ydsNkYTC0LK3MndHumA1Dj3OwUfA\n" \ "-----END CERTIFICATE-----\n"; -/* Fill your private.pem.key wiht LINE ENDING */ +/* Fill your private.pem.key with LINE ENDING */ char* privateKeyBuff = \ "-----BEGIN RSA PRIVATE KEY-----\n" \ "MIIEpAIBAAKCAQEA0zz9/MUl5mhLbIh/RjKx4WpSWfA3A2yDQbhT7eZQ+PjuiCze\n" \ diff --git a/Arduino_package/hardware/libraries/MQTTClient/examples/amazon_awsiot_with_ack/amazon_awsiot_with_ack.ino b/Arduino_package/hardware/libraries/MQTTClient/examples/amazon_awsiot_with_ack/amazon_awsiot_with_ack.ino index 1709203..c68f5a1 100644 --- a/Arduino_package/hardware/libraries/MQTTClient/examples/amazon_awsiot_with_ack/amazon_awsiot_with_ack.ino +++ b/Arduino_package/hardware/libraries/MQTTClient/examples/amazon_awsiot_with_ack/amazon_awsiot_with_ack.ino @@ -66,7 +66,7 @@ char* rootCABuff = \ "hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq\n" \ "-----END CERTIFICATE-----\n"; -/* Fill your certificate.pem.crt wiht LINE ENDING */ +/* Fill your certificate.pem.crt with LINE ENDING */ char* certificateBuff = \ "-----BEGIN CERTIFICATE-----\n" \ "MIIDWTCCAkGgAwIBAgIUE1UsPqN2mfvCGh2DLX2HWs3NOIYwDQYJKoZIhvcNAQEL\n" \ @@ -89,7 +89,7 @@ char* certificateBuff = \ "9z2+uzKgCYuugQk+w+8JmC6hR0EH4q4+ydsNkYTC0LK3MndHumA1Dj3OwUfA\n" \ "-----END CERTIFICATE-----\n"; -/* Fill your private.pem.key wiht LINE ENDING */ +/* Fill your private.pem.key with LINE ENDING */ char* privateKeyBuff = \ "-----BEGIN RSA PRIVATE KEY-----\n" \ "MIIEpAIBAAKCAQEA0zz9/MUl5mhLbIh/RjKx4WpSWfA3A2yDQbhT7eZQ+PjuiCze\n" \ diff --git a/Arduino_package/hardware/libraries/MQTTClient/examples/lass_for_dht_plus_ps_nfc/lass_for_dht_plus_ps_nfc.ino b/Arduino_package/hardware/libraries/MQTTClient/examples/lass_for_dht_plus_ps_nfc/lass_for_dht_plus_ps_nfc.ino index f7afe97..eca462f 100644 --- a/Arduino_package/hardware/libraries/MQTTClient/examples/lass_for_dht_plus_ps_nfc/lass_for_dht_plus_ps_nfc.ino +++ b/Arduino_package/hardware/libraries/MQTTClient/examples/lass_for_dht_plus_ps_nfc/lass_for_dht_plus_ps_nfc.ino @@ -2,9 +2,9 @@ This sketch shows how to use LASS with power saving. The power source use solar panel and Li-Po battery. - The precedure is as below: + The procedure is as below: 1. Setup watchdog: - Sometimes the hardware or dirver may hit unexpected fault and invoke hardfault. + Sometimes the hardware or driver may hit unexpected fault and invoke hardfault. In this situation only watchdog and reset system. We enable 2s watch dog and feed it in 1s GTimer handler. If the whole process exceend "measurement_timeout" then we just disable watchdog and enter deepsleep. @@ -16,7 +16,7 @@ Try to read humidity and temperature. Use previous data if failed. 5. Setup NFC: Prepare NFC NDEF data. There are 2 NDEF records. - (a) The first one is for android applicaton. This NDEF record will trigger event and lunch + (a) The first one is for android application. This NDEF record will trigger event and lunch application accordingly. (b) The second one is text data with this format: device:FT_LIVE_12345678,h:34.0,t:27.0 @@ -26,7 +26,7 @@ Assume the time content in RTC has timezone calibrated. We need use UTC for LASS usage. 7. Prepare LASS payload data 8. Connect to WiFi - Enbale Wifi cost signaficant power usage. So we enable WiFi in later part of whole process. + Enable Wifi cost signaficant power usage. So we enable WiFi in later part of whole process. 9. Connect to LASS 10.Deepsleep diff --git a/Arduino_package/hardware/libraries/MQTTClient/examples/mqtt_publish_in_callback/mqtt_publish_in_callback.ino b/Arduino_package/hardware/libraries/MQTTClient/examples/mqtt_publish_in_callback/mqtt_publish_in_callback.ino index c1d25ae..6a81b02 100644 --- a/Arduino_package/hardware/libraries/MQTTClient/examples/mqtt_publish_in_callback/mqtt_publish_in_callback.ino +++ b/Arduino_package/hardware/libraries/MQTTClient/examples/mqtt_publish_in_callback/mqtt_publish_in_callback.ino @@ -39,7 +39,7 @@ PubSubClient client(mqttServer, 1883, callback, wifiClient); // Callback function void callback(char* topic, byte* payload, unsigned int length) { // In order to republish this payload, a copy must be made - // as the orignal payload buffer will be overwritten whilst + // as the original payload buffer will be overwritten whilst // constructing the PUBLISH packet. // Allocate the correct amount of memory for the payload copy diff --git a/Arduino_package/hardware/libraries/MQTTClient/src/PubSubClient.h b/Arduino_package/hardware/libraries/MQTTClient/src/PubSubClient.h index 5948bee..0083aeb 100644 --- a/Arduino_package/hardware/libraries/MQTTClient/src/PubSubClient.h +++ b/Arduino_package/hardware/libraries/MQTTClient/src/PubSubClient.h @@ -36,7 +36,7 @@ /* MQTT try to read even server disconnected. */ #define MQTT_PCN004_BREAK_READ_IF_NO_CONNECTION -/* If there is no imcoming data, then the loop function would become a busy loop*/ +/* If there is no incoming data, then the loop function would become a busy loop*/ #define MQTT_PCN005_NON_BUSY_LOOP_If_NO_DATA /* By default it won't wait for ack. It cause un-expected behavior if subscribe and publish have sequence dependency */ diff --git a/Arduino_package/hardware/libraries/NFC/NfcTag.h b/Arduino_package/hardware/libraries/NFC/NfcTag.h index c1b77c5..a3e5989 100644 --- a/Arduino_package/hardware/libraries/NFC/NfcTag.h +++ b/Arduino_package/hardware/libraries/NFC/NfcTag.h @@ -24,7 +24,7 @@ #define RTK_NFC_UID 0x58 /* - * @brief Total available memroy size + * @brief Total available memory size * * In NFC Tag, 1 page equals 4 bytes. In Ameba there are 36 pages available which means there are total 36 x 4 = 144 bytes. * These are used as tag header, payload header, and payload itself. @@ -49,11 +49,11 @@ #define TNF_MESSAGE_BEGIN 0x80 /** The last NDEF message. */ #define TNF_MESSAGE_END 0x40 -/** For cases that NDEF message is seperated into several parts. It shell not be used in Ameba */ +/** For cases that NDEF message is separated into several parts. It shell not be used in Ameba */ #define TNF_MESSAGE_CHUNK_FLAG 0x20 /** For message less than 256 bytes. In Ameba it's always set to 1. */ #define TNF_MESSAGE_SHORT_RECORD 0x10 -/** If this is set, ther there will be 1 byte ID information append after field payload length. In Ameba it's not enabled */ +/** If this is set, there will be 1 byte ID information append after field payload length. In Ameba it's not enabled */ #define TNF_MESSAGE_ID_LENGTH_IS_PRESENT 0x08 /** @} */ // end of tnf_message_type @@ -222,7 +222,7 @@ class NfcTagClass { void appendAndroidPlayApp(const char *appName); /** - * @brief Clear catched NDEF records in NfcTag object + * @brief Clear caught NDEF records in NfcTag object * * @note Clear NDEF only clear cached NDEF records in this object. It won't affect the NFC firmware */ @@ -233,7 +233,7 @@ class NfcTagClass { * * It will check the content of nfc_tag_content and verify UID field. * - * @return Return true if valid. And false vise sersa. + * @return Return true if valid. And false vice sersa. */ bool isUidValid(); @@ -246,7 +246,7 @@ class NfcTagClass { void convertNdefToRaw(); /** - * @brief Conver the content of nfc_tag_content into NDEF messages + * @brief Convert the content of nfc_tag_content into NDEF messages * * It tries to extract and convert the content of nfc_tag_content into NDEF message. * We expect the content of nfc_tag_content is in the format of NFC Tag Type2 diff --git a/Arduino_package/hardware/libraries/OTA/examples/ota_non_block/ota_non_block.ino b/Arduino_package/hardware/libraries/OTA/examples/ota_non_block/ota_non_block.ino index ab0fdde..de7be5d 100644 --- a/Arduino_package/hardware/libraries/OTA/examples/ota_non_block/ota_non_block.ino +++ b/Arduino_package/hardware/libraries/OTA/examples/ota_non_block/ota_non_block.ino @@ -74,6 +74,6 @@ void ota_thread(const void *argument) { delay(10000); } - // This line is not expected to be executed because if OTA success it would reboot device immediatedly. + // This line is not expected to be executed because if OTA success it would reboot device immediately. os_thread_terminate( os_thread_get_id() ); } \ No newline at end of file diff --git a/Arduino_package/hardware/libraries/SPI/SPI.cpp b/Arduino_package/hardware/libraries/SPI/SPI.cpp index 8e6f8bd..bc7736f 100644 --- a/Arduino_package/hardware/libraries/SPI/SPI.cpp +++ b/Arduino_package/hardware/libraries/SPI/SPI.cpp @@ -199,7 +199,7 @@ void SPIClass::setDataMode(uint8_t _pin, uint8_t _mode) void SPIClass::setClockDivider(uint8_t _pin, uint8_t _divider) { - // no affact in Ameba + // no affect in Ameba } void SPIClass::setBitOrder(BitOrder _order) @@ -214,7 +214,7 @@ void SPIClass::setDataMode(uint8_t _mode) void SPIClass::setClockDivider(uint8_t _div) { - // no affact in Ameba + // no affect in Ameba } void SPIClass::setDefaultFrequency(int _frequency) diff --git a/Arduino_package/hardware/libraries/SoftwareSerial/PMS3003.cpp b/Arduino_package/hardware/libraries/SoftwareSerial/PMS3003.cpp index 45a90f6..c5d560b 100644 --- a/Arduino_package/hardware/libraries/SoftwareSerial/PMS3003.cpp +++ b/Arduino_package/hardware/libraries/SoftwareSerial/PMS3003.cpp @@ -90,7 +90,7 @@ int PMS3003::get_pm10_air() { } /* -One package has 32 bytes. Illustrate the formate by using below raw data: +One package has 32 bytes. Illustrate the format by using below raw data: 42 4d 00 1c 00 1b 00 21 00 29 00 1a 00 21 00 29 2b fb 04 be 00 6b 00 10 00 04 00 04 67 00 04 46 42 4d : header signature @@ -101,12 +101,12 @@ One package has 32 bytes. Illustrate the formate by using below raw data: 00 1a : PM1.0 under air 00 21 : PM2.5 under air 00 29 : PM10 under air - 2b fb : number of pariticle, diameter size 0.3 um in 0.1 liter air - 04 be : number of pariticle, diameter size 0.5 um in 0.1 liter air - 00 6b : number of pariticle, diameter size 1.0 um in 0.1 liter air - 00 10 : number of pariticle, diameter size 2.5 um in 0.1 liter air - 00 04 : number of pariticle, diameter size 5.0 um in 0.1 liter air - 00 04 : number of pariticle, diameter size 10 um in 0.1 liter air + 2b fb : number of particle, diameter size 0.3 um in 0.1 liter air + 04 be : number of particle, diameter size 0.5 um in 0.1 liter air + 00 6b : number of particle, diameter size 1.0 um in 0.1 liter air + 00 10 : number of particle, diameter size 2.5 um in 0.1 liter air + 00 04 : number of particle, diameter size 5.0 um in 0.1 liter air + 00 04 : number of particle, diameter size 10 um in 0.1 liter air 67 : serial number 00 : error code 04 46 : checksum, diff --git a/Arduino_package/hardware/libraries/SoftwareSerial/examples/SoftwareSerialIrqCallback/SoftwareSerialIrqCallback.ino b/Arduino_package/hardware/libraries/SoftwareSerial/examples/SoftwareSerialIrqCallback/SoftwareSerialIrqCallback.ino index a996e31..3d65337 100644 --- a/Arduino_package/hardware/libraries/SoftwareSerial/examples/SoftwareSerialIrqCallback/SoftwareSerialIrqCallback.ino +++ b/Arduino_package/hardware/libraries/SoftwareSerial/examples/SoftwareSerialIrqCallback/SoftwareSerialIrqCallback.ino @@ -3,7 +3,7 @@ Set callback function "mySerialCalback" to software serial. Whenever there is data comes in, "mySerialCallback" is invoked. In this sketch, it do nothing s until a end of line. - And then it send a semphore. + And then it send a semaphore. The loop() use a non-busy loop to wait semaphore. To test this sketch, you need type something on software serial and then press Enter. @@ -28,7 +28,7 @@ uint32_t semaID; /* The callback is hook at UART IRQ handler and please don't do heavy task here. */ void mySerialCallback(char c) { - /* The parameter c is only for peeking. The actuall data is + /* The parameter c is only for peeking. The actual data is * still in the buffer of SoftwareSerial. */ if (c == '\r' || c == '\n') { diff --git a/Arduino_package/hardware/libraries/UVC/UVC.h b/Arduino_package/hardware/libraries/UVC/UVC.h index 4a6c761..38447e3 100644 --- a/Arduino_package/hardware/libraries/UVC/UVC.h +++ b/Arduino_package/hardware/libraries/UVC/UVC.h @@ -89,19 +89,19 @@ class UVCClass /** * @brief Check if UVC is ready * - * @return True if UVC is ready. And false vise versa. + * @return True if UVC is ready. And false vice versa. */ int available(); /** * @brief Check if UVC is currently streaming * - * @return True if UVC is in streaming. And false vise versa. + * @return True if UVC is in streaming. And false vice versa. */ int status(); /** - * @brief Enable straming + * @brief Enable streaming * * If the UVC is turned off stream. Call this function can turn on streaming * @@ -110,9 +110,9 @@ class UVCClass int turnOn(); /** - * @brief Disable straming + * @brief Disable streaming * - * Disble streaming without deinitialize UVC. + * Disable streaming without deinitialize UVC. */ void turnOff(); diff --git a/Arduino_package/hardware/libraries/UVC/uvc_basic/uvc_basic.ino b/Arduino_package/hardware/libraries/UVC/uvc_basic/uvc_basic.ino index 481a5ae..3c920a1 100644 --- a/Arduino_package/hardware/libraries/UVC/uvc_basic/uvc_basic.ino +++ b/Arduino_package/hardware/libraries/UVC/uvc_basic/uvc_basic.ino @@ -1,7 +1,7 @@ /* This sketch demonstrate how to streaming video of usb camera. Ameba receive video data from usb port and streaming out on wifi with rtsp protocol. - User can receive ths streaming data on PC or laptop with rtsp player. + User can receive the streaming data on PC or laptop with rtsp player. In this sketch you need: Ameba x 1 diff --git a/Arduino_package/hardware/libraries/UVC/uvc_with_ap_mode/uvc_with_ap_mode.ino b/Arduino_package/hardware/libraries/UVC/uvc_with_ap_mode/uvc_with_ap_mode.ino index 5167194..7eb77a1 100644 --- a/Arduino_package/hardware/libraries/UVC/uvc_with_ap_mode/uvc_with_ap_mode.ino +++ b/Arduino_package/hardware/libraries/UVC/uvc_with_ap_mode/uvc_with_ap_mode.ino @@ -1,7 +1,7 @@ /* This sketch demonstrate how to streaming video of usb camera. Ameba receive video data from usb port and streaming out on wifi with rtsp protocol. - User can receive ths streaming data on PC or laptop with rtsp player. + User can receive the streaming data on PC or laptop with rtsp player. In this sketch you need: Ameba x 1 diff --git a/Arduino_package/hardware/libraries/WiFi/examples/SimpleWebServerWiFi/SimpleWebServerWiFi.ino b/Arduino_package/hardware/libraries/WiFi/examples/SimpleWebServerWiFi/SimpleWebServerWiFi.ino index 5cc10ea..dafdaa5 100644 --- a/Arduino_package/hardware/libraries/WiFi/examples/SimpleWebServerWiFi/SimpleWebServerWiFi.ino +++ b/Arduino_package/hardware/libraries/WiFi/examples/SimpleWebServerWiFi/SimpleWebServerWiFi.ino @@ -83,7 +83,7 @@ void loop() { } // close the connection: client.stop(); - Serial.println("client disonnected"); + Serial.println("client disconnected"); } } diff --git a/Arduino_package/hardware/libraries/WiFi/examples/WiFiWebServer/WiFiWebServer.ino b/Arduino_package/hardware/libraries/WiFi/examples/WiFiWebServer/WiFiWebServer.ino index 60df9a9..675f9d1 100644 --- a/Arduino_package/hardware/libraries/WiFi/examples/WiFiWebServer/WiFiWebServer.ino +++ b/Arduino_package/hardware/libraries/WiFi/examples/WiFiWebServer/WiFiWebServer.ino @@ -88,7 +88,7 @@ void loop() { // close the connection: client.stop(); - Serial.println("client disonnected"); + Serial.println("client disconnected"); } } diff --git a/Arduino_package/hardware/libraries/WiFi/examples/misc/CalculateUdpReceiveDelay/CalculateUdpReceiveDelay.ino b/Arduino_package/hardware/libraries/WiFi/examples/misc/CalculateUdpReceiveDelay/CalculateUdpReceiveDelay.ino index f81206c..d781885 100644 --- a/Arduino_package/hardware/libraries/WiFi/examples/misc/CalculateUdpReceiveDelay/CalculateUdpReceiveDelay.ino +++ b/Arduino_package/hardware/libraries/WiFi/examples/misc/CalculateUdpReceiveDelay/CalculateUdpReceiveDelay.ino @@ -2,7 +2,7 @@ This sketch provide a simple way to roughly calculate the delay of Ameba receive delay. The source code is separate into two parts. The first part is Ameba code which play receiver role. - The second part is PC code wich play sender role. Please compile the second part and run it. + The second part is PC code with play sender role. Please compile the second part and run it. */ #include diff --git a/Arduino_package/hardware/libraries/WiFi/examples/misc/CalculateUdpReceiveTimeout/CalculateUdpReceiveTimeout.ino b/Arduino_package/hardware/libraries/WiFi/examples/misc/CalculateUdpReceiveTimeout/CalculateUdpReceiveTimeout.ino index cc29297..2c30210 100644 --- a/Arduino_package/hardware/libraries/WiFi/examples/misc/CalculateUdpReceiveTimeout/CalculateUdpReceiveTimeout.ino +++ b/Arduino_package/hardware/libraries/WiFi/examples/misc/CalculateUdpReceiveTimeout/CalculateUdpReceiveTimeout.ino @@ -4,9 +4,9 @@ decrease receiving timeout. This sketch separate into two parts: The first part is Arduino code which play receiver role. - The second part is PC code wich play sender role. Please compile the second part and run it. + The second part is PC code with play sender role. Please compile the second part and run it. - You can open Serial Plotter to check the change behavor of timeout value. + You can open Serial Plotter to check the change behavior of timeout value. The meaning of timeout value depends on the sending frequency from sender side. If the sender side send packets frequently, then the Arduino side can have smaller receiving timeout value */ diff --git a/Arduino_package/hardware/libraries/WiFi/examples/misc/CalculateUdpSendDelay/CalculateUdpSendDelay.ino b/Arduino_package/hardware/libraries/WiFi/examples/misc/CalculateUdpSendDelay/CalculateUdpSendDelay.ino index 6095cfa..7cb47a3 100644 --- a/Arduino_package/hardware/libraries/WiFi/examples/misc/CalculateUdpSendDelay/CalculateUdpSendDelay.ino +++ b/Arduino_package/hardware/libraries/WiFi/examples/misc/CalculateUdpSendDelay/CalculateUdpSendDelay.ino @@ -2,7 +2,7 @@ This sketch provide a simple way to roughly calculate the delay of Ameba send delay. The source code is separate into two parts. The first part is Ameba code which play sender role. - The second part is PC code wich play receiver role. Please compile the second part and run it. + The second part is PC code with play receiver role. Please compile the second part and run it. */ #include diff --git a/Arduino_package/hardware/libraries/Wire/I2CIO.cpp b/Arduino_package/hardware/libraries/Wire/I2CIO.cpp index 497bc94..338e11f 100644 --- a/Arduino_package/hardware/libraries/Wire/I2CIO.cpp +++ b/Arduino_package/hardware/libraries/Wire/I2CIO.cpp @@ -216,7 +216,7 @@ bool I2CIO::isAvailable (uint8_t i2cAddr) { return true; } - else //Some error occured + else //Some error occurred { return false; } diff --git a/Arduino_package/hardware/libraries/Wire/LCD.cpp b/Arduino_package/hardware/libraries/Wire/LCD.cpp index c96f1a3..f8df27d 100644 --- a/Arduino_package/hardware/libraries/Wire/LCD.cpp +++ b/Arduino_package/hardware/libraries/Wire/LCD.cpp @@ -29,7 +29,7 @@ // // @version API 1.1.0 // -// 2012.03.29 bperrybap - changed comparision to use LCD_5x8DOTS rather than 0 +// 2012.03.29 bperrybap - changed comparison to use LCD_5x8DOTS rather than 0 // @author F. Malpartida - fmalpartida@gmail.com // --------------------------------------------------------------------------- #include diff --git a/Arduino_package/hardware/libraries/Wire/LCD.h b/Arduino_package/hardware/libraries/Wire/LCD.h index 36c86e6..5f19814 100644 --- a/Arduino_package/hardware/libraries/Wire/LCD.h +++ b/Arduino_package/hardware/libraries/Wire/LCD.h @@ -82,7 +82,7 @@ @abstract waits for a given time in microseconds (compilation dependent). @discussion Waits for a given time defined in microseconds depending on the FAST_MODE define. If the FAST_MODE is defined the call will return - inmediatelly. + immediately. @param uSec[in] time in microseconds. @result None */ @@ -163,7 +163,7 @@ inline static void waitUsec ( uint16_t uSec ) /*! @defined @abstract Backlight off constant declaration - @discussion Used in combination with the setBacklight to swith off the + @discussion Used in combination with the setBacklight to switch off the LCD backlight. @set setBacklight */ #define BACKLIGHT_OFF 0 @@ -171,7 +171,7 @@ inline static void waitUsec ( uint16_t uSec ) /*! @defined @abstract Backlight on constant declaration - @discussion Used in combination with the setBacklight to swith on the + @discussion Used in combination with the setBacklight to switch on the LCD backlight. @set setBacklight */ #define BACKLIGHT_ON 255 @@ -205,7 +205,7 @@ class LCD : public Print This method is abstract, a base implementation is available common to all LCD drivers. Should it not be compatible with some other LCD driver, a derived - implementation should be done on the driver specif class. + implementation should be done on the driver specified class. @param cols[in] the number of columns that the display has @param rows[in] the number of rows that the display has @@ -495,7 +495,7 @@ class LCD : public Print or the adequate backlight control constructor. @see setBacklightPin. - NOTE: The prefered methods to control the backlight are "backlight" and + NOTE: The preferred methods to control the backlight are "backlight" and "noBacklight". @param 0..255 - the value is very dependent on the LCD. However, diff --git a/Arduino_package/hardware/libraries/Wire/Wire.cpp b/Arduino_package/hardware/libraries/Wire/Wire.cpp index 6bb5c79..cb12e3a 100644 --- a/Arduino_package/hardware/libraries/Wire/Wire.cpp +++ b/Arduino_package/hardware/libraries/Wire/Wire.cpp @@ -106,25 +106,25 @@ void TwoWire::setClock(uint32_t frequency) { } uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity, uint8_t sendStop) { - int readed = 0; + int read = 0; if (quantity > BUFFER_LENGTH) quantity = BUFFER_LENGTH; // perform blocking read into buffer - readed = i2c_read( (i2c_t *)this->pI2C, (int)address, (char*)&this->rxBuffer[0], (int)quantity, (int)sendStop ); + read = i2c_read( (i2c_t *)this->pI2C, (int)address, (char*)&this->rxBuffer[0], (int)quantity, (int)sendStop ); // i2c_read error; - if ( readed != quantity ) { - printf("requestFrom: readed=%d, quantity=%d : ERROR\n", readed, quantity); - return readed; + if ( read != quantity ) { + printf("requestFrom: read=%d, quantity=%d : ERROR\n", read, quantity); + return read; } // set rx buffer iterator vars rxBufferIndex = 0; - rxBufferLength = readed; + rxBufferLength = read; - return readed; + return read; } uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity) {