OpenCores
URL https://opencores.org/ocsvn/minsoc/minsoc/trunk

Subversion Repositories minsoc

[/] [minsoc/] [branches/] [rc-1.0/] [utils/] [contributions/] [gpio/] [sw/] [old/] [udelay.c] - Rev 141

Go to most recent revision | Compare with Previous | Blame | View Log

#include "../support/support.h"
#include "../support/board.h"
 
 
void udelay(unsigned long);
 
void udelay(unsigned long usecs)
{
    unsigned long i;	
    unsigned long cycles = usecs / (IN_CLK / 1000000 );
    unsigned long mem_dummy;
    volatile unsigned long* ptr = &mem_dummy;
 
    for ( i=0; i< cycles; i++)
	    *ptr = 0xABCD;
}
 
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.