summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-01-26 22:38:50 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-01-26 22:38:50 +0100
commit0290ca63a235b98642d54bdd3fc2ec5121b5dd69 (patch)
treedef579c0970e3d0522ced0efacab7c9466878648 /include
parent6be3d8699095f53f037e051ba889b1187609d19f (diff)
arduino-nano stdin: incerement ring buffer pointer in a less obscure fashion
Diffstat (limited to 'include')
-rw-r--r--include/arch/arduino-nano/driver/stdin.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/arch/arduino-nano/driver/stdin.h b/include/arch/arduino-nano/driver/stdin.h
index 1085111..1f83c11 100644
--- a/include/arch/arduino-nano/driver/stdin.h
+++ b/include/arch/arduino-nano/driver/stdin.h
@@ -19,8 +19,8 @@ class StandardInput {
char getKey();
inline void addKey(char key) {
- buffer[write_pos++] = key;
- write_pos %= 8;
+ buffer[write_pos] = key;
+ write_pos = (write_pos + 1) % 8;
}
};