From 6ad3acd15e9859ac9bc77c1eb04d67108dcc5a03 Mon Sep 17 00:00:00 2001 From: AJM Date: Sat, 24 Apr 2010 22:23:50 -0400 Subject: finally got TX working without any delay, there is some weird timing involved in what happens when the line state is toggled (host port disconnected) and theres still data waiting to go out, this will hang any while(txCount != 0) calls. similarly, sending data without checking txCount != 0 will hard fault the chip. This is all handled now by usbSendBytes, which returns -1 for unconnected, and 0 for simply 'waiting to send' --- core/usb/usb_hardware.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/usb/usb_hardware.h') diff --git a/core/usb/usb_hardware.h b/core/usb/usb_hardware.h index d7e4ff0..8258da9 100644 --- a/core/usb/usb_hardware.h +++ b/core/usb/usb_hardware.h @@ -33,6 +33,8 @@ #define GPIOA ((u32)0x40010800) #define GPIOC ((u32)0x40011000) +#define USB_PACKET_BUFFER ((u32)0x40006000) + #define RCC_CR RCC #define RCC_CFGR RCC + 0x04 #define RCC_CIR RCC + 0x08 -- cgit v1.2.3