diff options
-rw-r--r-- | firmware/export/usb_core.h | 2 | ||||
-rw-r--r-- | firmware/usbstack/usb_serial.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/firmware/export/usb_core.h b/firmware/export/usb_core.h index bf6f2becb2..fc1c742286 100644 --- a/firmware/export/usb_core.h +++ b/firmware/export/usb_core.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #define NUM_ENDPOINTS 8 | 37 | #define NUM_ENDPOINTS 8 |
38 | #define USBDEVBSS_ATTR DEVBSS_ATTR | 38 | #define USBDEVBSS_ATTR DEVBSS_ATTR |
39 | #else | 39 | #else |
40 | #define USBDEVBSS_ATTR NOCACHEBSS_ATTR | 40 | #define USBDEVBSS_ATTR IBSS_ATTR |
41 | #define NUM_ENDPOINTS 3 | 41 | #define NUM_ENDPOINTS 3 |
42 | #endif | 42 | #endif |
43 | 43 | ||
diff --git a/firmware/usbstack/usb_serial.c b/firmware/usbstack/usb_serial.c index f39035462f..08eb1213ea 100644 --- a/firmware/usbstack/usb_serial.c +++ b/firmware/usbstack/usb_serial.c | |||
@@ -53,10 +53,16 @@ struct usb_endpoint_descriptor __attribute__((aligned(2))) endpoint_descriptor = | |||
53 | }; | 53 | }; |
54 | 54 | ||
55 | #define BUFFER_SIZE 512 /* Max 16k because of controller limitations */ | 55 | #define BUFFER_SIZE 512 /* Max 16k because of controller limitations */ |
56 | #if CONFIG_CPU == IMX31L | ||
56 | static unsigned char send_buffer[BUFFER_SIZE] | 57 | static unsigned char send_buffer[BUFFER_SIZE] |
57 | USBDEVBSS_ATTR __attribute__((aligned(32))); | 58 | USBDEVBSS_ATTR __attribute__((aligned(32))); |
58 | static unsigned char receive_buffer[512] | 59 | static unsigned char receive_buffer[32] |
59 | USBDEVBSS_ATTR __attribute__((aligned(32))); | 60 | USBDEVBSS_ATTR __attribute__((aligned(32))); |
61 | #else | ||
62 | static unsigned char send_buffer[BUFFER_SIZE] __attribute__((aligned(32))); | ||
63 | static unsigned char receive_buffer[32] __attribute__((aligned(32))); | ||
64 | #endif | ||
65 | |||
60 | static bool busy_sending = false; | 66 | static bool busy_sending = false; |
61 | static int buffer_start; | 67 | static int buffer_start; |
62 | static int buffer_length; | 68 | static int buffer_length; |