Bladeren bron

update(cherryusb_config_template): update align size

Signed-off-by: sakumisu <1203593632@qq.com>
sakumisu 7 maanden geleden
bovenliggende
commit
6973ec73d9
1 gewijzigde bestanden met toevoegingen van 5 en 8 verwijderingen
  1. 5 8
      cherryusb_config_template.h

+ 5 - 8
cherryusb_config_template.h

@@ -23,13 +23,15 @@
 /* Enable print with color */
 /* Enable print with color */
 #define CONFIG_USB_PRINTF_COLOR_ENABLE
 #define CONFIG_USB_PRINTF_COLOR_ENABLE
 
 
+// #define CONFIG_USB_DCACHE_ENABLE
+
 /* data align size when use dma or use dcache */
 /* data align size when use dma or use dcache */
-#ifndef CONFIG_USB_ALIGN_SIZE
+#ifdef CONFIG_USB_DCACHE_ENABLE
+#define CONFIG_USB_ALIGN_SIZE 32 // 32 or 64
+#else
 #define CONFIG_USB_ALIGN_SIZE 4
 #define CONFIG_USB_ALIGN_SIZE 4
 #endif
 #endif
 
 
-// #define CONFIG_USB_DCACHE_ENABLE
-
 /* attribute data into no cache ram */
 /* attribute data into no cache ram */
 #define USB_NOCACHE_RAM_SECTION __attribute__((section(".noncacheable")))
 #define USB_NOCACHE_RAM_SECTION __attribute__((section(".noncacheable")))
 
 
@@ -332,11 +334,6 @@
 /* ---------------- MUSB Configuration ---------------- */
 /* ---------------- MUSB Configuration ---------------- */
 // #define CONFIG_USB_MUSB_SUNXI
 // #define CONFIG_USB_MUSB_SUNXI
 
 
-/* ================ USB Dcache Configuration ==================*/
-// #define CONFIG_USB_DCACHE_ENABLE
-// #undef CONFIG_USB_ALIGN_SIZE
-// #define CONFIG_USB_ALIGN_SIZE 32
-
 #ifndef usb_phyaddr2ramaddr
 #ifndef usb_phyaddr2ramaddr
 #define usb_phyaddr2ramaddr(addr) (addr)
 #define usb_phyaddr2ramaddr(addr) (addr)
 #endif
 #endif