aboutsummaryrefslogtreecommitdiffstats
path: root/src/avr/usbserial.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/avr/usbserial.c')
-rw-r--r--src/avr/usbserial.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/avr/usbserial.c b/src/avr/usbserial.c
index ac60e087..6dbe4f0d 100644
--- a/src/avr/usbserial.c
+++ b/src/avr/usbserial.c
@@ -10,8 +10,7 @@
#include "command.h" // command_dispatch
#include "sched.h" // DECL_INIT
-static char receive_buf[MESSAGE_MAX];
-static uint8_t receive_pos;
+static uint8_t receive_buf[MESSAGE_MAX], receive_pos;
void
usbserial_init(void)
@@ -51,7 +50,7 @@ void
console_task(void)
{
console_check_input();
- uint8_t pop_count;
+ uint_fast8_t pop_count;
int8_t ret = command_find_block(receive_buf, receive_pos, &pop_count);
if (ret > 0)
command_dispatch(receive_buf, pop_count);
@@ -65,7 +64,7 @@ void
console_sendf(const struct command_encoder *ce, va_list args)
{
// Generate message
- static char buf[MESSAGE_MAX];
+ static uint8_t buf[MESSAGE_MAX];
uint8_t msglen = command_encodef(buf, ce, args);
command_add_frame(buf, msglen);