Skip to content

Commit 8b01965

Browse files
committed
Merge pull request #2848 from facchinm/testBridgePut
Bridge: fix transfers which ignored host response
2 parents c79c118 + d6f9a67 commit 8b01965

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Diff for: libraries/Bridge/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Bridge
2-
version=1.0.0
2+
version=1.0.1
33
author=Arduino
44
maintainer=Arduino <[email protected]>
55
sentence=Enables the communication between the Linux processor and the AVR. For Arduino Yún and TRE only.

Diff for: libraries/Bridge/src/Bridge.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,11 @@ void BridgeClass::begin() {
8787
void BridgeClass::put(const char *key, const char *value) {
8888
// TODO: do it in a more efficient way
8989
String cmd = "D";
90+
uint8_t res[1];
9091
cmd += key;
9192
cmd += "\xFE";
9293
cmd += value;
93-
transfer((uint8_t*)cmd.c_str(), cmd.length());
94+
transfer((uint8_t*)cmd.c_str(), cmd.length(), res, 1);
9495
}
9596

9697
unsigned int BridgeClass::get(const char *key, uint8_t *value, unsigned int maxlen) {

Diff for: libraries/Bridge/src/FileIO.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ void File::close() {
175175
if (mode == 255)
176176
return;
177177
uint8_t cmd[] = {'f', handle};
178-
bridge.transfer(cmd, 2);
178+
uint8_t ret[1];
179+
bridge.transfer(cmd, 2, ret, 1);
179180
mode = 255;
180181
}
181182

0 commit comments

Comments
 (0)