aboutsummaryrefslogtreecommitdiff
path: root/libraries/Wire/src/utility/twi.c
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 /libraries/Wire/src/utility/twi.c
parent1ac42f7ac0c365cfa4d901889ff6d4c23d3b4796 (diff)
parent20dc2e532e5cecd17a7f463cf86541d87e5090e8 (diff)
Merge pull request #413 from per1234/ci
Use GitHub Actions for continuous integration
Diffstat (limited to 'libraries/Wire/src/utility/twi.c')
-rw-r--r--libraries/Wire/src/utility/twi.c10
1 files changed, 5 insertions, 5 deletions
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;