pic_tick.h File Reference

Timer helper routines. More...

#include "pic_utils.h"
Include dependency graph for pic_tick.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void handle_tick ()
 Call this routine to increment tick count.
void handle_tick_inline ()
 Call this routine to increment tick count - inline version.
uns16 tick_calc_diff (uns16 a, uns16 b)
 Calculate the tick time difference between two values.
uns16 tick_get_count ()
 Return current tick count.

Variables

static uns16 tick = 0

Detailed Description

Definition in file pic_tick.h.


Function Documentation

void handle_tick (  ) 

Typically called during the interrupt routine of a timer to increment the tick count. Note this routine assumes that interupts are off - which is always the case in an interrupt sub routine.

Definition at line 66 of file pic_tick.c.

References tick.

void handle_tick_inline (  )  [inline]

Typically called during the interrupt routine of a timer to increment the tick count. Note this routine assumes that interupts are off - which is always the case in an interrupt sub routine. Inline version so you don't use up one stack level

Definition at line 84 of file pic_tick.h.

References tick.

Referenced by timer_0_callback().

Here is the caller graph for this function:

uns16 tick_calc_diff ( uns16  a,
uns16  b 
)

Calculates how many ticks have elapsed between two tick values. Covers cases where the tick count wraps beyond its 16 bit value.

Definition at line 58 of file pic_tick.c.

Referenced by its1_device_process(), its2_device_process(), its2_process_tx_queue(), its2_router_process(), pkt_process_tx_queue(), and platform_leds_process().

Here is the caller graph for this function:

uns16 tick_get_count (  ) 

Returns the current tick count. Thread and interrupt safe.

Definition at line 47 of file pic_tick.c.

References end_crit_sec, start_crit_sec, tick, and uns16.

Referenced by its1_device_process(), its1_find_controller(), its2_device_process(), its2_find_controller(), its2_print_queue(), its2_process_tx_queue(), its2_router_process(), its2_transmit(), pkt_process_tx_queue(), platform_leds_flash(), and platform_leds_process().

Here is the caller graph for this function:


Variable Documentation

uns16 tick = 0 [static]

Global tick counter

Definition at line 51 of file pic_tick.h.

Referenced by handle_tick(), handle_tick_inline(), and tick_get_count().


Generated on Wed Dec 8 13:47:42 2010 for Pic Pack by  doxygen 1.6.1