Skip to content

Commit 8b327d7

Browse files
committed
Correct typos in comments and documentation
1 parent 5ec42f9 commit 8b327d7

File tree

32 files changed

+69
-78
lines changed

32 files changed

+69
-78
lines changed

cores/arduino/HardwareSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ void HardwareSerial::flush()
219219
_tx_udr_empty_irq();
220220
}
221221
// If we get here, nothing is queued anymore (DRIE is disabled) and
222-
// the hardware finished tranmission (TXC is set).
222+
// the hardware finished transmission (TXC is set).
223223
}
224224

225225
size_t HardwareSerial::write(uint8_t c)

cores/arduino/HardwareSerial.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
// using a ring buffer (I think), in which head is the index of the location
3333
// to which to write the next incoming character and tail is the index of the
3434
// location from which to read.
35-
// NOTE: a "power of 2" buffer size is reccomended to dramatically
35+
// NOTE: a "power of 2" buffer size is recommended to dramatically
3636
// optimize all the modulo operations for ring buffers.
3737
// WARNING: When buffer sizes are increased to > 256, the buffer index
3838
// variables are automatically increased in size, but the extra

cores/arduino/HardwareSerial_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
#endif
6464
#endif // !defined TXC0
6565

66-
// Check at compiletime that it is really ok to use the bit positions of
66+
// Check at compile time that it is really ok to use the bit positions of
6767
// UART0 for the other UARTs as well, in case these values ever get
6868
// changed for future hardware.
6969
#if defined(TXC1) && (TXC1 != TXC0 || RXEN1 != RXEN0 || RXCIE1 != RXCIE0 || \

cores/arduino/Print.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Print
5959
}
6060

6161
// default to zero, meaning "a single write may block"
62-
// should be overriden by subclasses with buffering
62+
// should be overridden by subclasses with buffering
6363
virtual int availableForWrite() { return 0; }
6464

6565
size_t print(const __FlashStringHelper *);

cores/arduino/Stream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include <inttypes.h>
2626
#include "Print.h"
2727

