Skip to content

Commit

Permalink
fix: rt-thread 5.0 compile error (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
tfx2001 committed Apr 27, 2023
1 parent ffe6834 commit 8c285b5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rt-thread/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#ifndef _TUSB_CONFIG_H_
#define _TUSB_CONFIG_H_

#include <rtdef.h>
#include <rtconfig.h>

#ifdef __cplusplus
Expand Down Expand Up @@ -70,12 +71,20 @@ extern "C" {
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
*/
#ifndef CFG_TUSB_MEM_SECTION
#ifdef rt_section
#define CFG_TUSB_MEM_SECTION rt_section(PKG_TINYUSB_MEM_SECTION)
#else
#define CFG_TUSB_MEM_SECTION RT_SECTION(PKG_TINYUSB_MEM_SECTION)
#endif
#endif

#ifndef CFG_TUSB_MEM_ALIGN
#ifdef rt_align
#define CFG_TUSB_MEM_ALIGN rt_align(PKG_TINYUSB_MEM_ALIGN)
#else
#define CFG_TUSB_MEM_ALIGN ALIGN(PKG_TINYUSB_MEM_ALIGN)
#endif
#endif

//--------------------------------------------------------------------
// DEVICE CONFIGURATION
Expand Down

0 comments on commit 8c285b5

Please sign in to comment.