clock.c File Reference

Implementation of the clock functions for the 8051 CPU. More...

#include <stdio.h>
#include "sys/clock.h"
#include "sys/etimer.h"
#include "cc2430_sfr.h"

Go to the source code of this file.

Defines

#define TICK_VAL   (32768/128)
 TODO: Implement clock_fine() and clock_fine_max_ticks() using another timer?

Functions

void clock_delay (unsigned int len)
 One delay is about 0.6 us, so this function delays for len * 0.6 us.
void clock_wait (int i)
 Wait for a multiple of ~8 ms (a tick).
clock_time_t clock_time (void)
 Get the current clock time.
void clock_init (void)
 Initialize the clock library.

Detailed Description

Implementation of the clock functions for the 8051 CPU.

Author:
Zach Shelby (zach@sensinode.com)

Definition in file clock.c.


Function Documentation

void clock_wait ( int  i  ) 

Wait for a multiple of ~8 ms (a tick).

Wait for a multiple of 1 / 125 sec = 0.008 ms.

Definition at line 83 of file clock.c.

References clock_time().

Referenced by beep_long().


Generated on Mon Apr 11 14:23:47 2011 for Contiki 2.5 by  doxygen 1.6.1