Files
Amar Mahmutbegovic 8ce616c0c9 add Chapter10
2024-09-09 20:55:25 +02:00

28 lines
351 B
C++

#pragma once
#include <cstdint>
#include <stm32f0xx_hal.h>
namespace hal
{
inline void init()
{
HAL_Init();
}
inline std::uint32_t get_pc()
{
std::uint32_t pc;
__asm volatile ("mov %0, pc" : "=r" (pc) );
return pc;
}
struct time
{
static std::uint32_t get_ms()
{
return HAL_GetTick();
}
};
}; // namespace hal