[En-Nut-Discussion] Blinking LED on Ethernut 3
Ste
thefallenlord at gmail.com
Tue May 29 12:22:05 CEST 2007
Hello,
I would know which are the modifications to bring to the example "Blinking
LED" available on the Ethernut web page in the section Nut/OS LED TUTORIAL
(and here attached) so that runs also on Ethernut 3.
Can you help me?
Regards,
Ste
---------------------------------------------------------------
/*
* This header contains the Nut/OS timer function
* prototypes. We need it for calling NutSleep.
*/
#include <sys/timer.h>
/*
* Ethernut LED example #1.
*/
int main(void)
{
/*
* Configure port E bit 2 as an output.
*/
sbi(DDRE, 2);
/*
* An endless loop.
*/
for (;;) {
/*
* Set port E bit 2 to low. This will lit the LED.
*/
cbi(PORTE, 2);
/*
* Sleep 1000 milliseconds.
*/
NutSleep(1000);
/*
* Setting port E bit 2 to high switches off the LED.
*/
sbi(PORTE, 2);
/*
* Sleep for another 1000 milliseconds.
*/
NutSleep(1000);
}
}
--
View this message in context: http://www.nabble.com/Blinking-LED-on-Ethernut-3-tf3832960.html#a10851377
Sent from the MicroControllers - Ethernut mailing list archive at Nabble.com.
More information about the En-Nut-Discussion
mailing list