summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/raspberrypi/misc/timer.c
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2016-06-28 16:15:38 +0200
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2016-06-28 16:15:38 +0200
commit68565b090e683872a7c0564a6af049e977307f41 (patch)
tree927f8e41ed257b3ce90eea189a2038b90f57d2a7 /c/src/lib/libbsp/arm/raspberrypi/misc/timer.c
parentarm/raspberrypi: Adding functionalities to Mailbox RPi (diff)
downloadrtems-68565b090e683872a7c0564a6af049e977307f41.tar.bz2
arm/raspberrypi: run VideoCore and mailbox code through rtems.uncrustify.
Some changes have been reverted to keep readability. For example squash of BCM2835_MBOX_TAG_* defines which are visually aligned in column.
Diffstat (limited to 'c/src/lib/libbsp/arm/raspberrypi/misc/timer.c')
-rw-r--r--c/src/lib/libbsp/arm/raspberrypi/misc/timer.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/c/src/lib/libbsp/arm/raspberrypi/misc/timer.c b/c/src/lib/libbsp/arm/raspberrypi/misc/timer.c
index 1047b3e417..f52ecb3a26 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/misc/timer.c
+++ b/c/src/lib/libbsp/arm/raspberrypi/misc/timer.c
@@ -25,26 +25,24 @@ static bool benchmark_timer_find_average_overhead = false;
static uint64_t benchmark_timer_base;
-void benchmark_timer_initialize(void)
+void benchmark_timer_initialize( void )
{
- benchmark_timer_base = BCM2835_REG(BCM2835_GPU_TIMER_CLO);
+ benchmark_timer_base = BCM2835_REG( BCM2835_GPU_TIMER_CLO );
}
-benchmark_timer_t benchmark_timer_read(void)
+benchmark_timer_t benchmark_timer_read( void )
{
- uint32_t delta = BCM2835_REG(BCM2835_GPU_TIMER_CLO) - benchmark_timer_base;
+ uint32_t delta = BCM2835_REG( BCM2835_GPU_TIMER_CLO ) - benchmark_timer_base;
- if (benchmark_timer_find_average_overhead)
- {
+ if ( benchmark_timer_find_average_overhead ) {
return delta;
- }
- else
- {
- return BCM2835_REG(BCM2835_GPU_TIMER_CLO);
+ } else {
+ return BCM2835_REG( BCM2835_GPU_TIMER_CLO );
}
}
-void benchmark_timer_disable_subtracting_average_overhead(bool find_average_overhead)
+void benchmark_timer_disable_subtracting_average_overhead(
+ bool find_average_overhead )
{
benchmark_timer_find_average_overhead = find_average_overhead;
}