RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Macros | Functions | Variables
btimer.c File Reference

Timer driver for the Hitachi SH 7750. More...

#include <rtems.h>
#include <rtems/btimer.h>
#include <rtems/score/sh_io.h>
#include <rtems/score/iosh7750.h>

Macros

#define TIMER_PRIO   15
 
#define TIMER_PRESCALER   4
 
#define TCR1_TPSC   SH7750_TCR_TPSC_DIV4
 
#define TIMER_VECTOR   SH7750_EVT_TO_NUM(SH7750_EVT_TUNI1)
 
#define AVG_OVERHEAD   0 /* It typically takes X.X microseconds */
 
#define LEAST_VALID   0 /* 20 */ /* Don't trust a clicks value lower than this */
 

Functions

rtems_isr timerisr (void)
 
void benchmark_timer_initialize (void)
 Initialize the Benchmark Timer.
 
benchmark_timer_t benchmark_timer_read (void)
 Read the Benchmark Timer.
 
void benchmark_timer_disable_subtracting_average_overhead (bool find_flag)
 Disable Average Overhead Removal from the Benchmark Timer.
 

Variables

uint32_t bsp_clicks_per_second
 
bool benchmark_timer_find_average_overhead
 

Detailed Description

Timer driver for the Hitachi SH 7750.

Function Documentation

◆ benchmark_timer_disable_subtracting_average_overhead()

void benchmark_timer_disable_subtracting_average_overhead ( bool  find_flag)

Disable Average Overhead Removal from the Benchmark Timer.

This method places the benchmark timer in a "raw" mode where it returns the actual number of units which have passed between calls to benchmark_timer_initialize and benchmark_timer_read counting.

Parameters
[in]find_flagindicates to enable or disable the mode

◆ benchmark_timer_initialize()

void benchmark_timer_initialize ( void  )

Initialize the Benchmark Timer.

This method initializes the benchmark timer and resets it to begin counting.

◆ benchmark_timer_read()

benchmark_timer_t benchmark_timer_read ( void  )

Read the Benchmark Timer.

This method stops the benchmark timer and returns the number of units that have passed since benchmark_timer_initialize was invoked.

Returns
This method returns the number of units with the average overhead removed. If the value is below the minimum trusted value, zero is returned.