This lets other bits of the code know when USB has been connected.
Signed-off-by: Keith Packard <keithp@keithp.com>
static __xdata uint8_t *__xdata ao_usb_ep0_out_data;
static __xdata uint8_t ao_usb_in_flushed;
static __xdata uint8_t *__xdata ao_usb_ep0_out_data;
static __xdata uint8_t ao_usb_in_flushed;
-static __xdata uint8_t ao_usb_running;
+__xdata uint8_t ao_usb_running;
static __xdata uint8_t ao_usb_configuration;
static __xdata uint8_t ueienx_0;
static __xdata uint8_t ao_usb_configuration;
static __xdata uint8_t ueienx_0;
static __pdata uint16_t ao_usb_in_bytes_last;
static __xdata uint16_t ao_usb_out_bytes;
static __pdata uint8_t ao_usb_iif;
static __pdata uint16_t ao_usb_in_bytes_last;
static __xdata uint16_t ao_usb_out_bytes;
static __pdata uint8_t ao_usb_iif;
-static __pdata uint8_t ao_usb_running;
+__pdata uint8_t ao_usb_running;
static void
ao_usb_set_interrupts(void)
static void
ao_usb_set_interrupts(void)
+extern __pdata uint8_t ao_usb_running;
+
* but not pulled to the shadow buffer.
*/
static uint8_t ao_usb_out_avail;
* but not pulled to the shadow buffer.
*/
static uint8_t ao_usb_out_avail;
-static uint8_t ao_usb_running;
static uint8_t ao_usb_configuration;
#define AO_USB_EP0_GOT_RESET 1
static uint8_t ao_usb_configuration;
#define AO_USB_EP0_GOT_RESET 1
* but not pulled to the shadow buffer.
*/
static uint8_t ao_usb_out_avail;
* but not pulled to the shadow buffer.
*/
static uint8_t ao_usb_out_avail;
-static uint8_t ao_usb_running;
static uint8_t ao_usb_configuration;
#define AO_USB_EP0_GOT_RESET 1
static uint8_t ao_usb_configuration;
#define AO_USB_EP0_GOT_RESET 1
if (receive & AO_USB_EP0_GOT_TX_ACK) {
debug ("\tgot tx ack\n");
if (receive & AO_USB_EP0_GOT_TX_ACK) {
debug ("\tgot tx ack\n");
+#if HAS_FLIGHT && AO_USB_FORCE_IDLE
+ ao_flight_force_idle = 1;
+#endif
/* Wait until the IN packet is received from addr 0
* before assigning our local address
*/
/* Wait until the IN packet is received from addr 0
* before assigning our local address
*/