- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

# lib/delay.c

Go to the documentation of this file.

    00001
    00041 #include <delay.h>
    00042 #include <util.h>
    00043
    00053 unsigned int ns2cyc(unsigned int ns, unsigned int rate)
    00054 {
    00055         unsigned int cycles;
    00056
    00057         cycles = div_ceil(rate, 1000000);
    00058         cycles = div_ceil(cycles * ns, 1000);
    00059
    00060         return cycles;
    00061 }