+}
+
+static int
+__hwtimer_ioctl(struct device* dev, u32_t req, va_list args)
+{
+ struct hwtimer* hwt = (struct hwtimer*)dev->underlay;
+ switch (req) {
+ case TIMERIO_GETINFO:
+ // TODO
+ break;
+
+ default:
+ break;
+ }
+ return 0;
+}
+
+void
+hwtimer_init(u32_t hertz, void* tick_callback)
+{
+ struct hwtimer* hwt_ctx = hwtimer_choose();
+
+ hwt_ctx->init(hwt_ctx, hertz, tick_callback);
+ hwt_ctx->running_freq = hertz;
+
+ current_timer = hwt_ctx;
+
+ struct device* timerdev = device_addsys(NULL, hwt_ctx, hwt_ctx->name);
+
+ timerdev->ops.exec_cmd = __hwtimer_ioctl;