add cmake support for g0, exlicitly call HAL_Init() and also HAL_IncTick() in systick irq, fix button active state.

This commit is contained in:
hathach
2023-06-01 15:58:02 +07:00
parent af59864ab5
commit 6b44d8fb55
6 changed files with 169 additions and 16 deletions

View File

@@ -44,6 +44,7 @@ UART_HandleTypeDef UartHandle;
void board_init(void)
{
HAL_Init(); // required for HAL_RCC_Osc TODO check with freeRTOS
board_clock_init();
// Enable All GPIOs clocks
@@ -162,6 +163,7 @@ volatile uint32_t system_ticks = 0;
void SysTick_Handler (void)
{
system_ticks++;
HAL_IncTick();
}
uint32_t board_millis(void)