Zakładka z wyszukiwarką danych komponentów
  Polish  ▼
ALLDATASHEET.PL

X  

UM0851 Arkusz danych(PDF) 41 Page - STMicroelectronics

Numer części UM0851
Szczegółowy opis  SPEAr is a family of highly customizable ARM-based embedded
PDF  245 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Producent  STMICROELECTRONICS [STMicroelectronics]
Strona internetowa  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0851 Arkusz danych(HTML) 41 Page - STMicroelectronics

Back Button UM0851 Datasheet HTML 37Page - STMicroelectronics UM0851 Datasheet HTML 38Page - STMicroelectronics UM0851 Datasheet HTML 39Page - STMicroelectronics UM0851 Datasheet HTML 40Page - STMicroelectronics UM0851 Datasheet HTML 41Page - STMicroelectronics UM0851 Datasheet HTML 42Page - STMicroelectronics UM0851 Datasheet HTML 43Page - STMicroelectronics UM0851 Datasheet HTML 44Page - STMicroelectronics UM0851 Datasheet HTML 45Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 41 / 245 page
background image
UM0851
Platform section
Doc ID 16604 Rev 2
41/245
&spear_rtc_ops, THIS_MODULE);
The following system calls are supported by Linux RTC framework.
Opening the RTC device
The open function is used to establish the connection between the RTC device and a file
descriptor.
int fd;
fd = open("/dev/rtc", O_RDONLY, 0);
IOCTL operations
The ioctl command is used to configure the RTC device.
int fd;
struct rtc_time rtc_tm;
int ret;
fd = open("/dev/rtc", O_RDONLY, 0);
...
/* the ioctl command RTC_RD_TIME is used
* to read the current timer.
*/
ret = ioctl(rtc_fd, RTC_RD_TIME, &rtc_tm);
...
close(fd);
Read from RTC device
This is the standard read function call. In the RTC driver, the read function is used to wait for
the RTC device interrupt. When the read function is called, the application is locked until an
interrupt is generated.
int fd;
int ret;
struct rtc_time rtc_tm;
unsigned long data;
Table 13.
RTC ioctl requests
Request
Description
RTC_AIE_OFF
This ioctl does not need an argument, and it can be used to disable the
RTC alarm interrupt.
RTC_AIE_ON
This ioctl does not need an argument, and it can be used to enable the
RTC alarm interrupt.
RTC_ALM_READ
This ioctl needs one argument (struct rtc_time *), and it can be used to
get the current RTC alarm parameter.
RTC_ALM_SET
This ioctl needs one argument (struct rtc_time *), and it can be used to
set the RTC alarm.
RTC_RD_TIME
This ioctl needs one argument (struct rtc_time *), and it can be used to
get the current RTC time.
RTC_SET_TIME
This ioctl needs one argument (struct rtc_time *), and it can be used to
set the current RTC time.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Arkusz danych Pobierz

Go To PDF Page


Link URL



Czy Alldatasheet okazała się pomocna?  [ DONATE ] 

O Alldatasheet   |   Reklama   |   Kontakt   |   Polityka prywatności   |   Link do karty katalogowej    |   Linki   |   Lista producentów
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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