My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
timer.c File Reference
#include <sw_types.h>
#include <sw_timer.h>
#include <gen_timer.h>
#include <sw_board.h>
#include <sw_debug.h>
#include <gic_svisor.h>
#include <global.h>
#include <unused.h>

Functions

u64 get_clock_period (void)
 This function returns the resolution which can be obtained with the given clock. More...
 
u64 get_timer_period (void)
 This function returns the maximum time that can be kept track of before it gets expired. (Eg : The time taken for running from 0xFFFFFFFF to 0x00000000) More...
 
s32 get_clock_period_ns (void)
 
u32 get_clock_period_us (void)
 This function retrieves the clock period in micro scale. More...
 
void sw_set_timer_cntr_freq (ulong hz)
 
void read_freerunning_cntr (pa_t *val)
 It reads and returns the value of the timer which is used as the free running counter. More...
 
void sw_timer_enable (u32 timer_base, u32 timer_index)
 
void sw_timer_disable (u32 timer_base, u32 timer_index)
 
void sw_timer_init (u32 timer_base)
 
void sw_set_timer (u32 timer_base, u32 tim_mod_index, u32 mode, ulong clockcycles)
 
void secure_timer_irq_handler (int irq)
 Handler for secure timer interrupt request. More...
 

Function Documentation

u64 get_clock_period ( void  )

This function returns the resolution which can be obtained with the given clock.

Returns
s32 get_clock_period_ns ( void  )
Returns
u32 get_clock_period_us ( void  )

This function retrieves the clock period in micro scale.

Returns
u64 get_timer_period ( void  )

This function returns the maximum time that can be kept track of before it gets expired. (Eg : The time taken for running from 0xFFFFFFFF to 0x00000000)

Returns
void read_freerunning_cntr ( pa_t *  val)

It reads and returns the value of the timer which is used as the free running counter.

Returns
void secure_timer_irq_handler ( int  irq)

Handler for secure timer interrupt request.

Parameters
irq
data
void sw_set_timer ( u32  timer_base,
u32  tim_mod_index,
u32  mode,
ulong  clockcycles 
)
Parameters
timer_base
tim_mod_index
mode
clockcycles
void sw_set_timer_cntr_freq ( ulong  hz)
Parameters
hz
void sw_timer_disable ( u32  timer_base,
u32  timer_index 
)
Parameters
timer_base
timer_index
void sw_timer_enable ( u32  timer_base,
u32  timer_index 
)
Parameters
timer_base
timer_index
void sw_timer_init ( u32  timer_base)
Parameters
timer_base