summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2025-12-13 21:08:19 +0100
committerHiFiPhile <[email protected]>2025-12-13 21:08:42 +0100
commit5e49aa8e4d44a8a99a73e8faded2099c82ca023d (patch)
tree2c02ee846df230bae810519271c2f6fcd6d3f6d8
parentba9bc1a79d2c00290e64a93907f37cd3db7140f8 (diff)
example/bare_api: move buffer into USB section
Signed-off-by: HiFiPhile <[email protected]>
-rw-r--r--examples/host/bare_api/src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/host/bare_api/src/main.c b/examples/host/bare_api/src/main.c
index c693d6b00..5945b26fc 100644
--- a/examples/host/bare_api/src/main.c
+++ b/examples/host/bare_api/src/main.c
@@ -37,11 +37,13 @@
#define BUF_COUNT 4
-tusb_desc_device_t desc_device;
+CFG_TUH_MEM_SECTION tusb_desc_device_t desc_device;
-uint8_t buf_pool[BUF_COUNT][64];
+CFG_TUH_MEM_SECTION uint8_t buf_pool[BUF_COUNT][64];
uint8_t buf_owner[BUF_COUNT] = { 0 }; // device address that owns buffer
+CFG_TUH_MEM_SECTION uint16_t temp_buf[128]; // temp buffer for string descriptor
+
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF PROTYPES
//--------------------------------------------------------------------+
@@ -120,8 +122,6 @@ void print_device_descriptor(tuh_xfer_t *xfer) {
printf(" bcdDevice %04x\r\n" , desc_device.bcdDevice);
// Get String descriptor using Sync API
- uint16_t temp_buf[128];
-
printf(" iManufacturer %u ", desc_device.iManufacturer);
if (XFER_RESULT_SUCCESS == tuh_descriptor_get_manufacturer_string_sync(daddr, LANGUAGE_ID, temp_buf, sizeof(temp_buf))) {
print_utf16(temp_buf, TU_ARRAY_SIZE(temp_buf));