forked from Imagelibrary/rtems
2011-10-20 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1926/bsps * timer/timer.c: New file. * Makefile.am: Reflect change above.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2011-10-20 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
|
||||
PR 1926/bsps
|
||||
* timer/timer.c: New file.
|
||||
* Makefile.am: Reflect change above.
|
||||
|
||||
2011-10-18 Jennifer Averett <Jennifer.Averett@OARcorp.com>
|
||||
|
||||
PR 1917/bsps
|
||||
|
||||
@@ -84,6 +84,9 @@ libbsp_a_SOURCES += ../../shared/bsplibc.c \
|
||||
libbsp_a_SOURCES += clock/clock-config.c \
|
||||
../../shared/clockdrv_shell.h
|
||||
|
||||
# Timer
|
||||
libbsp_a_SOURCES += timer/timer.c
|
||||
|
||||
# IRQ
|
||||
libbsp_a_SOURCES += irq/irq.c \
|
||||
../../shared/src/irq-generic.c \
|
||||
|
||||
44
c/src/lib/libbsp/powerpc/qoriq/timer/timer.c
Normal file
44
c/src/lib/libbsp/powerpc/qoriq/timer/timer.c
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @ingroup QorIQ
|
||||
*
|
||||
* @brief QorIQ benchmark timer.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
* embedded brains GmbH
|
||||
* Obere Lagerstr. 30
|
||||
* 82178 Puchheim
|
||||
* Germany
|
||||
* <rtems@embedded-brains.de>
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems/btimer.h>
|
||||
|
||||
#include <libcpu/powerpc-utility.h>
|
||||
|
||||
static benchmark_timer_t benchmark_timer_base;
|
||||
|
||||
void benchmark_timer_initialize(void)
|
||||
{
|
||||
benchmark_timer_base = ppc_alternate_time_base();
|
||||
}
|
||||
|
||||
benchmark_timer_t benchmark_timer_read(void)
|
||||
{
|
||||
return ppc_alternate_time_base() - benchmark_timer_base;
|
||||
}
|
||||
|
||||
void benchmark_timer_disable_subtracting_average_overhead(bool find_average_overhead)
|
||||
{
|
||||
/* VOID */
|
||||
}
|
||||
Reference in New Issue
Block a user