Merge branch 'master' into micropeak-logging
[fw/altos] / src / avr / ao_usb_avr.c
index 23a27c73beda83e983414b334a4014196c1d82c6..2ef546c98dc2d4d1f462bb2c042c9c9885a8df85 100644 (file)
@@ -480,10 +480,10 @@ ao_usb_putchar(char c) __critical __reentrant
        ao_usb_in_flushed = 0;
 }
 
-static char
+static int
 _ao_usb_pollchar(void)
 {
-       char c;
+       uint8_t c;
        uint8_t intx;
 
        if (!ao_usb_running)
@@ -517,10 +517,10 @@ _ao_usb_pollchar(void)
        return c;
 }
 
-char
+int
 ao_usb_pollchar(void)
 {
-       char    c;
+       int     c;
        cli();
        c = _ao_usb_pollchar();
        sei();
@@ -530,7 +530,7 @@ ao_usb_pollchar(void)
 char
 ao_usb_getchar(void) __critical
 {
-       char    c;
+       int     c;
 
        cli();
        while ((c = _ao_usb_pollchar()) == AO_READ_AGAIN)
@@ -658,18 +658,6 @@ ao_usb_echo(void)
 }
 #endif
 
-static void
-ao_usb_irq(void)
-{
-       printf ("control: %d out: %d in: %d\n",
-               control_count, out_count, in_count);
-}
-
-__code struct ao_cmds ao_usb_cmds[] = {
-       { ao_usb_irq, "i\0Show USB interrupt counts" },
-       { 0, NULL }
-};
-
 void
 ao_usb_init(void)
 {
@@ -680,6 +668,5 @@ ao_usb_init(void)
 #if USB_DEBUG
        ao_add_task(&ao_usb_echo_task, ao_usb_echo, "usb echo");
 #endif
-       ao_cmd_register(&ao_usb_cmds[0]);
        ao_add_stdio(ao_usb_pollchar, ao_usb_putchar, ao_usb_flush);
 }