diff options
| author | hathach <[email protected]> | 2026-01-08 16:06:58 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-01-08 16:06:58 +0700 |
| commit | 64ca0b9d58e1ca268a8bae341499311388af7566 (patch) | |
| tree | 352047d1630ce91dc071c34ec2cc89a57cd02828 /examples/host | |
| parent | d7e715d5c238e9b05ef711a1a73d54c40b37729e (diff) | |
host device info print no serial as 0 instead of n/a
Diffstat (limited to 'examples/host')
| -rw-r--r-- | examples/host/device_info/src/main.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/host/device_info/src/main.c b/examples/host/device_info/src/main.c index 5b914a2ee..ab617e989 100644 --- a/examples/host/device_info/src/main.c +++ b/examples/host/device_info/src/main.c @@ -130,11 +130,10 @@ void tuh_mount_cb(uint8_t daddr) { } if (XFER_RESULT_SUCCESS != xfer_result) { uint16_t* serial = (uint16_t*)(uintptr_t) desc.serial; - serial[0] = (uint16_t) ((TUSB_DESC_STRING << 8) | (2 * 3 + 2)); - serial[1] = 'n'; - serial[2] = '/'; - serial[3] = 'a'; - serial[4] = 0; + + serial[0] = (uint16_t)((TUSB_DESC_STRING << 8) | (2 * 1 + 2)); + serial[1] = '0'; // simply 0 + serial[2] = 0; } print_utf16((uint16_t*)(uintptr_t) desc.serial, sizeof(desc.serial)/2); printf("\r\n"); |
