diff target-utils/pirexplore/rtc.c @ 73:c54c6ad1c66f

pirexplore: added rtccomp command to read RTC compensation registers
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 26 Jul 2013 21:12:03 +0000
parents 92c1ed6b4b67
children
line wrap: on
line diff
--- a/target-utils/pirexplore/rtc.c	Fri Jul 26 20:32:43 2013 +0000
+++ b/target-utils/pirexplore/rtc.c	Fri Jul 26 21:12:03 2013 +0000
@@ -50,3 +50,10 @@
 		time2.year, time2.month, time2.day_of_month, time2.day_of_week,
 		time2.hours, time2.minutes, time2.seconds);
 }
+
+void
+cmd_rtccomp()
+{
+	printf("%04X\n", (RTC_REGS.rtc_comp_msb_reg << 8) |
+			  RTC_REGS.rtc_comp_lsb_reg);
+}