altos: Expose ao_usb_running globally
[fw/altos] / src / core / ao_usb.h
index e051db9323d5639e91e1931ba5607c6b238ab806..1ce4f82f2a1066d24f6276c0149501a47e569a3a 100644 (file)
@@ -33,7 +33,7 @@ ao_usb_getchar(void);
 /* Poll for a charcter on the USB input queue.
  * returns AO_READ_AGAIN if none are available
  */
-char
+int
 ao_usb_pollchar(void);
 
 /* Flush the USB output queue */
@@ -102,8 +102,11 @@ extern __code __at (0x00aa) uint8_t ao_usb_descriptors [];
 #define AO_USB_INT_EP          1
 #define AO_USB_INT_SIZE                8
 
+#ifndef AO_USB_OUT_EP
 #define AO_USB_OUT_EP          4
 #define AO_USB_IN_EP           5
+#endif
+
 /*
  * USB bulk packets can only come in 8, 16, 32 and 64
  * byte sizes, so we'll use 64 for everything
@@ -114,6 +117,7 @@ extern __code __at (0x00aa) uint8_t ao_usb_descriptors [];
 #define AO_USB_EP0_IDLE                0
 #define AO_USB_EP0_DATA_IN     1
 #define AO_USB_EP0_DATA_OUT    2
+#define AO_USB_EP0_STALL       3
 
 #define LE_WORD(x)    ((x)&0xFF),((uint8_t) (((uint16_t) (x))>>8))
 
@@ -133,4 +137,6 @@ struct ao_usb_line_coding {
        uint8_t         data_bits;
 } ;
 
+extern __pdata uint8_t ao_usb_running;
+
 #endif /* _AO_USB_H_ */