Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:14

0001 /**
0002  *  @file
0003  *
0004  *  @ingroup shared_tod
0005  *
0006  *  @brief Real Time Clock Time of Day API Definition
0007  */
0008 
0009 /*
0010  *
0011  *  Based on MVME162 TOD by:
0012  *    COPYRIGHT (C) 1997
0013  *    by Katsutoshi Shibuya - BU Denken Co.,Ltd. - Sapporo - JAPAN
0014  *    ALL RIGHTS RESERVED
0015  *
0016  *  The license and distribution terms for this file may be
0017  *  found in the file LICENSE in this distribution or at
0018  *  http://www.rtems.org/license/LICENSE.
0019  */
0020 
0021 #ifndef TOD_H
0022 #define TOD_H
0023 
0024 #ifdef __cplusplus
0025 extern "C" {
0026 #endif
0027 
0028 /**
0029  *  @defgroup shared_tod RTC
0030  *
0031  *  @ingroup RTEMSBSPsShared
0032  *
0033  *  @brief Set the RTC
0034  */
0035 int setRealTime(
0036   const rtems_time_of_day *tod
0037 );
0038 
0039 /*
0040  *  Get the time from the RTC.
0041  */
0042 
0043 void getRealTime(
0044   rtems_time_of_day *tod
0045 );
0046 
0047 /*
0048  *  Read real time from RTC and set it to RTEMS' clock manager
0049  */
0050 
0051 void setRealTimeToRTEMS(void);
0052 
0053 /*
0054  *  Read time from RTEMS' clock manager and set it to RTC
0055  */
0056 
0057 void setRealTimeFromRTEMS(void);
0058 
0059 /*
0060  *  Return the difference between RTC and RTEMS' clock manager time in minutes.
0061  *  If the difference is greater than 1 day, this returns 9999.
0062  */
0063 
0064 int checkRealTime(void);
0065 
0066 #ifdef __cplusplus
0067 }
0068 #endif
0069 
0070 #endif