forked from Imagelibrary/rtems
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:
@@ -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
|
||||
|
||||
@@ -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 */ \
|
||||
|
||||
Reference in New Issue
Block a user