Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:03

0001 /**
0002  * @file
0003  *
0004  * @ingroup RTEMSBSPsARMLPC176X
0005  *
0006  * @brief Timer benchmark functions for the lpc176x bsp.
0007  */
0008 
0009 /*
0010  * Copyright (c) 2014 Taller Technologies.
0011  *
0012  * @author  Boretto Martin    (martin.boretto@tallertechnologies.com)
0013  * @author  Diaz Marcos (marcos.diaz@tallertechnologies.com)
0014  * @author  Lenarduzzi Federico  (federico.lenarduzzi@tallertechnologies.com)
0015  * @author  Daniel Chicco  (daniel.chicco@tallertechnologies.com)
0016  *
0017  * The license and distribution terms for this file may be
0018  * found in the file LICENSE in this distribution or at
0019  * http://www.rtems.org/license/LICENSE.
0020  */
0021 
0022 #include <rtems.h>
0023 #include <bsp.h>
0024 #include <rtems/btimer.h>
0025 
0026 #include <bsp/timer.h>
0027 
0028 static uint32_t benchmark_timer_base;
0029 
0030 void benchmark_timer_initialize( void )
0031 {
0032   benchmark_timer_base = lpc176x_timer_get_timer_value( LPC176X_TIMER_1 );
0033 }
0034 
0035 benchmark_timer_t benchmark_timer_read( void )
0036 {
0037   uint32_t delta = lpc176x_timer_get_timer_value( LPC176X_TIMER_1 ) -
0038                    benchmark_timer_base;
0039 
0040   return delta;
0041 }
0042 
0043 void benchmark_timer_disable_subtracting_average_overhead( bool find_avg_ovhead )
0044 {
0045 }