QTechOS/kernel/drivers/opensbi/extensions/timer.cpp
2022-01-24 21:12:13 -05:00

25 lines
530 B
C++

#include "opensbi/extensions/timer.h"
namespace drivers {
namespace opensbi::timer {
namespace {
enum class ExtensionId {
TIMER = 0x54494D45
};
enum class FunctionId {
SET_TIMER
};
}
SbiRet set_timer(uint64_t stime_value) {
return ecall(
static_cast<sbiword_t>(ExtensionId::TIMER),
static_cast<sbiword_t>(FunctionId::SET_TIMER),
stime_value);
}
} // End namespace opensbi::timer
} // End namespace drivers