summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-11-03 11:43:19 +0700
committerhathach <[email protected]>2025-11-03 11:46:54 +0700
commit00f374682ea5aaecf189e46966f015576049a773 (patch)
treeb16a6d95f3742337210ee70c8df160a40fd609cf /hw
parent67b2a5c2e1dacd305015ae4a6329c8db8f198e81 (diff)
fixing alert by scanning tool
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/board_api.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/bsp/board_api.h b/hw/bsp/board_api.h
index 80d86a4aa..088c5fec4 100644
--- a/hw/bsp/board_api.h
+++ b/hw/bsp/board_api.h
@@ -35,6 +35,7 @@ extern "C" {
#include <inttypes.h>
#include <stdbool.h>
#include <string.h>
+#include <stdio.h>
#include "tusb.h"
@@ -164,7 +165,7 @@ static inline size_t board_usb_get_serial(uint16_t desc_str1[], size_t max_chars
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
};
- uint8_t const nibble = (uid[i] >> (j * 4)) & 0xf;
+ const uint8_t nibble = (uint8_t) ((uid[i] >> (j * 4)) & 0xf);
desc_str1[i * 2 + (1 - j)] = nibble_to_hex[nibble]; // UTF-16-LE
}
}