Skip to content

Commit 1d984c2

Browse files
committed
Update examples & BSP.
Signed-off-by: HiFiPhile <[email protected]>
1 parent 5995244 commit 1d984c2

File tree

54 files changed

+139
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+139
-138
lines changed

examples/device/audio_4_channel_mic/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ extern "C" {
7171
* Tinyusb use follows macros to declare transferring memory so that they can be put
7272
* into those specific section.
7373
* e.g
74-
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
75-
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
74+
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
75+
* - CFG_TUSB_MEM_ALIGN : 4
7676
*/
7777
#ifndef CFG_TUSB_MEM_SECTION
7878
#define CFG_TUSB_MEM_SECTION
7979
#endif
8080

8181
#ifndef CFG_TUSB_MEM_ALIGN
82-
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
82+
#define CFG_TUSB_MEM_ALIGN 4
8383
#endif
8484

8585
//--------------------------------------------------------------------

examples/device/audio_4_channel_mic_freertos/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ extern "C" {
7777
* Tinyusb use follows macros to declare transferring memory so that they can be put
7878
* into those specific section.
7979
* e.g
80-
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
81-
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
80+
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
81+
* - CFG_TUSB_MEM_ALIGN : 4
8282
*/
8383
#ifndef CFG_TUSB_MEM_SECTION
8484
#define CFG_TUSB_MEM_SECTION
8585
#endif
8686

8787
#ifndef CFG_TUSB_MEM_ALIGN
88-
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
88+
#define CFG_TUSB_MEM_ALIGN 4
8989
#endif
9090

9191
//--------------------------------------------------------------------

examples/device/audio_test/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ extern "C" {
7474
* Tinyusb use follows macros to declare transferring memory so that they can be put
7575
* into those specific section.
7676
* e.g
77-
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
78-
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
77+
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
78+
* - CFG_TUSB_MEM_ALIGN : 4
7979
*/
8080
#ifndef CFG_TUSB_MEM_SECTION
8181
#define CFG_TUSB_MEM_SECTION
8282
#endif
8383

8484
#ifndef CFG_TUSB_MEM_ALIGN
85-
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
85+
#define CFG_TUSB_MEM_ALIGN 4
8686
#endif
8787

8888
//--------------------------------------------------------------------

examples/device/audio_test_freertos/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ extern "C" {
8080
* Tinyusb use follows macros to declare transferring memory so that they can be put
8181
* into those specific section.
8282
* e.g
83-
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
84-
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
83+
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
84+
* - CFG_TUSB_MEM_ALIGN : 4
8585
*/
8686
#ifndef CFG_TUSB_MEM_SECTION
8787
#define CFG_TUSB_MEM_SECTION
8888
#endif
8989

9090
#ifndef CFG_TUSB_MEM_ALIGN
91-
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
91+
#define CFG_TUSB_MEM_ALIGN 4
9292
#endif
9393

9494
//--------------------------------------------------------------------

examples/device/audio_test_multi_rate/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ extern "C" {
7676
* Tinyusb use follows macros to declare transferring memory so that they can be put
7777
* into those specific section.
7878
* e.g
79-
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
80-
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
79+
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
80+
* - CFG_TUSB_MEM_ALIGN : 4
8181
*/
8282
#ifndef CFG_TUSB_MEM_SECTION
8383
#define CFG_TUSB_MEM_SECTION
8484
#endif
8585

8686
#ifndef CFG_TUSB_MEM_ALIGN
87-
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
87+
#define CFG_TUSB_MEM_ALIGN 4
8888
#endif
8989

9090
//--------------------------------------------------------------------

examples/device/board_test/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@
5959
* Tinyusb use follows macros to declare transferring memory so that they can be put
6060
* into those specific section.
6161
* e.g
62-
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
63-
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
62+
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
63+
* - CFG_TUSB_MEM_ALIGN : 4
6464
*/
6565
#ifndef CFG_TUSB_MEM_SECTION
6666
#define CFG_TUSB_MEM_SECTION
6767
#endif
6868

6969
#ifndef CFG_TUSB_MEM_ALIGN
70-
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
70+
#define CFG_TUSB_MEM_ALIGN 4
7171
#endif
7272

7373
#ifdef __cplusplus

examples/device/cdc_dual_ports/src/tusb_config.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,18 @@
7171
* Tinyusb use follows macros to declare transferring memory so that they can be put
7272
* into those specific section.
7373
* e.g
74-
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
75-
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
74+
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
75+
* - CFG_TUSB_MEM_ALIGN : 4
7676
*/
7777
#ifndef CFG_TUSB_MEM_SECTION
7878
#define CFG_TUSB_MEM_SECTION
7979
#endif
8080

8181
#ifndef CFG_TUSB_MEM_ALIGN
82-
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
82+
#define CFG_TUSB_MEM_ALIGN 4
8383
#endif
8484

85+
#define CFG_TUD_DWC2_DMA_ENABLE 1
8586
//--------------------------------------------------------------------
8687
// DEVICE CONFIGURATION
8788
//--------------------------------------------------------------------

examples/device/cdc_msc/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@
7171
* Tinyusb use follows macros to declare transferring memory so that they can be put
7272
* into those specific section.
7373
* e.g
74-
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
75-
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
74+
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
75+
* - CFG_TUSB_MEM_ALIGN : 4
7676
*/
7777
#ifndef CFG_TUSB_MEM_SECTION
7878
#define CFG_TUSB_MEM_SECTION
7979
#endif
8080

8181
#ifndef CFG_TUSB_MEM_ALIGN
82-
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
82+
#define CFG_TUSB_MEM_ALIGN 4
8383
#endif
8484

8585
//--------------------------------------------------------------------

examples/device/cdc_msc_freertos/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@
7878
* Tinyusb use follows macros to declare transferring memory so that they can be put
7979
* into those specific section.
8080
* e.g
81-
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
82-
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
81+
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
82+
* - CFG_TUSB_MEM_ALIGN : 4
8383
*/
8484
#ifndef CFG_TUSB_MEM_SECTION
8585
#define CFG_TUSB_MEM_SECTION
8686
#endif
8787

8888
#ifndef CFG_TUSB_MEM_ALIGN
89-
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
89+
#define CFG_TUSB_MEM_ALIGN 4
9090
#endif
9191

9292
//--------------------------------------------------------------------

examples/device/cdc_uac2/src/tusb_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ extern "C" {
7474
* Tinyusb use follows macros to declare transferring memory so that they can be put
7575
* into those specific section.
7676
* e.g
77-
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
78-
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
77+
* - CFG_TUSB_MEM_SECTION : TU_ATTR_SECTION(".usb_ram")
78+
* - CFG_TUSB_MEM_ALIGN : 4
7979
*/
8080
#ifndef CFG_TUSB_MEM_SECTION
8181
#define CFG_TUSB_MEM_SECTION
8282
#endif
8383

8484
#ifndef CFG_TUSB_MEM_ALIGN
85-
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
85+
#define CFG_TUSB_MEM_ALIGN 4
8686
#endif
8787

8888
//--------------------------------------------------------------------

0 commit comments

Comments
 (0)