Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!
Paste
Pasted as C by skikepok ( 12 years ago )
#include "stm32f10x_gpio.h"
void wait_100(void)
{
for (long i = 0; i < 100; i++)
;
}
void wait_1000(void)
{
for (long i = 0; i < 10; i++)
wait_100();
}
void wait_10000(void)
{
for (long i = 0; i < 10; i++)
wait_1000();
}
void wait_100000(void)
{
for (long i = 0; i < 10; i++)
wait_10000();
}
void wait(void)
{
for (long i = 0; i < 5; i++)
wait_100000();
}
void toggle(int led)
{
wait();
vParTestToggleLED(led);
wait();
vParTestToggleLED(led);
}
void LEDTask (void)
{
vParTestInitialise();
int i = 0;
while(1)
{
toggle(i++);
if (i == 4)
i = 0;
}
}
Revise this Paste