update host example to use new tuh mem macros
This commit is contained in:
@@ -95,12 +95,12 @@
|
|||||||
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
|
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
|
||||||
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
|
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
|
||||||
*/
|
*/
|
||||||
#ifndef CFG_TUSB_MEM_SECTION
|
#ifndef CFG_TUD_MEM_SECTION
|
||||||
#define CFG_TUSB_MEM_SECTION
|
#define CFG_TUD_MEM_SECTION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CFG_TUSB_MEM_ALIGN
|
#ifndef CFG_TUD_MEM_ALIGN
|
||||||
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
|
#define CFG_TUD_MEM_ALIGN __attribute__ ((aligned(4)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
@@ -128,6 +128,14 @@
|
|||||||
// Size of buffer to hold descriptors and other data used for enumeration
|
// Size of buffer to hold descriptors and other data used for enumeration
|
||||||
#define CFG_TUH_ENUMERATION_BUFSIZE 256
|
#define CFG_TUH_ENUMERATION_BUFSIZE 256
|
||||||
|
|
||||||
|
#ifndef CFG_TUH_MEM_SECTION
|
||||||
|
#define CFG_TUH_MEM_SECTION
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CFG_TUH_MEM_ALIGN
|
||||||
|
#define CFG_TUH_MEM_ALIGN __attribute__ ((aligned(4)))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CFG_TUH_HUB 1
|
#define CFG_TUH_HUB 1
|
||||||
// max device support (excluding hub device)
|
// max device support (excluding hub device)
|
||||||
#define CFG_TUH_DEVICE_MAX (CFG_TUH_HUB ? 4 : 1) // hub typically has 4 ports
|
#define CFG_TUH_DEVICE_MAX (CFG_TUH_HUB ? 4 : 1) // hub typically has 4 ports
|
||||||
|
@@ -80,12 +80,12 @@
|
|||||||
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
|
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
|
||||||
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
|
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
|
||||||
*/
|
*/
|
||||||
#ifndef CFG_TUSB_MEM_SECTION
|
#ifndef CFG_TUH_MEM_SECTION
|
||||||
#define CFG_TUSB_MEM_SECTION
|
#define CFG_TUH_MEM_SECTION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CFG_TUSB_MEM_ALIGN
|
#ifndef CFG_TUH_MEM_ALIGN
|
||||||
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
|
#define CFG_TUH_MEM_ALIGN __attribute__ ((aligned(4)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
@@ -80,12 +80,12 @@
|
|||||||
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
|
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
|
||||||
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
|
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
|
||||||
*/
|
*/
|
||||||
#ifndef CFG_TUSB_MEM_SECTION
|
#ifndef CFG_TUH_MEM_SECTION
|
||||||
#define CFG_TUSB_MEM_SECTION
|
#define CFG_TUH_MEM_SECTION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CFG_TUSB_MEM_ALIGN
|
#ifndef CFG_TUH_MEM_ALIGN
|
||||||
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
|
#define CFG_TUH_MEM_ALIGN __attribute__ ((aligned(4)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
@@ -80,12 +80,12 @@
|
|||||||
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
|
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
|
||||||
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
|
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
|
||||||
*/
|
*/
|
||||||
#ifndef CFG_TUSB_MEM_SECTION
|
#ifndef CFG_TUH_MEM_SECTION
|
||||||
#define CFG_TUSB_MEM_SECTION
|
#define CFG_TUH_MEM_SECTION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CFG_TUSB_MEM_ALIGN
|
#ifndef CFG_TUH_MEM_ALIGN
|
||||||
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
|
#define CFG_TUH_MEM_ALIGN __attribute__ ((aligned(4)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
@@ -80,12 +80,12 @@
|
|||||||
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
|
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
|
||||||
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
|
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
|
||||||
*/
|
*/
|
||||||
#ifndef CFG_TUSB_MEM_SECTION
|
#ifndef CFG_TUH_MEM_SECTION
|
||||||
#define CFG_TUSB_MEM_SECTION
|
#define CFG_TUH_MEM_SECTION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CFG_TUSB_MEM_ALIGN
|
#ifndef CFG_TUH_MEM_ALIGN
|
||||||
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
|
#define CFG_TUH_MEM_ALIGN __attribute__ ((aligned(4)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user