X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/2236410f4582ab45ae8c384dd6eeeef5d10aab15..79d7be802edee0187df2f775d8f02b54bc49cd4a:/lunaix-os/hal/rtc/rtc_device.c diff --git a/lunaix-os/hal/rtc/rtc_device.c b/lunaix-os/hal/rtc/rtc_device.c index cd94a97..ad06343 100644 --- a/lunaix-os/hal/rtc/rtc_device.c +++ b/lunaix-os/hal/rtc/rtc_device.c @@ -91,7 +91,7 @@ hwrtc_register(struct devclass* class, struct hwrtc* rtc) } class->variant = rtc->id; - device_register(rtc->rtc_dev, class, "rtc%d", rtc->id); + register_device(rtc->rtc_dev, class, "rtc%d", rtc->id); } static void @@ -101,16 +101,17 @@ __hwrtc_readinfo(struct twimap* mapping) twimap_printf(mapping, "name: %s\n", rtc->name); twimap_printf(mapping, "frequency: %dHz\n", rtc->base_freq); twimap_printf(mapping, "ticks count: %d\n", rtc->get_counts(rtc)); - twimap_printf( - mapping, "ticking: %s\n", (rtc->state & RTC_STATE_MASKED) ? "no" : "yes"); + twimap_printf(mapping, + "ticking: %s\n", + (rtc->state & RTC_STATE_MASKED) ? "no" : "yes"); datetime_t dt; rtc->get_walltime(rtc, &dt); twimap_printf( - mapping, "recorded date: %d/%d/%d\n", dt.year, dt.month, dt.day); + mapping, "recorded date: %d/%d/%d\n", dt.year, dt.month, dt.day); twimap_printf( - mapping, "recorded time: %d:%d:%d\n", dt.hour, dt.minute, dt.second); + mapping, "recorded time: %d:%d:%d\n", dt.hour, dt.minute, dt.second); twimap_printf(mapping, "recorded weekday: %d\n", dt.weekday); }