aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'libraries')
-rw-r--r--libraries/EEPROM/README.md6
-rw-r--r--libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino6
-rw-r--r--libraries/EEPROM/examples/eeprom_iteration/eeprom_iteration.ino2
-rw-r--r--libraries/EEPROM/examples/eeprom_read/eeprom_read.ino6
-rw-r--r--libraries/EEPROM/examples/eeprom_update/eeprom_update.ino8
-rw-r--r--libraries/EEPROM/examples/eeprom_write/eeprom_write.ino6
-rw-r--r--libraries/HID/src/HID.cpp2
-rw-r--r--libraries/SPI/examples/BarometricPressureSensor/BarometricPressureSensor.ino3
-rw-r--r--libraries/SPI/examples/DigitalPotControl/DigitalPotControl.ino6
-rw-r--r--libraries/SPI/src/SPI.h2
-rw-r--r--libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino3
-rw-r--r--libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino10
-rw-r--r--libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.ino8
-rw-r--r--libraries/Wire/examples/digital_potentiometer/digital_potentiometer.ino3
-rw-r--r--libraries/Wire/examples/i2c_scanner/i2c_scanner.ino6
-rw-r--r--libraries/Wire/examples/master_reader/master_reader.ino2
-rw-r--r--libraries/Wire/examples/master_writer/master_writer.ino2
-rw-r--r--libraries/Wire/examples/slave_receiver/slave_receiver.ino2
-rw-r--r--libraries/Wire/examples/slave_sender/slave_sender.ino2
-rw-r--r--libraries/Wire/src/Wire.cpp4
-rw-r--r--libraries/Wire/src/utility/twi.c10
21 files changed, 45 insertions, 54 deletions
diff --git a/libraries/EEPROM/README.md b/libraries/EEPROM/README.md
index a624136..9ca761d 100644
--- a/libraries/EEPROM/README.md
+++ b/libraries/EEPROM/README.md
@@ -53,7 +53,7 @@ This function does not return any value.
This function will retrieve any object from the EEPROM.
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.
-This function returns a reference to the `object` passed in. It does not need to be used and is only returned for conveience.
+This function returns a reference to the `object` passed in. It does not need to be used and is only returned for convenience.
#### **`EEPROM.put( address, object )`** [[_example_]](examples/eeprom_put/eeprom_put.ino)
@@ -62,7 +62,7 @@ Two parameters are needed to call this function. The first is an `int` containin
This function uses the _update_ method to write its data, and therefore only rewrites changed cells.
-This function returns a reference to the `object` passed in. It does not need to be used and is only returned for conveience.
+This function returns a reference to the `object` passed in. It does not need to be used and is only returned for convenience.
#### **Subscript operator: `EEPROM[address]`** [[_example_]](examples/eeprom_crc/eeprom_crc.ino)
@@ -136,4 +136,4 @@ This is useful for STL objects, custom iteration and C++11 style ranged for loop
This function returns an `EEPtr` pointing at the location after the last EEPROM cell.
Used with `begin()` to provide custom iteration.
-**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.
+**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.
diff --git a/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino b/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino
index 8b5121c..3fed10f 100644
--- a/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino
+++ b/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino
@@ -18,9 +18,9 @@ void setup() {
Iterate through each byte of the EEPROM storage.
Larger AVR processors have larger EEPROM sizes, E.g:
- - Arduno Duemilanove: 512b EEPROM storage.
- - Arduino Uno: 1kb EEPROM storage.
- - Arduino Mega: 4kb EEPROM storage.
+ - Arduino Duemilanove: 512 B EEPROM storage.
+ - Arduino Uno: 1 kB EEPROM storage.
+ - Arduino Mega: 4 kB EEPROM storage.
Rather than hard-coding the length, you should use the pre-provided length function.
This will make your code portable to all AVR processors.
diff --git a/libraries/EEPROM/examples/eeprom_iteration/eeprom_iteration.ino b/libraries/EEPROM/examples/eeprom_iteration/eeprom_iteration.ino
index 3673b47..b5d68be 100644
--- a/libraries/EEPROM/examples/eeprom_iteration/eeprom_iteration.ino
+++ b/libraries/EEPROM/examples/eeprom_iteration/eeprom_iteration.ino
@@ -54,4 +54,4 @@ void setup() {
} //End of setup function.
-void loop() {} \ No newline at end of file
+void loop() {}
diff --git a/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino b/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino
index a8a3510..d465035 100644
--- a/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino
+++ b/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino
@@ -33,9 +33,9 @@ void loop() {
Advance to the next address, when at the end restart at the beginning.
Larger AVR processors have larger EEPROM sizes, E.g:
- - Arduno Duemilanove: 512b EEPROM storage.
- - Arduino Uno: 1kb EEPROM storage.
- - Arduino Mega: 4kb EEPROM storage.
+ - Arduino Duemilanove: 512 B EEPROM storage.
+ - Arduino Uno: 1 kB EEPROM storage.
+ - Arduino Mega: 4 kB EEPROM storage.
Rather than hard-coding the length, you should use the pre-provided length function.
This will make your code portable to all AVR processors.
diff --git a/libraries/EEPROM/examples/eeprom_update/eeprom_update.ino b/libraries/EEPROM/examples/eeprom_update/eeprom_update.ino
index 5e3db5b..f5b0c0c 100644
--- a/libraries/EEPROM/examples/eeprom_update/eeprom_update.ino
+++ b/libraries/EEPROM/examples/eeprom_update/eeprom_update.ino
@@ -17,7 +17,7 @@
int address = 0;
void setup() {
- /** EMpty setup **/
+ /** Empty setup **/
}
void loop() {
@@ -48,9 +48,9 @@ void loop() {
Advance to the next address, when at the end restart at the beginning.
Larger AVR processors have larger EEPROM sizes, E.g:
- - Arduno Duemilanove: 512b EEPROM storage.
- - Arduino Uno: 1kb EEPROM storage.
- - Arduino Mega: 4kb EEPROM storage.
+ - Arduino Duemilanove: 512 B EEPROM storage.
+ - Arduino Uno: 1 kB EEPROM storage.
+ - Arduino Mega: 4 kB EEPROM storage.
Rather than hard-coding the length, you should use the pre-provided length function.
This will make your code portable to all AVR processors.
diff --git a/libraries/EEPROM/examples/eeprom_write/eeprom_write.ino b/libraries/EEPROM/examples/eeprom_write/eeprom_write.ino
index f9bea64..64e835c 100644
--- a/libraries/EEPROM/examples/eeprom_write/eeprom_write.ino
+++ b/libraries/EEPROM/examples/eeprom_write/eeprom_write.ino
@@ -36,9 +36,9 @@ void loop() {
Advance to the next address, when at the end restart at the beginning.
Larger AVR processors have larger EEPROM sizes, E.g:
- - Arduno Duemilanove: 512b EEPROM storage.
- - Arduino Uno: 1kb EEPROM storage.
- - Arduino Mega: 4kb EEPROM storage.
+ - Arduino Duemilanove: 512 B EEPROM storage.
+ - Arduino Uno: 1 kB EEPROM storage.
+ - Arduino Mega: 4 kB EEPROM storage.
Rather than hard-coding the length, you should use the pre-provided length function.
This will make your code portable to all AVR processors.
diff --git a/libraries/HID/src/HID.cpp b/libraries/HID/src/HID.cpp
index 21ede26..3dd85fc 100644
--- a/libraries/HID/src/HID.cpp
+++ b/libraries/HID/src/HID.cpp
@@ -43,7 +43,7 @@ int HID_::getDescriptor(USBSetup& setup)
if (setup.bmRequestType != REQUEST_DEVICETOHOST_STANDARD_INTERFACE) { return 0; }
if (setup.wValueH != HID_REPORT_DESCRIPTOR_TYPE) { return 0; }
- // In a HID Class Descriptor wIndex cointains the interface number
+ // In a HID Class Descriptor wIndex contains the interface number
if (setup.wIndex != pluggedInterface) { return 0; }
int total = 0;
diff --git a/libraries/SPI/examples/BarometricPressureSensor/BarometricPressureSensor.ino b/libraries/SPI/examples/BarometricPressureSensor/BarometricPressureSensor.ino
index df73ade..1b8ad70 100644
--- a/libraries/SPI/examples/BarometricPressureSensor/BarometricPressureSensor.ino
+++ b/libraries/SPI/examples/BarometricPressureSensor/BarometricPressureSensor.ino
@@ -43,7 +43,7 @@ void setup() {
// start the SPI library:
SPI.begin();
- // initalize the data ready and chip select pins:
+ // initialize the data ready and chip select pins:
pinMode(dataReadyPin, INPUT);
pinMode(chipSelectPin, OUTPUT);
@@ -140,4 +140,3 @@ void writeRegister(byte thisRegister, byte thisValue) {
// take the chip select high to de-select:
digitalWrite(chipSelectPin, HIGH);
}
-
diff --git a/libraries/SPI/examples/DigitalPotControl/DigitalPotControl.ino b/libraries/SPI/examples/DigitalPotControl/DigitalPotControl.ino
index 8719058..39e5bf9 100644
--- a/libraries/SPI/examples/DigitalPotControl/DigitalPotControl.ino
+++ b/libraries/SPI/examples/DigitalPotControl/DigitalPotControl.ino
@@ -14,7 +14,7 @@
The circuit:
* All A pins of AD5206 connected to +5V
* All B pins of AD5206 connected to ground
- * An LED and a 220-ohm resisor in series connected from each W pin to ground
+ * An LED and a 220-ohm resistor in series connected from each W pin to ground
* CS - to digital pin 10 (SS pin)
* SDI - to digital pin 11 (MOSI pin)
* CLK - to digital pin 13 (SCK pin)
@@ -27,7 +27,7 @@
*/
-// inslude the SPI library:
+// include the SPI library:
#include <SPI.h>
@@ -64,7 +64,7 @@ void digitalPotWrite(int address, int value) {
// take the SS pin low to select the chip:
digitalWrite(slaveSelectPin, LOW);
delay(100);
- // send in the address and value via SPI:
+ // send in the address and value via SPI:
SPI.transfer(address);
SPI.transfer(value);
delay(100);
diff --git a/libraries/SPI/src/SPI.h b/libraries/SPI/src/SPI.h
index 5206a09..1e37079 100644
--- a/libraries/SPI/src/SPI.h
+++ b/libraries/SPI/src/SPI.h
@@ -106,7 +106,7 @@ private:
// slowest (128 == 2 ^^ 7, so clock_div = 6).
uint8_t clockDiv;
- // When the clock is known at compiletime, use this if-then-else
+ // When the clock is known at compile time, use this if-then-else
// cascade, which the compiler knows how to completely optimize
// away. When clock is not known, use a loop instead, which generates
// shorter code.
diff --git a/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino b/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino
index 61ce88c..061bb70 100644
--- a/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino
+++ b/libraries/SoftwareSerial/examples/SoftwareSerialExample/SoftwareSerialExample.ino
@@ -1,5 +1,5 @@
/*
- Software serial multple serial test
+ Software serial multiple serial test
Receives from the hardware serial, sends to software serial.
Receives from software serial, sends to hardware serial.
@@ -52,4 +52,3 @@ void loop() { // run over and over
mySerial.write(Serial.read());
}
}
-
diff --git a/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino b/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino
index 8d7f93e..d8c064b 100644
--- a/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino
+++ b/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino
@@ -1,5 +1,5 @@
/*
- Software serial multple serial test
+ Software serial multiple serial test
Receives from the two software serial ports,
sends to the hardware serial port.
@@ -56,7 +56,7 @@ void setup() {
}
void loop() {
- // By default, the last intialized port is listening.
+ // By default, the last initialized port is listening.
// when you want to listen on a port, explicitly select it:
portOne.listen();
Serial.println("Data from port one:");
@@ -83,9 +83,3 @@ void loop() {
// blank line to separate data from the two ports:
Serial.println();
}
-
-
-
-
-
-
diff --git a/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.ino b/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.ino
index 4d0a68f..aeb1a9c 100644
--- a/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.ino
+++ b/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.ino
@@ -3,7 +3,7 @@
// and James Tichenor <http://www.jamestichenor.net>
// Demonstrates use of the Wire library reading data from the
-// Devantech Utrasonic Rangers SFR08 and SFR10
+// Devantech Ultrasonic Rangers SFR08 and SFR10
// Created 29 April 2006
@@ -13,8 +13,8 @@
#include <Wire.h>
void setup() {
- Wire.begin(); // join i2c bus (address optional for master)
- Serial.begin(9600); // start serial communication at 9600bps
+ Wire.begin(); // join I2C bus (address optional for master)
+ Serial.begin(9600); // start serial communication at 9600 bps
}
int reading = 0;
@@ -23,7 +23,7 @@ void loop() {
// step 1: instruct sensor to read echoes
Wire.beginTransmission(112); // transmit to device #112 (0x70)
// the address specified in the datasheet is 224 (0xE0)
- // but i2c adressing uses the high 7 bits so it's 112
+ // but I2C addressing uses the high 7 bits so it's 112
Wire.write(byte(0x00)); // sets register pointer to the command register (0x00)
Wire.write(byte(0x50)); // command sensor to measure in "inches" (0x50)
// use 0x51 for centimeters
diff --git a/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.ino b/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.ino
index dd40a25..b5da366 100644
--- a/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.ino
+++ b/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.ino
@@ -13,7 +13,7 @@
#include <Wire.h>
void setup() {
- Wire.begin(); // join i2c bus (address optional for master)
+ Wire.begin(); // join I2C bus (address optional for master)
}
byte val = 0;
@@ -31,4 +31,3 @@ void loop() {
}
delay(500);
}
-
diff --git a/libraries/Wire/examples/i2c_scanner/i2c_scanner.ino b/libraries/Wire/examples/i2c_scanner/i2c_scanner.ino
index 3febbf4..295edf7 100644
--- a/libraries/Wire/examples/i2c_scanner/i2c_scanner.ino
+++ b/libraries/Wire/examples/i2c_scanner/i2c_scanner.ino
@@ -5,7 +5,7 @@
// This program (or code that looks like it)
// can be found in many places.
// For example on the Arduino.cc forum.
-// The original author is not know.
+// The original author is not known.
// Version 2, Juni 2012, Using Arduino 1.0.1
// Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26 2013
@@ -33,7 +33,7 @@ void setup() {
Wire.begin();
Serial.begin(9600);
- while (!Serial); // Leonardo: wait for serial monitor
+ while (!Serial); // Leonardo: wait for Serial Monitor
Serial.println("\nI2C Scanner");
}
@@ -44,7 +44,7 @@ void loop() {
for (byte address = 1; address < 127; ++address) {
// The i2c_scanner uses the return value of
- // the Write.endTransmisstion to see if
+ // the Wire.endTransmission to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
byte error = Wire.endTransmission();
diff --git a/libraries/Wire/examples/master_reader/master_reader.ino b/libraries/Wire/examples/master_reader/master_reader.ino
index ecab72a..e27cac3 100644
--- a/libraries/Wire/examples/master_reader/master_reader.ino
+++ b/libraries/Wire/examples/master_reader/master_reader.ino
@@ -13,7 +13,7 @@
#include <Wire.h>
void setup() {
- Wire.begin(); // join i2c bus (address optional for master)
+ Wire.begin(); // join I2C bus (address optional for master)
Serial.begin(9600); // start serial for output
}
diff --git a/libraries/Wire/examples/master_writer/master_writer.ino b/libraries/Wire/examples/master_writer/master_writer.ino
index 5cbea11..7a17668 100644
--- a/libraries/Wire/examples/master_writer/master_writer.ino
+++ b/libraries/Wire/examples/master_writer/master_writer.ino
@@ -13,7 +13,7 @@
#include <Wire.h>
void setup() {
- Wire.begin(); // join i2c bus (address optional for master)
+ Wire.begin(); // join I2C bus (address optional for master)
}
byte x = 0;
diff --git a/libraries/Wire/examples/slave_receiver/slave_receiver.ino b/libraries/Wire/examples/slave_receiver/slave_receiver.ino
index 8051d53..9b3f814 100644
--- a/libraries/Wire/examples/slave_receiver/slave_receiver.ino
+++ b/libraries/Wire/examples/slave_receiver/slave_receiver.ino
@@ -13,7 +13,7 @@
#include <Wire.h>
void setup() {
- Wire.begin(8); // join i2c bus with address #8
+ Wire.begin(8); // join I2C bus with address #8
Wire.onReceive(receiveEvent); // register event
Serial.begin(9600); // start serial for output
}
diff --git a/libraries/Wire/examples/slave_sender/slave_sender.ino b/libraries/Wire/examples/slave_sender/slave_sender.ino
index d2e72bb..6e2ed49 100644
--- a/libraries/Wire/examples/slave_sender/slave_sender.ino
+++ b/libraries/Wire/examples/slave_sender/slave_sender.ino
@@ -13,7 +13,7 @@
#include <Wire.h>
void setup() {
- Wire.begin(8); // join i2c bus with address #8
+ Wire.begin(8); // join I2C bus with address #8
Wire.onRequest(requestEvent); // register event
}
diff --git a/libraries/Wire/src/Wire.cpp b/libraries/Wire/src/Wire.cpp
index c407776..001d924 100644
--- a/libraries/Wire/src/Wire.cpp
+++ b/libraries/Wire/src/Wire.cpp
@@ -100,7 +100,7 @@ void TwoWire::setClock(uint32_t clock)
* when `clearWireTimeoutFlag()` or `setWireTimeoutUs()` is called.
*
* Note that this timeout can also trigger while waiting for clock stretching or waiting for a second master
- * to complete its transaction. So make sure to adapt the timeout to accomodate for those cases if needed.
+ * to complete its transaction. So make sure to adapt the timeout to accommodate for those cases if needed.
* A typical timeout would be 25ms (which is the maximum clock stretching allowed by the SMBus protocol),
* but (much) shorter values will usually also work.
*
@@ -120,7 +120,7 @@ void TwoWire::setWireTimeout(uint32_t timeout, bool reset_with_timeout){
/***
* Returns the TWI timeout flag.
*
- * @return true if timeout has occured since the flag was last cleared.
+ * @return true if timeout has occurred since the flag was last cleared.
*/
bool TwoWire::getWireTimeoutFlag(void){
return(twi_manageTimeoutFlag(false));
diff --git a/libraries/Wire/src/utility/twi.c b/libraries/Wire/src/utility/twi.c
index d223760..e09a33c 100644
--- a/libraries/Wire/src/utility/twi.c
+++ b/libraries/Wire/src/utility/twi.c
@@ -175,7 +175,7 @@ uint8_t twi_readFrom(uint8_t address, uint8_t* data, uint8_t length, uint8_t sen
}
twi_state = TWI_MRX;
twi_sendStop = sendStop;
- // reset error state (0xFF.. no error occured)
+ // reset error state (0xFF.. no error occurred)
twi_error = 0xFF;
// initialize buffer iteration vars
@@ -183,7 +183,7 @@ uint8_t twi_readFrom(uint8_t address, uint8_t* data, uint8_t length, uint8_t sen
twi_masterBufferLength = length-1; // This is not intuitive, read on...
// On receive, the previously configured ACK/NACK setting is transmitted in
// response to the received byte before the interrupt is signalled.
- // Therefor we must actually set NACK when the _next_ to last byte is
+ // Therefore we must actually set NACK when the _next_ to last byte is
// received, causing that NACK to be sent in response to receiving the last
// expected byte of data.
@@ -269,7 +269,7 @@ uint8_t twi_writeTo(uint8_t address, uint8_t* data, uint8_t length, uint8_t wait
}
twi_state = TWI_MTX;
twi_sendStop = sendStop;
- // reset error state (0xFF.. no error occured)
+ // reset error state (0xFF.. no error occurred)
twi_error = 0xFF;
// initialize buffer iteration vars
@@ -294,7 +294,7 @@ uint8_t twi_writeTo(uint8_t address, uint8_t* data, uint8_t length, uint8_t wait
// We need to remove ourselves from the repeated start state before we enable interrupts,
// since the ISR is ASYNC, and we could get confused if we hit the ISR before cleaning
// up. Also, don't enable the START interrupt. There may be one pending from the
- // repeated start that we sent outselves, and that would really confuse things.
+ // repeated start that we sent ourselves, and that would really confuse things.
twi_inRepStart = false; // remember, we're dealing with an ASYNC ISR
startMicros = micros();
do {
@@ -411,7 +411,7 @@ void twi_stop(void)
// send stop condition
TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTO);
- // wait for stop condition to be exectued on bus
+ // wait for stop condition to be executed on bus
// TWINT is not set after a stop condition!
// We cannot use micros() from an ISR, so approximate the timeout with cycle-counted delays
const uint8_t us_per_loop = 8;