]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/lx-rocon.git/commitdiff
RoCoN: Ensure USB buffers alignment.
authorPavel Pisa <ppisa@pikron.com>
Mon, 9 Jun 2014 22:04:57 +0000 (00:04 +0200)
committerPavel Pisa <ppisa@pikron.com>
Mon, 9 Jun 2014 22:04:57 +0000 (00:04 +0200)
It is not required on Cortex-M3/4 but can speedup
operations.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
sw/app/rocon/appl_usb.c

index 8d17f1d3d55709449d72ca3a9732e83ea55adace..f3aff84796d2b70343be0be48f0bb18545504934 100644 (file)
@@ -66,9 +66,9 @@ usb_ep_t eps[NUM_ENDPOINTS];
 #define MASK_EP1RX 0x01
 #define MASK_EP1TX 0x02
 
-unsigned char ep1_rx_buff[USB_MAX_PACKET];
-unsigned char ep1_tx_buff[USB_MAX_PACKET];
-unsigned char ep0_buffer[USB_MAX_PACKET0];
+unsigned char ep1_rx_buff[USB_MAX_PACKET] __attribute__ ((aligned (8)));
+unsigned char ep1_tx_buff[USB_MAX_PACKET] __attribute__ ((aligned (8)));
+unsigned char ep0_buffer[USB_MAX_PACKET0] __attribute__ ((aligned (8)));
 int usb_active = 0;
 int ep1_rx_index = 0, ep1_rx_ready = 1;
 int ep1_tx_index = 0, ep1_tx_chars = 0;