25 lines
530 B
C++
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
|
|
|