Age | Commit message (Collapse) | Author |
|
|
|
move timout handling into its own function
change timeout from milliseconds to microseconds
don't forget operating slave address or the bitrate when we reset because of a timeout
Co-Authored-By: Witold Markowski <witold.a.markowski@gmail.com>
fix delay datatype uint16_t --> uint32_t
Update libraries/Wire/src/utility/twi.c
fix mix up using TWBR instea of TWAR!
Co-Authored-By: Matthijs Kooijman <matthijs@stdin.nl>
Update libraries/Wire/src/utility/twi.c
fix 2nd TWBR/TWAR mixup
Co-Authored-By: Matthijs Kooijman <matthijs@stdin.nl>
twi_stop() should use the same timeout as everywhere else
all while loops are now protected by timeouts
Revert "twi_stop() should use the same timeout as everywhere else"
This reverts commit 68fe5f1dae1bb41183bb37eeda3fb453394a580c.
make timeout counter volatile
rename timeout function for improved clarity
- resetting the twi interface on timeouts is now optional
- timeouts in the ISR are no longer hardcoded and now obey the set timeout value
- a user-readable flag is now set whenever a timeout occurs
- the user can clear this flag whenever they like
|
|
|
|
Cast pins to signed integers to avoid Wtype-limits compile warning
|
|
Added __attribute__ ((fallthrough));
|
|
|
|
Removed #undefs in SoftwareSerial.h that were marked as Arduino 0012 workaround and that broke several macros, including abs.
See https://github.com/arduino/ArduinoCore-avr/issues/30
|
|
|
|
Fixing SPI communication with a delay as pointe out in #6395
|
|
In a MultiMaster I2C environment, The Default value of 0xFE in the TWAR cause the Arduino to respond as an I2C Slave device at address 0x7f. If the Wire.h library was not configured as a I2C Slave, `Wire.begin(slaveID);` the Callbacks for `twi_onSlaveTransmit()` and `twi_onSlaveReceive()` are never initialized.
But, they are called during servicing the TWI ISR. This causes a reboot of the Arduino by jumping to an uninitialized function address (0).
So, this fix initializes them to the Default Wire.h handler which will respond correctly even during Master Mode operations.
A MASTER MODE only Arduino will respond to all Slave Calls that match TWAR, Unless the TWEA bit is disabled outside of Master Transactions.
Chuck.
It also initialized the TWAR to the General Call ID (0x0) and Disables General Call responses.
Chuck.
|
|
|
|
Also includes Micros per https://www.arduino.cc/en/Reference/SoftwareSerial
|
|
To allow sketches to override value as per #58.
|
|
Fixes that more complex methods (like Stream::print(float)) do not work properly.
Without this fix, Wire.print(1.01f); results in '1' because Print::printFloat(double, uint8_t) performs multiple print() and therefore twi_transmit calls. Also Wire.println("Heyho"); results only in a newline character.
|
|
|
|
Corrected comments of rx and tx in a SoftwareSerial example.
|
|
|
|
|
|
|
|
Move TWBR register from Wire.cpp to twi.c file.
|
|
|
|
Update library.properties
|
|
Update library.properties
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Removed implicit conversions from unsigned, to signed, back to unsigned.
|
|
|
|
|
|
These functions have been replaced by read() and write() since Arduino
1.0.
|
|
|
|
Fix #4029
|
|
It’s not implemented anywhere and unused.
|
|
|
|
|
|
|
|
If the first sending was not successful it is better to abort. Then we get a return value of -1 (instead of -2 if the 2nd call will also fail) and we do not need to block even longer, with another timeout.
|
|
|
|
as suggested by @earlyprogrammer in #2173, to ensure TWDR value is set
if there is a write collision
|
|
this resolves timing issues seen in #1477
|
|
|
|
|
|
|
|
|
|
|