Search found 3 matches

by Sandeep
Thu Dec 28, 2017 3:19 pm
Forum: General Support
Topic: Implementation of virtual timers
Replies: 3
Views: 2514

Re: Implementation of virtual timers

// timer to turn off Breaker close command
static VirtualTimer close_pulse_timer;

//prototype
static void led2Off(void *arg);


// virtual timer callback to turn off close command
static void led2Off(void *arg)
{
(void)arg;;
ledOff(2);
}


//
//*************
//
void function(void)
{
if (led1== ON ...
by Sandeep
Thu Dec 28, 2017 3:03 pm
Forum: General Support
Topic: Implementation of virtual timers
Replies: 3
Views: 2514

Implementation of virtual timers

I 'm having trouble in generating the delay at correct time using virtual timers.

if (LED1== ON)
{
led2ON();
chSysLockFromIsr();
if (chVTIsArmedI(&close_pulse_timer))
chVTResetI(&close_pulse_timer);
chVTSetI(&close_pulse_timer, MS2ST(2000), led2OFF, NULL); // TURNS OFF LED2 AFTER 2 SECONDS ...
by Sandeep
Thu Nov 09, 2017 7:22 pm
Forum: General Support
Topic: Compilation Error
Replies: 1
Views: 1812

Compilation Error

Need some help. I have imported a new chibios project, I cannot compile my project. Below is my compilation error.
Thanks in advance.