| Electronic Components Datasheet Search |
|
UM0851 Datasheet(PDF) 42 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 Datasheet(HTML) 42 Page - STMicroelectronics |
|
42 / 245 page ![]() Platform section UM0851 42/245 Doc ID 16604 Rev 2 fd = open("/dev/rtc", O_RDONLY, 0); ret = ioctl(fd, RTC_ALM_SET, &rtc_tm); /* call the read function to wait the Alarm interrupt */ ret = read(fd, &data, sizeof(unsigned long)); ... close(fd); Closing the device The close function is used to disconnect the RTC device with the relevant file descriptor. int fd; fd = open("/dev/rtc", O_RDONLY, 0); ... close(fd); 3.3.3 RTC driver usage ● hwclock hwclock is a shell utility for accessing the RTC clock. You can use it to display the current time, set the hardware clock to a specified time, set the hardware clock to the system time, and set the system time from the hardware clock. You can also run hwclock periodically to insert or remove time from the hardware clock in order to compensate for systematic drift (where the clock consistently gains or loses time at a certain rate if left to run). Example: #hwclock --set --date="9/22/96 16:45:05" ● rtcwake rtcwakeup is a shell utility which can be used to program RTC for the next alarm interrupt. It accepts an argument in seconds, which is the programmed alarm time. Example: #rtcwake -s 10 Configuration options 3.3.4 References ● Refer linux-2.6.27/Documentation/timers/, for the time keeping and tick generation architecture of Linux. Table 14. RTC menuconfig kernel options Configuration option Comment CONFIG_RTC This option enables the RTC driver. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |