2007-03-28 Joel Sherrill <joel@OARcorp.com>

* clock/ckinit.c: Add support to the Clock driver template for
	rtems_clock_set_nanoseconds_extension and the potential for TOD and
	timestamps accurate to the nanosecond. On this BSP however, it is
	only accurate to the microsecond.
This commit is contained in:
Joel Sherrill
2007-03-28 19:58:12 +00:00
parent e0a622cdb4
commit e907f7d922
2 changed files with 19 additions and 0 deletions

View File

@@ -1,3 +1,10 @@
2007-03-28 Joel Sherrill <joel@OARcorp.com>
* clock/ckinit.c: Add support to the Clock driver template for
rtems_clock_set_nanoseconds_extension and the potential for TOD and
timestamps accurate to the nanosecond. On this BSP however, it is
only accurate to the microsecond.
2007-03-28 Joel Sherrill <joel@OARcorp.com>
PR 1233/bsps

View File

@@ -46,6 +46,18 @@
extern int CLOCK_SPEED;
uint32_t bsp_clock_nanoseconds_since_last_tick(void)
{
uint32_t clicks;
clicks = ERC32_MEC.Real_Time_Clock_Counter;
return (uint32_t) (BSP_Configuration.microseconds_per_tick - clicks) * 1000;
}
#define Clock_driver_nanoseconds_since_last_tick bsp_clock_nanoseconds_since_last_tick
#define Clock_driver_support_initialize_hardware() \
do { \
/* approximately 1 us per countdown */ \