summaryrefslogtreecommitdiff
path: root/firmware/usbstack
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/usbstack')
-rw-r--r--firmware/usbstack/usb_serial.c10
-rw-r--r--firmware/usbstack/usb_storage.c1
2 files changed, 11 insertions, 0 deletions
diff --git a/firmware/usbstack/usb_serial.c b/firmware/usbstack/usb_serial.c
index 4a80433..7c425dc 100644
--- a/firmware/usbstack/usb_serial.c
+++ b/firmware/usbstack/usb_serial.c
@@ -60,6 +60,11 @@ static unsigned char send_buffer[BUFFER_SIZE]
USB_DEVBSS_ATTR __attribute__((aligned(32)));
static unsigned char receive_buffer[32]
USB_DEVBSS_ATTR __attribute__((aligned(32)));
+#if CONFIG_USBOTG == USBOTG_DESIGNWARE
+/* Aligned transit buffer */
+static unsigned char transit_buffer[32]
+ USB_DEVBSS_ATTR __attribute__((aligned(4)));
+#endif
static void sendout(void);
@@ -163,8 +168,13 @@ static void sendout(void)
if(buffer_transitlength > 0)
{
buffer_length -= buffer_transitlength;
+#if CONFIG_USBOTG == USBOTG_DESIGNWARE
+ memcpy(transit_buffer,&send_buffer[buffer_start],buffer_transitlength);
+ usb_drv_send_nonblocking(ep_in,transit_buffer,buffer_transitlength);
+#else
usb_drv_send_nonblocking(ep_in, &send_buffer[buffer_start],
buffer_transitlength);
+#endif
}
}
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
index 59ec191..efc243f 100644
--- a/firmware/usbstack/usb_storage.c
+++ b/firmware/usbstack/usb_storage.c
@@ -438,6 +438,7 @@ void usb_storage_init_connection(void)
state = WAITING_FOR_COMMAND;
#if (CONFIG_CPU == IMX31L || defined(CPU_TCC77X) || defined(CPU_TCC780X) || \
+ CONFIG_CPU == S5L8702 || CONFIG_CPU == S5L8701 || \
defined(BOOTLOADER) || CONFIG_CPU == DM320) && !defined(CPU_PP502x)
static unsigned char _cbw_buffer[MAX_CBW_SIZE]
USB_DEVBSS_ATTR __attribute__((aligned(32)));