From 0290ca63a235b98642d54bdd3fc2ec5121b5dd69 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 26 Jan 2022 22:38:50 +0100 Subject: arduino-nano stdin: incerement ring buffer pointer in a less obscure fashion --- include/arch/arduino-nano/driver/stdin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') 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; } }; -- cgit v1.2.3