1f08c3bdfSopenharmony_cirtc-test.c : Test the Real Time Clock driver 2f08c3bdfSopenharmony_ci 3f08c3bdfSopenharmony_ciTests supported as of now 4f08c3bdfSopenharmony_ci-------------------------- 5f08c3bdfSopenharmony_ci1. Read test : This reads the time/date from the RTC 6f08c3bdfSopenharmony_ci ioctls tested :- RTC_RD_TIME. 7f08c3bdfSopenharmony_ci 8f08c3bdfSopenharmony_ci2. Alarm Test: Sets the alarm to 5 seconds in future and makes sure it rings. 9f08c3bdfSopenharmony_ci ioctls tested :- RTC_ALM_SET, RTC_ALM_READ, RTC_AIE_ON, RTC_AIE_OFF. 10f08c3bdfSopenharmony_ci 11f08c3bdfSopenharmony_ci3. Update interrupts test : Sets Update interrupts enable on, waits for five 12f08c3bdfSopenharmony_ci interrupts and then turns it off. 13f08c3bdfSopenharmony_ci ioctls tested :- RTC_UIE_ON, RTC_UIE_OFF. 14f08c3bdfSopenharmony_ci 15f08c3bdfSopenharmony_ci 16f08c3bdfSopenharmony_ciHow to Build 17f08c3bdfSopenharmony_ci------------ 18f08c3bdfSopenharmony_ciYou have to build the complete LTP package before trying to build these tests. 19f08c3bdfSopenharmony_ciAfter building the complete LTP sources enter this directory and issue a 'make'. 20f08c3bdfSopenharmony_ci 21f08c3bdfSopenharmony_ciHow to Run 22f08c3bdfSopenharmony_ci---------- 23f08c3bdfSopenharmony_ci 24f08c3bdfSopenharmony_ci The tests assume the rtc device node to be "/dev/rtc". If you have a 25f08c3bdfSopenharmony_cidifferent node run the test with the name of the node as a parameter. 26f08c3bdfSopenharmony_ci 27f08c3bdfSopenharmony_ciEg. If your node is /dev/rtc0, then run the test as 28f08c3bdfSopenharmony_ci 29f08c3bdfSopenharmony_ci $ ./rtc-test /dev/rtc0 30