Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 03, 2016, 10:50:50 22:50


Login with username, password and session length


Pages: [1]
Print
Author Topic: QuarkTS Non-Preemptive Task Scheduler  (Read 284 times)
0 Members and 1 Guest are viewing this topic.
kmilo17pet
Newbie
*
Offline Offline

Posts: 14

Thank You
-Given: 0
-Receive: 19


« on: October 27, 2016, 08:11:22 20:11 »

https://github.com/kmilo17pet/QuarkTS/wiki/QuarkTS
Logged
bigtoy
Active Member
***
Offline Offline

Posts: 152

Thank You
-Given: 127
-Receive: 197


« Reply #1 on: October 29, 2016, 05:40:38 05:40 »

I have a question. On your webpage you show the following example code:

Quote
#include "QuarkTS.h"
#include "MyAppTasks.h"

void interrupt OnTimerInterrupt(){ //hardware specific code
    qISRHandler(); //
}

void main(void){
    HardwareSetup();  //hardware specific code
    Configure_Periodic_Timer_Interrupt_10ms(); // hardware specific code
    qSetup(0.01, IdleTask_Callback, 10);
    qCreateTask(HardwareCheckTask, HardwareCheckTask_Callback, 120, 0.25, PERIODIC, ENABLE, NULL);
    qCreateTask(SignalAnalisysTask, SignalAnalisysTask_Callback, HIGH_Priority, 0.1, 200, ENABLE, NULL);
    qCreateEventTask(CheckUserEventsTask, CheckUserEventsTask_Callback, MEDIUM_Priority, NULL);
    qCreateTask(CommunicationTask, CommunicationTask_Callback, HIGH_Priority, TIME_INMEDIATE, PERIODIC, ENABLE, NULL);
    qSchedule();
    for(; ; ){}
}

Shouldn't the qSchedule() call be inside the for() loop at the end?
Logged
kmilo17pet
Newbie
*
Offline Offline

Posts: 14

Thank You
-Given: 0
-Receive: 19


« Reply #2 on: October 31, 2016, 05:28:01 17:28 »

Is not required, the subroutine is responsible for maintaining the task scheduleling with an infinite loop.
if you require to run code without any control indefinitly, you can use the "IDLE" task.
Let me know if need more help.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC