lib/delay.c File Reference

Architecture-independent delay-related functions. More...

#include <delay.h>
#include <util.h>

Include dependency graph for delay.c:

Go to the source code of this file.

Functions

unsigned int ns2cyc (unsigned int ns, unsigned int rate)
 Convert from nanoseconds to clock cycles using 32-bit arithmetic.


Detailed Description

Architecture-independent delay-related functions.

Author:
Atmel Corporation: http://www.atmel.com
Support and FAQ: http://support.atmel.no/

Definition in file delay.c.


Function Documentation

unsigned int ns2cyc ( unsigned int  ns,
unsigned int  rate 
)

Convert from nanoseconds to clock cycles using 32-bit arithmetic.

Parameters:
ns Number of nanoseconds
rate Clock rate in Hz
Returns:
(ns * rate) / 1000000000

Definition at line 53 of file delay.c.

References div_ceil.


Generated on Tue Sep 15 10:17:48 2009 for libavr32 by  doxygen 1.5.8