28-
// compatability macros for testing
28+
// compatibility macros for testing
2929
/*
3030
#define getInt() parseInt()
3131
#define getInt(ignore) parseInt(ignore)

cores/arduino/USBAPI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ typedef unsigned long u32;
3232

3333
#include "Arduino.h"
3434

35-
// This definitions is usefull if you want to reduce the EP_SIZE to 16
35+
// This definitions is useful if you want to reduce the EP_SIZE to 16
3636
// at the moment only 64 and 16 as EP_SIZE for all EPs are supported except the control endpoint
3737
#ifndef USB_EP_SIZE
3838
#define USB_EP_SIZE 64

cores/arduino/WString.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class String
9595

9696
// returns true on success, false on failure (in which case, the string
9797
// is left unchanged). if the argument is null or invalid, the
98-
// concatenation is considered unsucessful.
98+
// concatenation is considered unsuccessful.
9999
unsigned char concat(const String &str);
100100
unsigned char concat(const char *cstr);
101101
unsigned char concat(char c);
@@ -152,7 +152,7 @@ class String
152152
unsigned char startsWith(const String &prefix, unsigned int offset) const;
153153
unsigned char endsWith(const String &suffix) const;
154154

155-
// character acccess
155+
// character access
156156
char charAt(unsigned int index) const;
157157
void setCharAt(unsigned int index, char c);
158158
char operator [] (unsigned int index) const;

cores/arduino/new.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include "new.h"
2020

21-
// The C++ spec dicates that allocation failure should cause the
21+
// The C++ spec dictates that allocation failure should cause the
2222
// (non-nothrow version of the) operator new to throw an exception.
2323
// Since we expect to have exceptions disabled, it would be more
2424
// appropriate (and probably standards-compliant) to terminate instead.

cores/arduino/wiring.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void delayMicroseconds(unsigned int us)
125125
// 2 microseconds) gives delays longer than desired.
126126
//delay_us(us);
127127
#if F_CPU >= 24000000L
128-
// for the 24 MHz clock for the aventurous ones, trying to overclock
128+
// for the 24 MHz clock for the adventurous ones trying to overclock
129129

130130
// zero delay fix
131131
if (!us) return; // = 3 cycles, (4 when true)
@@ -135,9 +135,9 @@ void delayMicroseconds(unsigned int us)
135135
// delay requested.
136136
us *= 6; // x6 us, = 7 cycles
137137

138-
// account for the time taken in the preceeding commands.
138+
// account for the time taken in the preceding commands.
139139
// we just burned 22 (24) cycles above, remove 5, (5*4=20)
140-
// us is at least 6 so we can substract 5
140+
// us is at least 6 so we can subtract 5
141141
us -= 5; //=2 cycles
142142

143143
#elif F_CPU >= 20000000L
@@ -157,9 +157,9 @@ void delayMicroseconds(unsigned int us)
157157
// delay requested.
158158
us = (us << 2) + us; // x5 us, = 7 cycles
159159

160-
// account for the time taken in the preceeding commands.
160+
// account for the time taken in the preceding commands.
161161
// we just burned 26 (28) cycles above, remove 7, (7*4=28)
162-
// us is at least 10 so we can substract 7
162+
// us is at least 10 so we can subtract 7
163163
us -= 7; // 2 cycles
164164

165165
#elif F_CPU >= 16000000L
@@ -174,9 +174,9 @@ void delayMicroseconds(unsigned int us)
174174
// delay requested.
175175
us <<= 2; // x4 us, = 4 cycles
176176

177-
// account for the time taken in the preceeding commands.
177+
// account for the time taken in the preceding commands.
178178
// we just burned 19 (21) cycles above, remove 5, (5*4=20)
179-
// us is at least 8 so we can substract 5
179+
// us is at least 8 so we can subtract 5
180180
us -= 5; // = 2 cycles,
181181

182182
#elif F_CPU >= 12000000L
@@ -191,9 +191,9 @@ void delayMicroseconds(unsigned int us)
191191
// delay requested.
192192
us = (us << 1) + us; // x3 us, = 5 cycles
193193

194-
// account for the time taken in the preceeding commands.
194+
// account for the time taken in the preceding commands.
195195
// we just burned 20 (22) cycles above, remove 5, (5*4=20)
196-
// us is at least 6 so we can substract 5
196+
// us is at least 6 so we can subtract 5
197197
us -= 5; //2 cycles
198198

199199
#elif F_CPU >= 8000000L
@@ -208,19 +208,19 @@ void delayMicroseconds(unsigned int us)
208208
// delay requested.
209209
us <<= 1; //x2 us, = 2 cycles
210210

211-
// account for the time taken in the preceeding commands.
211+
// account for the time taken in the preceding commands.
212212
// we just burned 17 (19) cycles above, remove 4, (4*4=16)
213-
// us is at least 6 so we can substract 4
213+
// us is at least 6 so we can subtract 4
214214
us -= 4; // = 2 cycles
215215

216216
#else
217217
// for the 1 MHz internal clock (default settings for common Atmega microcontrollers)
218218

219219
// the overhead of the function calls is 14 (16) cycles
220220
if (us <= 16) return; //= 3 cycles, (4 when true)
221-
if (us <= 25) return; //= 3 cycles, (4 when true), (must be at least 25 if we want to substract 22)
221+
if (us <= 25) return; //= 3 cycles, (4 when true), (must be at least 25 if we want to subtract 22)
222222

223-
// compensate for the time taken by the preceeding and next commands (about 22 cycles)
223+
// compensate for the time taken by the preceding and next commands (about 22 cycles)
224224
us -= 22; // = 2 cycles
225225
// the following loop takes 4 microseconds (4 cycles)
226226
// per iteration, so execute it us/4 times

cores/arduino/wiring_digital.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void pinMode(uint8_t pin, uint8_t mode)
6767
//
6868
// Mark Sproul:
6969
// - Removed inline. Save 170 bytes on atmega1280
70-
// - changed to a switch statment; added 32 bytes but much easier to read and maintain.
70+
// - changed to a switch statement; added 32 bytes but much easier to read and maintain.
7171
// - Added more #ifdefs, now compiles for atmega645
7272
//
7373
//static inline void turnOffPWM(uint8_t timer) __attribute__ ((always_inline));

0 commit comments

Comments
 (0)