From 8b327d7bede1c1245db99daeba4e168c92c11194 Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 26 May 2021 04:35:59 -0700 Subject: Correct typos in comments and documentation --- cores/arduino/HardwareSerial.cpp | 2 +- cores/arduino/HardwareSerial.h | 2 +- cores/arduino/HardwareSerial_private.h | 2 +- cores/arduino/Print.h | 2 +- cores/arduino/Stream.h | 2 +- cores/arduino/USBAPI.h | 2 +- cores/arduino/WString.h | 4 ++-- cores/arduino/new.cpp | 2 +- cores/arduino/wiring.c | 26 +++++++++++++------------- cores/arduino/wiring_digital.c | 2 +- 10 files changed, 23 insertions(+), 23 deletions(-) (limited to 'cores/arduino') diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp index e99d503..561127f 100644 --- a/cores/arduino/HardwareSerial.cpp +++ b/cores/arduino/HardwareSerial.cpp @@ -219,7 +219,7 @@ void HardwareSerial::flush() _tx_udr_empty_irq(); } // If we get here, nothing is queued anymore (DRIE is disabled) and - // the hardware finished tranmission (TXC is set). + // the hardware finished transmission (TXC is set). } size_t HardwareSerial::write(uint8_t c) diff --git a/cores/arduino/HardwareSerial.h b/cores/arduino/HardwareSerial.h index 17000c2..6ff29d0 100644 --- a/cores/arduino/HardwareSerial.h +++ b/cores/arduino/HardwareSerial.h @@ -32,7 +32,7 @@ // using a ring buffer (I think), in which head is the index of the location // to which to write the next incoming character and tail is the index of the // location from which to read. -// NOTE: a "power of 2" buffer size is reccomended to dramatically +// NOTE: a "power of 2" buffer size is recommended to dramatically // optimize all the modulo operations for ring buffers. // WARNING: When buffer sizes are increased to > 256, the buffer index // variables are automatically increased in size, but the extra diff --git a/cores/arduino/HardwareSerial_private.h b/cores/arduino/HardwareSerial_private.h index 761a5e5..2e23cec 100644 --- a/cores/arduino/HardwareSerial_private.h +++ b/cores/arduino/HardwareSerial_private.h @@ -63,7 +63,7 @@ #endif #endif // !defined TXC0 -// Check at compiletime that it is really ok to use the bit positions of +// Check at compile time that it is really ok to use the bit positions of // UART0 for the other UARTs as well, in case these values ever get // changed for future hardware. #if defined(TXC1) && (TXC1 != TXC0 || RXEN1 != RXEN0 || RXCIE1 != RXCIE0 || \ diff --git a/cores/arduino/Print.h b/cores/arduino/Print.h index 058a2ab..0097cc1 100644 --- a/cores/arduino/Print.h +++ b/cores/arduino/Print.h @@ -59,7 +59,7 @@ class Print } // default to zero, meaning "a single write may block" - // should be overriden by subclasses with buffering + // should be overridden by subclasses with buffering virtual int availableForWrite() { return 0; } size_t print(const __FlashStringHelper *); diff --git a/cores/arduino/Stream.h b/cores/arduino/Stream.h index 8e950c7..21a247a 100644 --- a/cores/arduino/Stream.h +++ b/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(ignore) parseInt(ignore) diff --git a/cores/arduino/USBAPI.h b/cores/arduino/USBAPI.h index 701a14f..3ff1459 100644 --- a/cores/arduino/USBAPI.h +++ b/cores/arduino/USBAPI.h @@ -32,7 +32,7 @@ typedef unsigned long u32; #include "Arduino.h" -// This definitions is usefull if you want to reduce the EP_SIZE to 16 +// This definitions is useful if you want to reduce the EP_SIZE to 16 // at the moment only 64 and 16 as EP_SIZE for all EPs are supported except the control endpoint #ifndef USB_EP_SIZE #define USB_EP_SIZE 64 diff --git a/cores/arduino/WString.h b/cores/arduino/WString.h index 77709c3..2cf4cd7 100644 --- a/cores/arduino/WString.h +++ b/cores/arduino/WString.h @@ -95,7 +95,7 @@ public: // 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 @@ public: 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/cores/arduino/new.cpp b/cores/arduino/new.cpp index 9047b2d..7ca4931 100644 --- a/cores/arduino/new.cpp +++ b/cores/arduino/new.cpp @@ -18,7 +18,7 @@ #include "new.h" -// The C++ spec dicates that allocation failure should cause the +// The C++ spec dictates that allocation failure should cause the // (non-nothrow version of the) operator new to throw an exception. // Since we expect to have exceptions disabled, it would be more // appropriate (and probably standards-compliant) to terminate instead. diff --git a/cores/arduino/wiring.c b/cores/arduino/wiring.c index 9727135..8caf455 100644 --- a/cores/arduino/wiring.c +++ b/cores/arduino/wiring.c @@ -125,7 +125,7 @@ void delayMicroseconds(unsigned int us) // 2 microseconds) gives delays longer than desired. //delay_us(us); #if F_CPU >= 24000000L - // for the 24 MHz clock for the aventurous ones, trying to overclock + // for the 24 MHz clock for the adventurous ones trying to overclock // zero delay fix if (!us) return; // = 3 cycles, (4 when true) @@ -135,9 +135,9 @@ void delayMicroseconds(unsigned int us) // delay requested. us *= 6; // x6 us, = 7 cycles - // account for the time taken in the preceeding commands. + // account for the time taken in the preceding commands. // we just burned 22 (24) cycles above, remove 5, (5*4=20) - // us is at least 6 so we can substract 5 + // us is at least 6 so we can subtract 5 us -= 5; //=2 cycles #elif F_CPU >= 20000000L @@ -157,9 +157,9 @@ void delayMicroseconds(unsigned int us) // delay requested. us = (us << 2) + us; // x5 us, = 7 cycles - // account for the time taken in the preceeding commands. + // account for the time taken in the preceding commands. // we just burned 26 (28) cycles above, remove 7, (7*4=28) - // us is at least 10 so we can substract 7 + // us is at least 10 so we can subtract 7 us -= 7; // 2 cycles #elif F_CPU >= 16000000L @@ -174,9 +174,9 @@ void delayMicroseconds(unsigned int us) // delay requested. us <<= 2; // x4 us, = 4 cycles - // account for the time taken in the preceeding commands. + // account for the time taken in the preceding commands. // we just burned 19 (21) cycles above, remove 5, (5*4=20) - // us is at least 8 so we can substract 5 + // us is at least 8 so we can subtract 5 us -= 5; // = 2 cycles, #elif F_CPU >= 12000000L @@ -191,9 +191,9 @@ void delayMicroseconds(unsigned int us) // delay requested. us = (us << 1) + us; // x3 us, = 5 cycles - // account for the time taken in the preceeding commands. + // account for the time taken in the preceding commands. // we just burned 20 (22) cycles above, remove 5, (5*4=20) - // us is at least 6 so we can substract 5 + // us is at least 6 so we can subtract 5 us -= 5; //2 cycles #elif F_CPU >= 8000000L @@ -208,9 +208,9 @@ void delayMicroseconds(unsigned int us) // delay requested. us <<= 1; //x2 us, = 2 cycles - // account for the time taken in the preceeding commands. + // account for the time taken in the preceding commands. // we just burned 17 (19) cycles above, remove 4, (4*4=16) - // us is at least 6 so we can substract 4 + // us is at least 6 so we can subtract 4 us -= 4; // = 2 cycles #else @@ -218,9 +218,9 @@ void delayMicroseconds(unsigned int us) // the overhead of the function calls is 14 (16) cycles if (us <= 16) return; //= 3 cycles, (4 when true) - if (us <= 25) return; //= 3 cycles, (4 when true), (must be at least 25 if we want to substract 22) + if (us <= 25) return; //= 3 cycles, (4 when true), (must be at least 25 if we want to subtract 22) - // compensate for the time taken by the preceeding and next commands (about 22 cycles) + // compensate for the time taken by the preceding and next commands (about 22 cycles) us -= 22; // = 2 cycles // the following loop takes 4 microseconds (4 cycles) // per iteration, so execute it us/4 times diff --git a/cores/arduino/wiring_digital.c b/cores/arduino/wiring_digital.c index 27a62fc..432a150 100644 --- a/cores/arduino/wiring_digital.c +++ b/cores/arduino/wiring_digital.c @@ -67,7 +67,7 @@ void pinMode(uint8_t pin, uint8_t mode) // // Mark Sproul: // - Removed inline. Save 170 bytes on atmega1280 -// - changed to a switch statment; added 32 bytes but much easier to read and maintain. +// - changed to a switch statement; added 32 bytes but much easier to read and maintain. // - Added more #ifdefs, now compiles for atmega645 // //static inline void turnOffPWM(uint8_t timer) __attribute__ ((always_inline)); -- cgit v1.2.3-18-g5258