X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fkernel%2Fao_usb.h;h=6c74a04265e3ecf282093c33e981de4ad79f2fce;hb=188f9efadd480de872f86a8eb741e8738db84c6b;hp=cdea517875f2c4cad7497019cc34424029b8b01c;hpb=1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a;p=fw%2Faltos diff --git a/src/kernel/ao_usb.h b/src/kernel/ao_usb.h index cdea5178..6c74a042 100644 --- a/src/kernel/ao_usb.h +++ b/src/kernel/ao_usb.h @@ -41,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); @@ -53,7 +69,7 @@ ao_usb_disable(void); void ao_usb_init(void); -extern __code __at (0x00aa) uint8_t ao_usb_descriptors []; +extern const uint8_t ao_usb_descriptors []; #define AO_USB_SETUP_DIR_MASK (0x01 << 7) #define AO_USB_SETUP_TYPE_MASK (0x03 << 5) @@ -107,6 +123,7 @@ extern __code __at (0x00aa) uint8_t ao_usb_descriptors []; #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 @@ -125,6 +142,10 @@ extern __code __at (0x00aa) uint8_t ao_usb_descriptors []; #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 @@ -155,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_ */