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));

libraries/EEPROM/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ This function does not return any value.
5353
This function will retrieve any object from the EEPROM.
5454
Two parameters are needed to call this function. The first is an `int` containing the address that is to be written, and the second is the object you would like to read.
5555

56-
This function returns a reference to the `object` passed in. It does not need to be used and is only returned for conveience.
56+
This function returns a reference to the `object` passed in. It does not need to be used and is only returned for convenience.
5757

5858
#### **`EEPROM.put( address, object )`** [[_example_]](examples/eeprom_put/eeprom_put.ino)
5959

@@ -62,7 +62,7 @@ Two parameters are needed to call this function. The first is an `int` containin
6262

6363
This function uses the _update_ method to write its data, and therefore only rewrites changed cells.
6464

65-
This function returns a reference to the `object` passed in. It does not need to be used and is only returned for conveience.
65+
This function returns a reference to the `object` passed in. It does not need to be used and is only returned for convenience.
6666

6767
#### **Subscript operator: `EEPROM[address]`** [[_example_]](examples/eeprom_crc/eeprom_crc.ino)
6868

@@ -136,4 +136,4 @@ This is useful for STL objects, custom iteration and C++11 style ranged for loop
136136
This function returns an `EEPtr` pointing at the location after the last EEPROM cell.
137137
Used with `begin()` to provide custom iteration.
138138

139-
**Note:** The `EEPtr` returned is invalid as it is out of range. Infact the hardware causes wrapping of the address (overflow) and `EEPROM.end()` actually references the first EEPROM cell.
139+
**Note:** The `EEPtr` returned is invalid as it is out of range. In fact the hardware causes wrapping of the address (overflow) and `EEPROM.end()` actually references the first EEPROM cell.

libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ void setup() {
1818
Iterate through each byte of the EEPROM storage.
1919
2020
Larger AVR processors have larger EEPROM sizes, E.g:
21-
- Arduno Duemilanove: 512b EEPROM storage.
22-
- Arduino Uno: 1kb EEPROM storage.
23-
- Arduino Mega: 4kb EEPROM storage.
21+
- Arduino Duemilanove: 512 B EEPROM storage.
22+
- Arduino Uno: 1 kB EEPROM storage.
23+
- Arduino Mega: 4 kB EEPROM storage.
2424
2525
Rather than hard-coding the length, you should use the pre-provided length function.
2626
This will make your code portable to all AVR processors.

libraries/EEPROM/examples/eeprom_iteration/eeprom_iteration.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ void setup() {
5454

5555
} //End of setup function.
5656

57-
void loop() {}
57+
void loop() {}

libraries/EEPROM/examples/eeprom_read/eeprom_read.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ void loop() {
3333
Advance to the next address, when at the end restart at the beginning.
3434
3535
Larger AVR processors have larger EEPROM sizes, E.g:
36-
- Arduno Duemilanove: 512b EEPROM storage.
37-
- Arduino Uno: 1kb EEPROM storage.
38-
- Arduino Mega: 4kb EEPROM storage.
36+
- Arduino Duemilanove: 512 B EEPROM storage.
37+
- Arduino Uno: 1 kB EEPROM storage.
38+
- Arduino Mega: 4 kB EEPROM storage.
3939
4040
Rather than hard-coding the length, you should use the pre-provided length function.
4141
This will make your code portable to all AVR processors.

libraries/EEPROM/examples/eeprom_update/eeprom_update.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
int address = 0;
1818

1919
void setup() {
20-
/** EMpty setup **/
20+
/** Empty setup **/
2121
}
2222

2323
void loop() {
@@ -48,9 +48,9 @@ void loop() {
4848
Advance to the next address, when at the end restart at the beginning.
4949
5050
Larger AVR processors have larger EEPROM sizes, E.g:
51-
- Arduno Duemilanove: 512b EEPROM storage.
52-
- Arduino Uno: 1kb EEPROM storage.
53-
- Arduino Mega: 4kb EEPROM storage.
51+
- Arduino Duemilanove: 512 B EEPROM storage.
52+
- Arduino Uno: 1 kB EEPROM storage.
53+
- Arduino Mega: 4 kB EEPROM storage.
5454
5555
Rather than hard-coding the length, you should use the pre-provided length function.
5656
This will make your code portable to all AVR processors.

libraries/EEPROM/examples/eeprom_write/eeprom_write.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ void loop() {
3636
Advance to the next address, when at the end restart at the beginning.
3737
3838
Larger AVR processors have larger EEPROM sizes, E.g:
39-
- Arduno Duemilanove: 512b EEPROM storage.
40-
- Arduino Uno: 1kb EEPROM storage.
41-
- Arduino Mega: 4kb EEPROM storage.
39+
- Arduino Duemilanove: 512 B EEPROM storage.
40+
- Arduino Uno: 1 kB EEPROM storage.
41+
- Arduino Mega: 4 kB EEPROM storage.
4242
4343
Rather than hard-coding the length, you should use the pre-provided length function.
4444
This will make your code portable to all AVR processors.

libraries/HID/src/HID.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ int HID_::getDescriptor(USBSetup& setup)
4343
if (setup.bmRequestType != REQUEST_DEVICETOHOST_STANDARD_INTERFACE) { return 0; }
4444
if (setup.wValueH != HID_REPORT_DESCRIPTOR_TYPE) { return 0; }
4545

46-
// In a HID Class Descriptor wIndex cointains the interface number
46+
// In a HID Class Descriptor wIndex contains the interface number
4747
if (setup.wIndex != pluggedInterface) { return 0; }
4848

4949
int total = 0;

libraries/SPI/examples/BarometricPressureSensor/BarometricPressureSensor.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void setup() {
4343
// start the SPI library:
4444
SPI.begin();
4545

46-
// initalize the data ready and chip select pins:
46+
// initialize the data ready and chip select pins:
4747
pinMode(dataReadyPin, INPUT);
4848
pinMode(chipSelectPin, OUTPUT);
4949

@@ -140,4 +140,3 @@ void writeRegister(byte thisRegister, byte thisValue) {
140140
// take the chip select high to de-select:
141141
digitalWrite(chipSelectPin, HIGH);
142142
}
143-

libraries/SPI/examples/DigitalPotControl/DigitalPotControl.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
The circuit:
1515
* All A pins of AD5206 connected to +5V
1616
* All B pins of AD5206 connected to ground
17-
* An LED and a 220-ohm resisor in series connected from each W pin to ground
17+
* An LED and a 220-ohm resistor in series connected from each W pin to ground
1818
* CS - to digital pin 10 (SS pin)
1919
* SDI - to digital pin 11 (MOSI pin)
2020
* CLK - to digital pin 13 (SCK pin)
@@ -27,7 +27,7 @@
2727
*/
2828

2929

30-
// inslude the SPI library:
30+
// include the SPI library:
3131
#include <SPI.h>
3232

3333

@@ -64,7 +64,7 @@ void digitalPotWrite(int address, int value) {
6464
// take the SS pin low to select the chip:
6565
digitalWrite(slaveSelectPin, LOW);
6666
delay(100);
67-
// send in the address and value via SPI:
67+
// send in the address and value via SPI:
6868
SPI.transfer(address);
6969
SPI.transfer(value);
7070
delay(100);

libraries/SPI/src/SPI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class SPISettings {
106106
// slowest (128 == 2 ^^ 7, so clock_div = 6).
107107
uint8_t clockDiv;
108108

109-
// When the clock is known at compiletime, use this if-then-else
109+
// When the clock is known at compile time, use this if-then-else
110110
// cascade, which the compiler knows how to completely optimize
111111
// away. When clock is not known, use a loop instead, which generates
112112
// shorter code.

libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Software serial multple serial test
2+
Software serial multiple serial test
33
44
Receives from the hardware serial, sends to software serial.
55
Receives from software serial, sends to hardware serial.
@@ -52,4 +52,3 @@ void loop() { // run over and over
5252
mySerial.write(Serial.read());
5353
}
5454
}
55-

libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Software serial multple serial test
2+
Software serial multiple serial test
33
44
Receives from the two software serial ports,
55
sends to the hardware serial port.
@@ -56,7 +56,7 @@ void setup() {
5656
}
5757

5858
void loop() {
59-
// By default, the last intialized port is listening.
59+
// By default, the last initialized port is listening.
6060
// when you want to listen on a port, explicitly select it:
6161
portOne.listen();
6262
Serial.println("Data from port one:");
@@ -83,9 +83,3 @@ void loop() {
8383
// blank line to separate data from the two ports:
8484
Serial.println();
8585
}
86-
87-
88-
89-
90-
91-

libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// and James Tichenor <http://www.jamestichenor.net>
44

55
// Demonstrates use of the Wire library reading data from the
6-
// Devantech Utrasonic Rangers SFR08 and SFR10
6+
// Devantech Ultrasonic Rangers SFR08 and SFR10
77

88
// Created 29 April 2006
99

@@ -13,8 +13,8 @@
1313
#include <Wire.h>
1414

1515
void setup() {
16-
Wire.begin(); // join i2c bus (address optional for master)
17-
Serial.begin(9600); // start serial communication at 9600bps
16+
Wire.begin(); // join I2C bus (address optional for master)
17+
Serial.begin(9600); // start serial communication at 9600 bps
1818
}
1919

2020
int reading = 0;
@@ -23,7 +23,7 @@ void loop() {
2323
// step 1: instruct sensor to read echoes
2424
Wire.beginTransmission(112); // transmit to device #112 (0x70)
2525
// the address specified in the datasheet is 224 (0xE0)
26-
// but i2c adressing uses the high 7 bits so it's 112
26+
// but I2C addressing uses the high 7 bits so it's 112
2727
Wire.write(byte(0x00)); // sets register pointer to the command register (0x00)
2828
Wire.write(byte(0x50)); // command sensor to measure in "inches" (0x50)
2929
// use 0x51 for centimeters

0 commit comments

Comments
 (0)