summaryrefslogtreecommitdiff
path: root/hw/bsp/board.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-10-24 13:04:49 +0700
committerhathach <[email protected]>2025-10-24 13:04:49 +0700
commitf39dcae9f1bed1dfcfb239f76677ef980a9976c9 (patch)
treeba8e49a707d1547663abac80ef3c7c4738463c46 /hw/bsp/board.c
parent878c8f26c5c760ec683a8d4ee4aa1ee6678b8a12 (diff)
fix several warnings
Diffstat (limited to 'hw/bsp/board.c')
-rw-r--r--hw/bsp/board.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/hw/bsp/board.c b/hw/bsp/board.c
index 41e6eb1b8..476ec6733 100644
--- a/hw/bsp/board.c
+++ b/hw/bsp/board.c
@@ -51,7 +51,7 @@ int sys_read(int fhdl, char *buf, size_t count) TU_ATTR_USED;
int sys_write(int fhdl, const char *buf, size_t count) {
(void) fhdl;
- SEGGER_RTT_Write(0, (const char *) buf, (int) count);
+ SEGGER_RTT_Write(0, buf, (int) count);
return (int) count;
}
@@ -111,16 +111,6 @@ int sys_read (int fhdl, char *buf, size_t count) {
#endif
-//int _close(int fhdl) {
-// (void) fhdl;
-// return 0;
-//}
-
-//int _fstat(int file, struct stat *st) {
-// memset(st, 0, sizeof(*st));
-// st->st_mode = S_IFCHR;
-//}
-
// Clang use picolibc
#if defined(__clang__)
static int cl_putc(char c, FILE *f) {
@@ -147,8 +137,8 @@ TU_ATTR_WEAK size_t board_get_unique_id(uint8_t id[], size_t max_len) {
(void) max_len;
// fixed serial string is 01234567889ABCDEF
uint32_t* uid32 = (uint32_t*) (uintptr_t)id;
- uid32[0] = 0x67452301;
- uid32[1] = 0xEFCDAB89;
+ uid32[0] = 0x67452301u;
+ uid32[1] = 0xEFCDAB89u;
return 8;
}