altos: Remove 8051 address space specifiers
[fw/altos] / src / kernel / ao_usb.h
index 773b5cb7eca054b0d283f0b5ef67dbd4367d4e17..7992c806f21041ff10b9176778b30422a687484e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -40,7 +41,23 @@ ao_usb_pollchar(void);
 void
 ao_usb_flush(void);
 
+#if AO_USB_HAS_IN2
+void
+ao_usb_flush2(void);
+
+void
+ao_usb_putchar2(char c);
+#endif
+
+#if AO_USB_HAS_IN3
+void
+ao_usb_flush3(void);
+
+void
+ao_usb_putchar3(char c);
+#endif
 /* Enable the USB controller */
+
 void
 ao_usb_enable(void);
 
@@ -52,7 +69,7 @@ ao_usb_disable(void);
 void
 ao_usb_init(void);
 
-extern __code __at (0x00aa) uint8_t ao_usb_descriptors [];
+extern const __at (0x00aa) uint8_t ao_usb_descriptors [];
 
 #define AO_USB_SETUP_DIR_MASK  (0x01 << 7)
 #define AO_USB_SETUP_TYPE_MASK (0x03 << 5)
@@ -105,6 +122,8 @@ extern __code __at (0x00aa) uint8_t ao_usb_descriptors [];
 #ifndef AO_USB_OUT_EP
 #define AO_USB_OUT_EP          4
 #define AO_USB_IN_EP           5
+#define AO_USB_IN2_EP          6
+#define AO_USB_IN3_EP          7
 #endif
 
 #ifndef AO_USB_HAS_OUT
@@ -119,6 +138,14 @@ extern __code __at (0x00aa) uint8_t ao_usb_descriptors [];
 #define AO_USB_HAS_INT 1
 #endif
 
+#ifndef AO_USB_HAS_IN2
+#define AO_USB_HAS_IN2 0
+#endif
+
+#ifndef AO_USB_HAS_IN3
+#define AO_USB_HAS_IN3 0
+#endif
+
 /*
  * USB bulk packets can only come in 8, 16, 32 and 64
  * byte sizes, so we'll use 64 for everything
@@ -149,6 +176,8 @@ struct ao_usb_line_coding {
        uint8_t         data_bits;
 } ;
 
-extern __pdata uint8_t ao_usb_running;
+extern struct ao_usb_line_coding ao_usb_line_coding;
+
+extern uint8_t ao_usb_running;
 
 #endif /* _AO_USB_H_ */