add Chapter04 bare example
This commit is contained in:
21
Chapter04/bare/hal/inc/hal.hpp
Normal file
21
Chapter04/bare/hal/inc/hal.hpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include <stm32f0xx_hal.h>
|
||||
|
||||
namespace hal
|
||||
{
|
||||
inline void init()
|
||||
{
|
||||
HAL_Init();
|
||||
}
|
||||
|
||||
struct time
|
||||
{
|
||||
inline static std::uint32_t get_ms()
|
||||
{
|
||||
return HAL_GetTick();
|
||||
}
|
||||
};
|
||||
}; // namespace hal
|
||||
Reference in New Issue
Block a user