diff options
| author | hathach <[email protected]> | 2025-10-15 15:27:48 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-10-15 15:27:48 +0700 |
| commit | a8be5759533eb4b8c61af7ecf8fe90551bc69894 (patch) | |
| tree | 454b7ca86650007c935ab6d47efa94cd9878bfe5 /hw | |
| parent | 3ce037d62bb1fec8605af5560d1169c2841af8a1 (diff) | |
fix build warning with clang
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/imxrt/family.c | 1 | ||||
| -rw-r--r-- | hw/bsp/stm32h7/boards/stm32h743eval/board.h | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/hw/bsp/imxrt/family.c b/hw/bsp/imxrt/family.c index 9cd59b7d7..84b083e29 100644 --- a/hw/bsp/imxrt/family.c +++ b/hw/bsp/imxrt/family.c @@ -249,6 +249,7 @@ TU_ATTR_UNUSED void _start(void) { #ifdef __clang__ void _exit(int __status) { + (void) __status; while (1) {} } #endif diff --git a/hw/bsp/stm32h7/boards/stm32h743eval/board.h b/hw/bsp/stm32h7/boards/stm32h743eval/board.h index 7c3f6414a..cfffc7770 100644 --- a/hw/bsp/stm32h7/boards/stm32h743eval/board.h +++ b/hw/bsp/stm32h7/boards/stm32h743eval/board.h @@ -214,6 +214,10 @@ static int32_t i2c_writereg(uint16_t DevAddr, uint16_t Reg, uint8_t *pData, uint return 0; } +static int32_t i2c_get_tick(void) { + return (int32_t) HAL_GetTick(); +} + static inline void board_init2(void) { // IO control via MFX MFXSTM32L152_IO_t io_ctx; @@ -221,7 +225,7 @@ static inline void board_init2(void) { io_ctx.DeInit = board_i2c_deinit; io_ctx.ReadReg = i2c_readreg; io_ctx.WriteReg = i2c_writereg; - io_ctx.GetTick = (MFXSTM32L152_GetTick_Func) HAL_GetTick; + io_ctx.GetTick = i2c_get_tick; uint16_t i2c_addr[] = { 0x84, 0x86 }; for(uint8_t i = 0U; i < 2U; i++) { |
