HAL.Real_Time_Clock

Entities

Simple Types

Record Types

Interface Types

Access Types

Subprograms

Description

---------------------------------------------------------------------------- -- Copyright (C) 2016, AdaCore -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are -- met: -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in -- the documentation and/or other materials provided with the -- distribution. -- 3. Neither the name of the copyright holder nor the names of its -- contributors may be used to endorse or promote products derived -- from this software without specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- ----------------------------------------------------------------------------

Any_RTC_Device

type Any_RTC_Device is access all RTC_Device'Class;

Get

procedure Get (This : in out RTC_Device;
               Time : out RTC_Time;
               Date : out RTC_Date)

This procedure ensures coherent time and date values

Parameters
This
Time
Date

Get_Date

function Get_Date (This : RTC_Device)
                   return HAL.Real_Time_Clock.RTC_Date
Parameters
This
Return Value

Get_Time

function Get_Time (This : RTC_Device)
                   return HAL.Real_Time_Clock.RTC_Time
Parameters
This
Return Value

RTC_Date

type RTC_Date is record
   Day_Of_Week : RTC_Day_Of_Week;
   Day         : RTC_Day;
   Month       : RTC_Month;
   Year        : RTC_Year;
end record;
Record fields
Day_Of_Week
Day
Month
Year

RTC_Day

type RTC_Day is range 1 .. 31;

RTC_Day_Of_Week

type RTC_Day_Of_Week is (Monday, Tuesday, Wednesday, Thursday, Friday,
                         Saturday, Sunday);
Enumeration Literal
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday

RTC_Device

type RTC_Device is limited interface;

RTC_Hour

type RTC_Hour is mod 24;

RTC_Minute

type RTC_Minute is mod 60;

RTC_Month

type RTC_Month is (January, February, March, April, May, June, July, August,
                   September, October, November, December);
Enumeration Literal
January
February
March
April
May
June
July
August
September
October
November
December

RTC_Second

type RTC_Second is mod 60;

RTC_Time

type RTC_Time is record
   Hour : RTC_Hour;
   Min  : RTC_Minute;
   Sec  : RTC_Second;
end record;
Record fields
Hour
Min
Sec

RTC_Year

type RTC_Year is range 00 .. 99;

Set

procedure Set (This : in out RTC_Device;
               Time : RTC_Time;
               Date : RTC_Date)
Parameters
This
Time
Date