aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/wiring.c
diff options
context:
space:
mode:
authorper1234 <accounts@perglass.com>2021-05-26 04:35:59 -0700
committerper1234 <accounts@perglass.com>2021-05-26 04:39:38 -0700
commit8b327d7bede1c1245db99daeba4e168c92c11194 (patch)
treeb75e18bd089cff448953fe4304aabed878fce2d5 /cores/arduino/wiring.c
parent5ec42f90eed49e886eb96ad156b4332ab3d21493 (diff)
Correct typos in comments and documentation
Diffstat (limited to 'cores/arduino/wiring.c')
-rw-r--r--cores/arduino/wiring.c26
1 files changed, 13 insertions, 13 deletions
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