aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartino Facchin <m.facchin@arduino.cc>2021-05-26 15:50:02 +0200
committerGitHub <noreply@github.com>2021-05-26 15:50:02 +0200
commit24e6edd475c287cdafee0a4db2eb98927ce3cf58 (patch)
treeb3251605dc629e3bbc8ab899b4f4ffe66b1e1e98
parent1ac42f7ac0c365cfa4d901889ff6d4c23d3b4796 (diff)
parent20dc2e532e5cecd17a7f463cf86541d87e5090e8 (diff)
Merge pull request #413 from per1234/ci
Use GitHub Actions for continuous integration
-rw-r--r--.codespellrc7
-rw-r--r--.github/dependabot.yml10
-rw-r--r--.github/workflows/check-arduino.yml27
-rw-r--r--.github/workflows/compile-platform-examples.yml206
-rw-r--r--.github/workflows/report-size-deltas.yml24
-rw-r--r--.github/workflows/spell-check.yml22
-rw-r--r--README.md8
-rw-r--r--cores/arduino/HardwareSerial.cpp2
-rw-r--r--cores/arduino/HardwareSerial.h2
-rw-r--r--cores/arduino/HardwareSerial_private.h2
-rw-r--r--cores/arduino/Print.h2
-rw-r--r--cores/arduino/Stream.h2
-rw-r--r--cores/arduino/USBAPI.h2
-rw-r--r--cores/arduino/WString.h4
-rw-r--r--cores/arduino/new.cpp2
-rw-r--r--cores/arduino/wiring.c26
-rw-r--r--cores/arduino/wiring_digital.c2
-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
-rw-r--r--programmers.txt2
39 files changed, 373 insertions, 78 deletions
diff --git a/.codespellrc b/.codespellrc
new file mode 100644
index 0000000..6aace1d
--- /dev/null
+++ b/.codespellrc
@@ -0,0 +1,7 @@
+# See: https://github.com/codespell-project/codespell#using-a-config-file
+[codespell]
+# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
+ignore-words-list = hart,pullrequest
+check-filenames =
+check-hidden =
+skip = ./.git,./firmwares/arduinoISP,./firmwares/wifishield,./bootloaders
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..03600dd
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,10 @@
+# See: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#about-the-dependabotyml-file
+version: 2
+
+updates:
+ # Configure check for outdated GitHub Actions actions in workflows.
+ # See: https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot
+ - package-ecosystem: github-actions
+ directory: / # Check the repository's workflows under /.github/workflows/
+ schedule:
+ interval: daily
diff --git a/.github/workflows/check-arduino.yml b/.github/workflows/check-arduino.yml
new file mode 100644
index 0000000..cfffb75
--- /dev/null
+++ b/.github/workflows/check-arduino.yml
@@ -0,0 +1,27 @@
+name: Check Arduino
+
+# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
+on:
+ push:
+ pull_request:
+ schedule:
+ # Run every Tuesday at 8 AM UTC to catch breakage caused by new rules added to Arduino Lint.
+ - cron: "0 8 * * TUE"
+ workflow_dispatch:
+ repository_dispatch:
+
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Arduino Lint
+ uses: arduino/arduino-lint-action@v1
+ with:
+ compliance: specification
+ # Always use this setting for official repositories. Remove for 3rd party projects.
+ official: true
+ project-type: platform
diff --git a/.github/workflows/compile-platform-examples.yml b/.github/workflows/compile-platform-examples.yml
new file mode 100644
index 0000000..8e8f5b5
--- /dev/null
+++ b/.github/workflows/compile-platform-examples.yml
@@ -0,0 +1,206 @@
+name: Compile Examples
+
+# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
+on:
+ push:
+ paths:
+ - ".github/workflows/compile-platform-examples.ya?ml"
+ - "cores/**"
+ - "libraries/**"
+ - "variants/**"
+ - "boards.txt"
+ - "platform.txt"
+ pull_request:
+ paths:
+ - ".github/workflows/compile-platform-examples.ya?ml"
+ - "cores/**"
+ - "libraries/**"
+ - "variants/**"
+ - "boards.txt"
+ - "platform.txt"
+ workflow_dispatch:
+ repository_dispatch:
+
+jobs:
+ build:
+ name: ${{ matrix.board.fqbn }}
+ runs-on: ubuntu-latest
+
+ env:
+ SKETCHES_REPORTS_PATH: sketches-reports
+
+ strategy:
+ fail-fast: false
+
+ matrix:
+ board:
+ - fqbn: arduino:avr:yun
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:uno
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:diecimila:cpu=atmega328
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:diecimila:cpu=atmega168
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:nano:cpu=atmega328
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:nano:cpu=atmega328old
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:nano:cpu=atmega168
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:mega:cpu=atmega2560
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:mega:cpu=atmega1280
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:megaADK
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:leonardo
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:leonardoeth
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:micro
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:esplora
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:mini:cpu=atmega328
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:mini:cpu=atmega168
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:ethernet
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:fio
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:bt:cpu=atmega328
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:bt:cpu=atmega168
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:LilyPadUSB
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:lilypad:cpu=atmega328
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:lilypad:cpu=atmega168
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:pro:cpu=16MHzatmega328
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:pro:cpu=8MHzatmega328
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:pro:cpu=16MHzatmega168
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:pro:cpu=8MHzatmega168
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:atmegang:cpu=atmega168
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:atmegang:cpu=atmega8
+ serial: true
+ softwareserial: false
+ - fqbn: arduino:avr:robotControl
+ serial: true
+ softwareserial: false
+ - fqbn: arduino:avr:robotMotor
+ serial: true
+ softwareserial: false
+ - fqbn: arduino:avr:gemma
+ serial: false
+ softwareserial: false
+ - fqbn: arduino:avr:circuitplay32u4cat
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:yunmini
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:chiwawa
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:one
+ serial: true
+ softwareserial: true
+ - fqbn: arduino:avr:unowifi
+ serial: true
+ softwareserial: true
+
+ # Make board type-specific customizations to the matrix jobs
+ include:
+ - board:
+ # Boards with Serial interface
+ serial: true
+ # Compile these sketches in addition to the ones compiled for all boards
+ serial-sketch-paths: |
+ - libraries/EEPROM/examples/eeprom_crc
+ - libraries/EEPROM/examples/eeprom_get
+ - libraries/EEPROM/examples/eeprom_put
+ - libraries/EEPROM/examples/eeprom_read
+ - libraries/SPI
+ - libraries/Wire
+ - board:
+ serial: false
+ serial-sketch-paths: ""
+ - board:
+ # Boards compatible with the SoftwareSerial library
+ softwareserial: true
+ softwareserial-sketch-paths: |
+ - libraries/SoftwareSerial
+ - board:
+ softwareserial: false
+ softwareserial-sketch-paths: ""
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Compile examples
+ uses: arduino/compile-sketches@v1
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ fqbn: ${{ matrix.board.fqbn }}
+ platforms: |
+ # Use Boards Manager to install the latest release of the platform to get the toolchain.
+ - name: arduino:avr
+ # Overwrite the Boards Manager installation with the platform from the repository.
+ - source-path: ./
+ name: arduino:avr
+ sketch-paths: |
+ # Compile these sketches for all boards
+ - libraries/EEPROM/examples/eeprom_clear
+ - libraries/EEPROM/examples/eeprom_iteration
+ - libraries/EEPROM/examples/eeprom_update
+ - libraries/EEPROM/examples/eeprom_write
+ # Board-specific sketches
+ ${{ matrix.serial-sketch-paths }}
+ ${{ matrix.softwareserial-sketch-paths }}
+ enable-deltas-report: true
+ sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
+
+ - name: Save sketches report as workflow artifact
+ uses: actions/upload-artifact@v2
+ with:
+ if-no-files-found: error
+ path: ${{ env.SKETCHES_REPORTS_PATH }}
+ name: ${{ env.SKETCHES_REPORTS_PATH }}
diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml
new file mode 100644
index 0000000..652be5d
--- /dev/null
+++ b/.github/workflows/report-size-deltas.yml
@@ -0,0 +1,24 @@
+name: Report Size Deltas
+
+# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
+on:
+ push:
+ paths:
+ - ".github/workflows/report-size-deltas.yml"
+ schedule:
+ # Run at the minimum interval allowed by GitHub Actions.
+ # Note: GitHub Actions periodically has outages which result in workflow failures.
+ # In this event, the workflows will start passing again once the service recovers.
+ - cron: "*/5 * * * *"
+ workflow_dispatch:
+ repository_dispatch:
+
+jobs:
+ report:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Comment size deltas reports to PRs
+ uses: arduino/report-size-deltas@v1
+ with:
+ # The name of the workflow artifact created by the sketch compilation workflow
+ sketches-reports-source: sketches-reports
diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml
new file mode 100644
index 0000000..01bee87
--- /dev/null
+++ b/.github/workflows/spell-check.yml
@@ -0,0 +1,22 @@
+name: Spell Check
+
+# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
+on:
+ push:
+ pull_request:
+ schedule:
+ # Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates.
+ - cron: "0 8 * * TUE"
+ workflow_dispatch:
+ repository_dispatch:
+
+jobs:
+ spellcheck:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Spell check
+ uses: codespell-project/actions-codespell@master
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..42a1f04
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+# Arduino AVR Boards
+
+[![Check Arduino status](https://github.com/arduino/ArduinoCore-avr/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino/ArduinoCore-avr/actions/workflows/check-arduino.yml)
+[![Compile Examples status](https://github.com/arduino/ArduinoCore-avr/actions/workflows/compile-platform-examples.yml/badge.svg)](https://github.com/arduino/ArduinoCore-avr/actions/workflows/compile-platform-examples.yml)
+[![Spell Check status](https://github.com/arduino/ArduinoCore-avr/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino/ArduinoCore-avr/actions/workflows/spell-check.yml)
+
+This repository contains the source code and configuration files of the Arduino AVR Boards
+[platform](https://arduino.github.io/arduino-cli/latest/platform-specification/).
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 <inttypes.h>
#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));
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;
diff --git a/programmers.txt b/programmers.txt
index 69ddf69..33ace57 100644
--- a/programmers.txt
+++ b/programmers.txt
@@ -81,7 +81,7 @@ buspirate.program.extra_params=-P{serial.port}
# STK500 firmware version v1 and v2 use different serial protocols.
# Using the 'stk500' protocol tells avrdude to try and autodetect the
# firmware version. If this leads to problems, we might need to add
-# stk500v1 and stk500v2 entries to allow explicitely selecting the
+# stk500v1 and stk500v2 entries to allow explicitly selecting the
# firmware version.
stk500.name=Atmel STK500 development board
stk500.communication=serial