@@ -131,13 +131,13 @@ void TwoWire::setClock(uint32_t frequency) {
131131 TWI_SetClock (twi, twiClock, VARIANT_MCK);
132132}
133133
134- uint8_t TwoWire::requestFrom (uint8_t address, uint8_t quantity, uint8_t sendStop) {
134+ uint8_t TwoWire::requestFrom (uint8_t address, uint8_t quantity, uint32_t iaddress, uint8_t isize, uint8_t sendStop) {
135135 if (quantity > BUFFER_LENGTH)
136136 quantity = BUFFER_LENGTH;
137137
138138 // perform blocking read into buffer
139139 int readed = 0 ;
140- TWI_StartRead (twi, address, 0 , 0 );
140+ TWI_StartRead (twi, address, iaddress, isize );
141141 do {
142142 // Stop condition must be set during the reception of last byte
143143 if (readed + 1 == quantity)
@@ -157,6 +157,10 @@ uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity, uint8_t sendStop
157157 return readed;
158158}
159159
160+ uint8_t TwoWire::requestFrom (uint8_t address, uint8_t quantity, uint8_t sendStop) {
161+ return requestFrom ((uint8_t ) address, (uint8_t ) quantity, (uint32_t ) 0 , (uint8_t ) 0 , (uint8_t ) sendStop);
162+ }
163+
160164uint8_t TwoWire::requestFrom (uint8_t address, uint8_t quantity) {
161165 return requestFrom ((uint8_t ) address, (uint8_t ) quantity, (uint8_t ) true );
162166}
0 commit comments