23 #include <rtems/config.h> 31 const uint32_t _TOD_Days_per_month[ 2 ][ 13 ] = {
32 { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
33 { 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
40 uint32_t days_in_month;
41 uint32_t ticks_per_second;
46 (the_tod->
ticks >= ticks_per_second) ||
50 (the_tod->
month == 0) ||
56 if (((the_tod->
year % 4) == 0 && (the_tod->
year % 100 != 0)) ||
57 (the_tod->
year % 400 == 0))
58 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->
month ];
60 days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->
month ];
62 if ( the_tod->
day > days_in_month )
This header file defines the Clock Manager API.
This header file defines parts of the application configuration information API.
bool _TOD_Validate(const rtems_time_of_day *the_tod)
%
This type is used to represent the calendar time in the Classic API.
#define TOD_MICROSECONDS_PER_SECOND
#define TOD_HOURS_PER_DAY
uint32_t day
This member represents the day of the month with values from 1 to 31.
#define rtems_configuration_get_microseconds_per_tick()
Returns the number of microseconds per clock tick configured for this application.
uint32_t month
This member represents the month of the year with values from 1 to 12.
#define TOD_MONTHS_PER_YEAR
#define TOD_SECONDS_PER_MINUTE
#define TOD_MINUTES_PER_HOUR
#define TOD_BASE_YEAR
Earliest year to which an time of day can be initialized.
uint32_t ticks
This member represents the clock tick of the second with values from 0 to rtems_clock_get_ticks_per_s...
uint32_t hour
This member represents the hour of the day with values from 0 to 23.
uint32_t second
This member represents the second of the minute with values from 0 to 59.
uint32_t minute
This member represents the minute of the hour with values from 0 to 59.
uint32_t year
This member represents the year A.D.