4.115
Last change
on this file since 24bf11e was
24bf11e,
checked in by Sebastian Huber <sebastian.huber@…>, on 02/12/14 at 09:31:38
|
score: Add CPU counter support
Add a CPU counter interface to allow access to a free-running counter.
It is useful to measure short time intervals. This can be used for
example to enable profiling of critical low-level functions.
Add two busy wait functions rtems_counter_delay_ticks() and
rtems_counter_delay_nanoseconds() implemented via the CPU counter.
|
-
Property mode set to
100644
|
File size:
609 bytes
|
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2014 embedded brains GmbH. All rights reserved. |
---|
3 | * |
---|
4 | * embedded brains GmbH |
---|
5 | * Dornierstr. 4 |
---|
6 | * 82178 Puchheim |
---|
7 | * Germany |
---|
8 | * <rtems@embedded-brains.de> |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.com/license/LICENSE. |
---|
13 | */ |
---|
14 | |
---|
15 | #ifdef HAVE_CONFIG_H |
---|
16 | #include "config.h" |
---|
17 | #endif |
---|
18 | |
---|
19 | #include <rtems/counter.h> |
---|
20 | |
---|
21 | void rtems_counter_delay_nanoseconds( uint32_t nanoseconds ) |
---|
22 | { |
---|
23 | rtems_counter_ticks ticks = |
---|
24 | rtems_counter_nanoseconds_to_ticks( nanoseconds ); |
---|
25 | |
---|
26 | rtems_counter_delay_ticks( ticks ); |
---|
27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.