Skip to content

Releases: WeSpeakEnglish/ANTIRTOS

v1.0.1

07 Oct 17:17
Compare
Choose a tag to compare
  1. Added revoke method to delayed queues. Now you may revoke your function from the delayed queue with Qeueu_Name.revoke(functionName);
  2. One more example added.
  3. Refactored

v1.0.0

27 Sep 15:23
Compare
Choose a tag to compare

Implemented delay functions with parameters and a quick example for the Arduino Nano board

v0.2.1

27 Jul 21:18
8b919cc
Compare
Choose a tag to compare

Time delay for delayed tasks execution updated from unsigned int to long (32 bits variable)

v0.2.0

26 Jul 15:53
Compare
Choose a tag to compare

fQ returned, shell work correctly with all the examples and architectures

fQ is a class for creation simple queue of procedures (functions getting and returning void).
An example:

void task1(void){   // some procedure
  //do something
}
void task2(void){   // some procedure
  //do something
}
fQ queue1(8); // create a FIFO queue of 8 pointers length
queue1.push(task1); // anywhere, for example example in some interrupt
queue1.push(task2); // for example in the same interrupt
//.....
queue1.pull();  // in the main loop

fQP is a class for creation queue of functions receiving parameter, it may be your own class with fixed size, like structure or standard one.
An example:

uint32_t somevalue1 = 123456;  //value to call task1 with
uint32_t somevalue2 = 789012; // /value to call task1 with

void task1(uint32_t){   // some function with parameter
  //do something
}
void task2(uint32_t){   // some function with parameter
  //do something
}
fQP<uint32_t> queue2(4); // create a FIFO queue of 4 pointers length for functions returning void, and receiving uint32_t parameter

queue2.push(task1, somevalue1); // anywhere, for example example in some interrupt
queue2.push(task2, somevalue2); // for example in the same interrupt
//.....
queue2.pull();  // in the main loop

del_fQ is a class for creating simple queue of procedures (functions getting and returning void) but delayed for some 'ticks'.
An example:

void task1(void){   // some procedure
  //do something
}
void task2(void){   // some procedure
  //do something
}
del_fQ queue3(8); // create a 'delayed'  FIFO queue of 8 pointers length for functions returning void, and receiving void

queue3.push(task1, 123); // anywhere, for example example in some interrupt, this task will be delayed for delay1 ticks from here 
                                        // this delay const or variable of type unsigned int 
queue3.push(task2, 344); // for example in the same interrupt, this task will be delayed for delay2 ticks from here
                                        //  this delay const or variable of type unsigned int 
//.....
queue3.pull();  // in the main loop

//...
queue3.tick();  //in same periodic function, it maybe for example some timer elapsed interrupt, or even main loop