blob: 2deeebaeb3b3e058439009b5f87e5f1f418ea697 (
plain) (
tree)
|
|
/**
* @file
*
* @brief Initializes the Time of Day Handler
*
* @ingroup ScoreTOD
*/
/* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/score/todimpl.h>
static uint32_t _TOD_Nanoseconds_since_tick_default_handler( void )
{
return 0;
}
void _TOD_Handler_initialization(void)
{
TOD_Control *tod = &_TOD;
_ISR_lock_Initialize( &tod->lock, "TOD" );
_Timestamp_Set( &tod->now, TOD_SECONDS_1970_THROUGH_1988, 0 );
_Timestamp_Set_to_zero( &tod->uptime );
tod->nanoseconds_since_last_tick =
_TOD_Nanoseconds_since_tick_default_handler;
/* TOD has not been set */
tod->is_set = false;
}
|