Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
main_demo2.c
Go to the documentation of this file.
1
2
#include "
std.h
"
3
#include "
mcu.h
"
4
#include "
mcu_periph/sys_time.h
"
5
#include "
led.h
"
6
7
static
inline
void
main_init
(
void
);
8
static
inline
void
main_periodic_task
(
void
);
9
10
int
main
(
void
)
11
{
12
main_init
();
13
while
(1) {
14
if
(
sys_time_check_and_ack_timer
(0)) {
15
main_periodic_task
();
16
}
17
}
18
return
0;
19
}
20
21
static
inline
void
main_init
(
void
)
22
{
23
mcu_init
();
24
sys_time_register_timer
((1. / PERIODIC_FREQUENCY), NULL);
25
}
26
27
static
inline
void
main_periodic_task
(
void
)
28
{
29
LED_TOGGLE
(1);
30
}
mcu_init
void mcu_init(void)
Microcontroller peripherals initialization.
Definition:
mcu.c:82
main
int main(void)
Definition:
main_demo2.c:10
main_periodic_task
static void main_periodic_task(void)
Definition:
main_demo2.c:27
sys_time.h
Architecture independent timing functions.
std.h
LED_TOGGLE
#define LED_TOGGLE(i)
Definition:
led_hw.h:52
mcu.h
Arch independent mcu ( Micro Controller Unit ) utilities.
sys_time_check_and_ack_timer
static bool sys_time_check_and_ack_timer(tid_t id)
Check if timer has elapsed.
Definition:
sys_time.h:114
led.h
arch independent LED (Light Emitting Diodes) API
main_init
static void main_init(void)
Definition:
main_demo2.c:21
sys_time_register_timer
tid_t sys_time_register_timer(float duration, sys_time_cb cb)
Register a new system timer.
Definition:
sys_time.c:43
sw
airborne
firmwares
tutorial
main_demo2.c
Generated on Sat Feb 9 2019 07:05:41 for Paparazzi UAS by
1.8.8