Skip to content

Commit c7e16b3

Browse files
authored
Merge pull request #20 from ARMmbed/f/serial-write-send-length
Send information about data size in serial write
2 parents 7e8399a + 30f29a9 commit c7e16b3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/serial/serial.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export class Serial {
4848
let arrayData = [];
4949
if (data || data !== "") {
5050
arrayData = data.split("").map((e: any) => e.charCodeAt());
51+
arrayData.unshift(arrayData.length);
5152
}
5253
return await this.dap.writeSerial(arrayData);
5354
}

0 commit comments

Comments
 (0)