@@ -131,13 +131,13 @@ void TwoWire::setClock(uint32_t frequency) {
131
131
TWI_SetClock (twi, twiClock, VARIANT_MCK);
132
132
}
133
133
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) {
135
135
if (quantity > BUFFER_LENGTH)
136
136
quantity = BUFFER_LENGTH;
137
137
138
138
// perform blocking read into buffer
139
139
int readed = 0 ;
140
- TWI_StartRead (twi, address, 0 , 0 );
140
+ TWI_StartRead (twi, address, iaddress, isize );
141
141
do {
142
142
// Stop condition must be set during the reception of last byte
143
143
if (readed + 1 == quantity)
@@ -157,6 +157,10 @@ uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity, uint8_t sendStop
157
157
return readed;
158
158
}
159
159
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
+
160
164
uint8_t TwoWire::requestFrom (uint8_t address, uint8_t quantity) {
161
165
return requestFrom ((uint8_t ) address, (uint8_t ) quantity, (uint8_t ) true );
162
166
}
0 commit comments