This commit is contained in:
hathach
2023-01-30 20:11:59 +07:00
parent 63a6fd3689
commit 25603c7269
7 changed files with 46 additions and 19 deletions

View File

@@ -179,7 +179,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)
@@ -214,7 +215,7 @@ uint32_t board_millis(void)
void HardFault_Handler (void)
{
asm("bkpt 0x10");
__asm("BKPT #0\n");
}
// Required by __libc_init_array in startup code if we are compiling using