Paparazzi UAS
v6.2.0_stable
Paparazzi is a free software Unmanned Aircraft System.
Main Page
Related Pages
Modules
Data Structures
Data Structures
Data Structure Index
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
led_hw.c
Go to the documentation of this file.
1
#include "
led_hw.h
"
2
3
#include <stdio.h>
4
#include <caml/mlvalues.h>
5
#include <caml/memory.h>
6
#include <caml/callback.h>
7
8
value *
leds_closure
= 0;
9
bool
led_disabled
=
false
;
10
11
value
register_leds_cb
(value cb_name)
12
{
13
leds_closure
= caml_named_value(String_val(cb_name));
14
return
Val_unit;
15
}
16
17
void
_led_on
(
int
i) {
if
(
leds_closure
&& !
led_disabled
) callback2(*
leds_closure
, Val_int(i), Val_int(1)); }
18
void
_led_off
(
int
i) {
if
(
leds_closure
&& !
led_disabled
) callback2(*
leds_closure
, Val_int(i), Val_int(0)); }
19
void
_led_toggle
(
int
i) {
if
(
leds_closure
&& !
led_disabled
) callback2(*
leds_closure
, Val_int(i), Val_int(2)); }
20
_led_on
void _led_on(int i)
Definition:
led_hw.c:17
_led_off
void _led_off(int i)
Definition:
led_hw.c:18
led_disabled
bool led_disabled
Definition:
led_hw.c:9
register_leds_cb
value register_leds_cb(value cb_name)
Definition:
led_hw.c:11
_led_toggle
void _led_toggle(int i)
Definition:
led_hw.c:19
leds_closure
value * leds_closure
Definition:
led_hw.c:8
led_hw.h
sw
airborne
arch
sim
led_hw.c
Generated on Mon Feb 6 2023 21:00:23 for Paparazzi UAS by
1.9.1