SYSTM App parameter

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello 🙂

I have a question to the SYSTM002 App parameter in DAVE 3. The first and second parameter are clearly, but i didnt't understand the third. I tried it with a method, nevertheless i don't understand.

In my code i have a line like this:

SYSTM002_CreateTimer(1000, SYSTM002_ONE_SHOT, ???, NULL);

Can somebody explain me the third parameter? This would be very helpful. 🙂


Many thanks in advance!
0 Likes
1 Reply
User7282
Level 4
Level 4
Hello,

So the third parameter is the callback function that will be executed when the timer finishes.

So if you do something like:


uint32_t a = 0;
int main(){
SYSTM002_CreateTimer(1000, SYSTM002_ONE_SHOT, testFunction, NULL);
}


and then define a function like this:


void testFunction {
a = 1;
}


after 1ms the variable a should become equal to 1.
0 Likes