Skip to content

Commit 3efde69

Browse files
authored
Fix return value for Print::write(const void *buffer, uint32 size)
Print::write(const void *buffer, uint32 size) always returns 0, which is against specification. This patch fixes it.
1 parent 4021c32 commit 3efde69

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

STM32F1/cores/maple/Print.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ size_t Print::write(const void *buffer, uint32 size) {
6060
uint8 *ch = (uint8*)buffer;
6161
while (size--) {
6262
write(*ch++);
63+
n++;
6364
}
6465
return n;
6566
}

0 commit comments

Comments
 (0)