@@ -191,7 +191,7 @@ TwoWire::TwoWire(int scl, int sda, WireAddressMode_t am /*= ADDRESS_MODE_7_BITS*
191191 is_master(true ),
192192 is_sci(false ),
193193 address_mode(am),
194- timeout (1000 ),
194+ timeout_us (1000 ),
195195 transmission_begun(false ),
196196 data_too_long(false ),
197197 rx_index(0 ),
@@ -642,7 +642,7 @@ void TwoWire::beginTransmission(int address) {
642642/* -------------------------------------------------------------------------- */
643643uint8_t TwoWire::endTransmission (bool sendStop) {
644644/* -------------------------------------------------------------------------- */
645- uint8_t ret = write_to (master_tx_address, tx_buffer, tx_index, timeout , sendStop);
645+ uint8_t ret = write_to (master_tx_address, tx_buffer, tx_index, timeout_us , sendStop);
646646 transmission_begun = false ;
647647 return ret;
648648}
@@ -687,7 +687,7 @@ size_t TwoWire::requestFrom(uint8_t address, size_t quantity, uint32_t iaddress,
687687 quantity = I2C_BUFFER_LENGTH;
688688 }
689689 // perform blocking read into buffer
690- uint8_t read = read_from (address, rx_buffer, quantity, timeout , sendStop);
690+ uint8_t read = read_from (address, rx_buffer, quantity, timeout_us , sendStop);
691691 // set rx buffer iterator vars
692692 rx_index = read;
693693 rx_extract_index = 0 ;
@@ -836,10 +836,10 @@ void TwoWire::flush(void) {
836836}
837837
838838/* -------------------------------------------------------------------------- */
839- void TwoWire::setWireTimeout (unsigned int t , bool reset_on_timeout) {
839+ void TwoWire::setWireTimeout (unsigned int _timeout_us , bool reset_on_timeout) {
840840/* -------------------------------------------------------------------------- */
841841 (void )reset_on_timeout;
842- timeout = t ;
842+ timeout_us = _timeout_us ;
843843}
844844
845845
0 commit comments