Rtems 4.11 RTC Driver (ARM, beagle)

Source: Internet
Author: User

RTC-driven framework in C/SRC/LIB/LIBBSP/SHARED/TOD.C, most of the functionality has been implemented, the entry function is Rtc_initialize (), BSP to achieve very few things.

Beagle implementation in C/SRC/LIB/LIBBSP/ARM/BEAGLE/RTC.C, provides a rtc_tbl rtc_table[] array, the size of the array is stored in the Rtc_count global variable, each RTC_ The table element is a possible RTC chip, and Rtc_initialize () invokes the probe function of each rtc_table element, and the first element that returns true is the system's RTC device. This is achieved in order to facilitate compatible products of different models of the motherboard (for example, the RTC chip discontinued, replaced by another RTC chip).

rtc_table element (RTC Device)

The RTC device must RTC_FNS 3 functions in a struct:

  • Initialize: Turn on the RTC device Clock, set the bus access mode, etc.
  • READ: Read time from RTC device
  • Write: Put the time device into the RTC device
Rtc_initialize Call

The rtc_driver_table_entry is defined in the cpukit/libcsupport/include/rtc.h, and if the final application requires RTC, it can be configured with the Cpukit/sapi/include/confdefs.h Included in the _io_driver_address_table.

Rtems 4.11 RTC Driver (ARM, beagle)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.