summaryrefslogtreecommitdiff
path: root/hw
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
parent878c8f26c5c760ec683a8d4ee4aa1ee6678b8a12 (diff)
fix several warnings
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/board.c16
-rw-r--r--hw/bsp/stm32h7/boards/stm32h743eval/board.h2
2 files changed, 4 insertions, 14 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;
}
diff --git a/hw/bsp/stm32h7/boards/stm32h743eval/board.h b/hw/bsp/stm32h7/boards/stm32h743eval/board.h
index cfffc7770..96bfc24e1 100644
--- a/hw/bsp/stm32h7/boards/stm32h743eval/board.h
+++ b/hw/bsp/stm32h7/boards/stm32h743eval/board.h
@@ -61,7 +61,7 @@ static board_pindef_t board_pindef[] = {
{ // LED
.port = GPIOA,
.pin_init = { .Pin = GPIO_PIN_4, .Mode = GPIO_MODE_OUTPUT_PP, .Pull = GPIO_PULLDOWN, .Speed = GPIO_SPEED_HIGH, .Alternate = 0 },
- .active_state = 1
+ .active_state = 0
},
{ // Button
.port = GPIOC,