Commit 147d04f
committed
Wire: reset ring buffer during requestFrom() call
Implemented flush() function to clear the rx buffer. The buffer needs to be flushed so the next read() call returns the proper data.
Signed-off-by: Jakub Zimnol <zimnol.jakub@gmail.com>1 parent 9d9665b commit 147d04f
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
104 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| |||
0 commit comments