Skip to content

Commit d8c5624

Browse files
sandeepmistryfacchinm
authored andcommitted
Use TWI_MasterRead instead of TWI_MasterWriteRead
1 parent c17189b commit d8c5624

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

libraries/Wire/src/Wire.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,7 @@ uint8_t TwoWire::requestFrom(uint8_t address, size_t quantity, bool sendStop) {
100100
quantity = BUFFER_LENGTH;
101101
}
102102

103-
uint8_t bytes_read = TWI_MasterWriteRead(address,
104-
(uint8_t *)0,
105-
0,
106-
quantity,
107-
sendStop);
103+
uint8_t bytes_read = TWI_MasterRead(address, quantity, sendStop);
108104

109105
/* Copy read buffer from lower layer */
110106
for(uint8_t i = 0; i < bytes_read; i++){

0 commit comments

Comments
 (0)