Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: callbacks.cpp
- Revision:
- 212:1e370ffcb73d
- Parent:
- 191:66861311bdcd
- Child:
- 214:c70a6e86417f
--- a/callbacks.cpp Sat Apr 28 21:33:05 2018 +0000
+++ b/callbacks.cpp Sun Apr 29 03:16:14 2018 +0000
@@ -11,14 +11,15 @@
void rxCallback() {
while (io.pc->readable()) {
char c = io.pc->getc();
- if (c != 127 && c != '\r' && c != '\t') {
+ if (c != 127 && c != 8 && c != '\r' && c != '\t') {
linebuf[index] = c;
index++;
io.pc->putc(c);
- } else if (c == 127) {
+ } else if (c == 127 || c == 8) {
if (index > 0) {
index--;
- io.pc->putc(c);
+ //BS (8) should delete previous char
+ io.pc->putc(127);
}
} else if (c == '\r') {
linebuf[index] = 0;