Files
raspberrypi/blinker06/blinker06.c
2012-06-16 01:29:20 -04:00

33 lines
809 B
C

//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
#include "periph.h"
#include "wdog.h"
//------------------------------------------------------------------------
int notmain ( void )
{
unsigned int ra;
unsigned int rb;
init_led();
while(1)
{
wdog_start(0xFFFFF);
while(1)
{
ra=wdog_get_remaining();
//if(ra<0x67697) //10 seconds
if(ra<0xC2F6F) //4 seconds
{
toggle_led();
break;
}
}
}
return(0);
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------