NetBurner 3.5.0
PDF Version |
|
Functions | |
int | IntervalOSSem (OS_SEM *p_toSem, int num_per_sec, int timer=FIRST_UNUSED_TIMER) |
Posts to a semaphore at the requested interval. | |
int | IntervalOSFlag (OS_FLAGS *p_toFlag, uint32_t flag_value, int num_per_sec, int timer=FIRST_UNUSED_TIMER) |
Sets a flag at requested interval. | |
int | IntervalInterruptCallback (void(*p_toCallbackFunc)(), int num_per_sec, int timer=FIRST_UNUSED_TIMER) |
Calls a function at requested interval. Note that the callback function is called from within the timer's interrupt handler so you should treat your callback function as an interrupt. | |
void | IntervalStop (int timer_number) |
Stops an existing Interval Timer and frees the resource. | |
#include< IntervalTimer.h >
The Interval Timer is used to create a periodic interrupt (IRQ) that can trigger the following:
\nburn\examples
Example: Create an interval timer that posts 20 times per second
When you have no further use for the interval timer, call IntervalStop() so that the hardware timer is released.
int IntervalInterruptCallback | ( | void(*)() | p_toCallbackFunc, |
int | num_per_sec, | ||
int | timer = FIRST_UNUSED_TIMER ) |
#include <IntervalTimer.h>
Calls a function at requested interval. Note that the callback function is called from within the timer's interrupt handler so you should treat your callback function as an interrupt.
p_toCallbackFunc | Pointer to the callback function |
num_per_sec | Number of posts per second, minimum is 20 posts per second. |
timer | Optional parameter, timer number of -1 for first unused timer |
int IntervalOSFlag | ( | OS_FLAGS * | p_toFlag, |
uint32_t | flag_value, | ||
int | num_per_sec, | ||
int | timer = FIRST_UNUSED_TIMER ) |
#include <IntervalTimer.h>
Sets a flag at requested interval.
p_toFlag | Pointer to the semaphore |
flag_value | OS Flag value to set |
num_per_sec | Number of posts per second, minimum is 20 posts per second. |
timer | Optional parameter, timer number of -1 for first unused timer |
int IntervalOSSem | ( | OS_SEM * | p_toSem, |
int | num_per_sec, | ||
int | timer = FIRST_UNUSED_TIMER ) |
#include <IntervalTimer.h>
Posts to a semaphore at the requested interval.
p_toSem | Pointer to the semaphore |
num_per_sec | Number of posts per second, minimum is 20 posts per second |
timer | Optional parameter, timer number of -1 for first unused timer |
void IntervalStop | ( | int | timer_number | ) |
#include <IntervalTimer.h>
Stops an existing Interval Timer and frees the resource.
timer_number | Number of the timer to stop. |