update stm32f1 to support iar build

This commit is contained in:
hathach
2023-01-21 11:32:37 +07:00
parent cb34cb2a93
commit 1bbeb6ad79
12 changed files with 79 additions and 20 deletions

View File

@@ -104,7 +104,8 @@ void board_init(void)
void board_led_write(bool state)
{
HAL_GPIO_WritePin(LED_PORT, LED_PIN, state ? LED_STATE_ON : (1-LED_STATE_ON));
GPIO_PinState pin_state = (GPIO_PinState) (state ? LED_STATE_ON : (1-LED_STATE_ON));
HAL_GPIO_WritePin(LED_PORT, LED_PIN, pin_state);
}
uint32_t board_button_read(void)
@@ -139,7 +140,7 @@ uint32_t board_millis(void)
void HardFault_Handler (void)
{
asm("bkpt");
__asm("BKPT #0\n");
}
#ifdef USE_FULL_ASSERT